@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/InterTight-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

body[data-page="chat"] {
  --cap-black: #111111;
  --cap-gray: #747474;
  --cap-line: #dcdcdc;
  --cap-accent: #111111;
  margin: 0;
  min-width: 0;
  background: #fff;
  color: var(--cap-black);
  font-family: "Inter Tight", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body[data-page="chat"] *,
body[data-page="chat"] *::before,
body[data-page="chat"] *::after { box-sizing: border-box; }
body[data-page="chat"] button,
body[data-page="chat"] textarea { font: inherit; }
body[data-page="chat"] button { cursor: pointer; }
body[data-page="chat"] a { color: inherit; text-decoration: none; }
body[data-page="chat"] [hidden] { display: none !important; }
body[data-page="chat"] :focus-visible { outline: 2px solid var(--cap-accent); outline-offset: 3px; }
.cap-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.cap-chat-layout { min-height: 100svh; background: #fff; }
.cap-chat-header {
  height: 56px;
  padding: 0 22px 0 0;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--cap-line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.cap-wordmark { height: 100%; width: 100%; padding-left: 22px; border-right: 1px solid var(--cap-line); display: flex; align-items: center; justify-self: start; font-family: "Inter Tight", "Microsoft YaHei", Arial, sans-serif; font-size: 17px; line-height: 1; font-weight: 800; letter-spacing: -.085em; white-space: nowrap; }
.cap-wordmark span { font-weight: 500; }
.cap-header-label { justify-self: center; }
.cap-header-label,
.cap-header-link { font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .07em; white-space: nowrap; }
.cap-header-link { justify-self: end; display: inline-flex; gap: 17px; align-items: center; }
.cap-header-link span { font-size: 16px; font-weight: 400; }
.cap-header-link:hover { opacity: .55; }
.cap-header-actions { justify-self: end; display: flex; align-items: center; gap: 25px; }
.cap-header-contact { border: 0; padding: 0; background: transparent; display: inline-flex; align-items: center; gap: 7px; color: var(--cap-black); font-size: 10px; font-weight: 800; letter-spacing: .07em; white-space: nowrap; }
.cap-header-contact span { font-size: 16px; font-weight: 400; }
.cap-header-contact:hover { opacity: .55; }

.cap-chat-body { min-height: calc(100svh - 56px); display: grid; grid-template-columns: 304px minmax(0, 1fr); }
.cap-chat-aside {
  min-width: 0;
  padding: 20px 18px 24px;
  border-right: 1px solid var(--cap-line);
  display: flex;
  flex-direction: column;
  background: #fbfbfb;
}
.cap-side-section-label,
.cap-aside-foot,
.cap-main-meta,
.cap-welcome-overline,
.cap-unavailable-note > span,
.cap-composer-footnote,
.cap-draft-banner > span { font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.cap-new-task {
  width: 100%;
  min-height: 56px;
  padding: 10px 18px;
  border: 1px solid #cbdaf1;
  border-radius: 11px;
  background: #ebf1fb;
  box-shadow: 0 2px 3px rgba(25, 61, 108, .08);
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  color: var(--cap-black);
  font-size: 16px;
  font-weight: 600;
}
.cap-new-task img, .cap-task-tab img, .cap-task-glyph { width: 23px; height: 23px; flex: 0 0 auto; }
.cap-task-glyph { display: inline-grid; place-items: center; font-size: 23px; font-weight: 400; line-height: 1; }
.cap-new-task:hover { background: #dfe9f9; border-color: #b5ccef; }
.cap-task-nav { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e4e4e4; }
.cap-side-section-label { display: block; color: #8b8b8b; }
.cap-task-tab {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: flex;
  gap: 13px;
  align-items: center;
  text-align: left;
  color: var(--cap-black);
  font-size: 15px;
  font-weight: 650;
}
body[data-page="chat"] .cap-task-tab { font-size: 15px; }
.cap-task-tab.is-active { background: #ededed; }
.cap-task-tab:hover { background: #e6e6e6; }
.cap-task-tab.is-coming { opacity: .72; cursor: not-allowed; }
.cap-task-tab.is-coming:hover { background: transparent; }
.cap-task-tab span { flex: 1; }
.cap-task-tab .cap-task-glyph { flex: 0 0 23px; }
.cap-task-tab b { font-size: 10px; font-weight: 700; color: #999; }
.cap-task-tab.is-coming b { white-space: nowrap; color: #555; font-size: 9px; font-weight: 700; }
.cap-session-status { margin-top: 22px; padding-top: 19px; border-top: 1px solid #e4e4e4; }
.cap-session-status p { margin: 45px 0 0; color: #aaa; text-align: center; font-size: 12px; }
.cap-aside-foot { margin-top: auto; padding-top: 20px; color: #888; }
.cap-aside-foot i { margin: 0 8px; color: var(--cap-black); font-style: normal; }

.cap-chat-main { min-width: 0; min-height: calc(100svh - 56px); display: flex; flex-direction: column; }
.cap-main-meta { min-height: 63px; padding: 0 33px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #888; border-bottom: 1px solid #eee; }
.cap-main-meta span:first-child { color: var(--cap-black); }
.cap-chat-content { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.cap-conversation { min-width: 0; min-height: 270px; flex: 1; overflow: auto; padding: 18px clamp(26px, 6vw, 100px); }
.cap-chat-aside, .cap-conversation { scrollbar-width: none; }
.cap-chat-aside::-webkit-scrollbar, .cap-conversation::-webkit-scrollbar { display: none; }
.cap-welcome { width: min(680px, 100%); margin: clamp(0px, calc(8vh - 54px), 42px) auto 18px; }
.cap-welcome-overline { margin: 0 0 16px; color: #777; }
.cap-welcome-overline span { margin-right: 9px; color: var(--cap-black); font-size: 12px; }
.cap-welcome h2 { margin: 0; font-size: clamp(37px, 3.7vw, 52px); line-height: 1.12; letter-spacing: -.065em; font-weight: 600; }
.cap-welcome h2 span { color: var(--cap-black); }
.cap-welcome > p:nth-of-type(2) { max-width: 500px; margin: 16px 0 0; color: #6b6b6b; font-size: 13px; line-height: 1.85; }
.cap-welcome-suggestions { max-width: 650px; margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 15px; }
.cap-welcome-suggestions > span { grid-column: 1 / -1; margin-bottom: 8px; color: #888; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
body[data-page="chat"] .cap-welcome-suggestions button { min-height: 47px; padding: 9px 5px; border: 0; border-top: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; background: #fff; color: #333; display: grid; grid-template-columns: 30px minmax(0, 1fr) 20px; align-items: center; gap: 5px; text-align: left; font-size: 13px; line-height: 1.5; }
.cap-welcome-suggestions button:hover { background: #f5f5f5; color: var(--cap-black); }
.cap-suggestion-index { align-self: start; color: #999; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.cap-welcome-suggestions button b { justify-self: end; font-size: 15px; font-weight: 400; }

.cap-composer-wrap { width: min(880px, calc(100% - 66px)); margin: 0 auto 28px; }
.cap-unavailable-note { min-height: 39px; padding: 9px 0; border-top: 1px solid var(--cap-black); display: flex; align-items: center; gap: 23px; }
.cap-unavailable-note > span { color: var(--cap-black); white-space: nowrap; }
.cap-unavailable-note strong { font-size: 11px; font-weight: 500; color: #666; }
.cap-chat-composer { display: flex; align-items: flex-end; gap: 12px; border: 1px solid #d3d3d3; background: #fff; padding: 17px 17px 16px 19px; }
.cap-chat-composer:focus-within { border-color: var(--cap-black); }
.cap-chat-composer textarea { min-width: 0; min-height: 206px; max-height: 320px; flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--cap-black); font-size: 13px; line-height: 1.65; }
.cap-chat-composer textarea::placeholder { color: #999; }
.cap-chat-composer button { min-width: 76px; min-height: 42px; border: 0; padding: 10px 12px; display: inline-flex; justify-content: space-between; align-items: center; gap: 9px; background: var(--cap-black); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.cap-chat-composer button span { font-size: 17px; font-weight: 400; }
.cap-chat-composer button:hover { background: #555; }
.cap-composer-footnote { margin: 11px 0 0; color: #999; font-size: 10px; font-weight: 400; letter-spacing: 0; }

.cap-conversation .chat-message { width: min(650px, 100%); margin: 0 auto 17px; padding: 17px 20px; border-radius: 0; border: 1px solid #d7d7d7; box-shadow: none; color: var(--cap-black); background: #fff; font-size: 13px; line-height: 1.75; }
.cap-conversation .chat-message.visitor { border-color: var(--cap-black); background: #fff; }
.cap-conversation .chat-message.system { border-left: 2px solid var(--cap-black); }
.cap-conversation .chat-message .message-label { color: #666; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.cap-conversation .chat-message p { margin: 8px 0 0; overflow-wrap: anywhere; }
.cap-conversation .chat-results { width: min(1080px, 100%); margin: 0 auto 22px; scroll-margin-top: 72px; }
.chat-results-head { padding: 13px 0; border-top: 2px solid var(--cap-black); border-bottom: 1px solid var(--cap-line); }
.chat-results-head strong { display: block; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.chat-results-head p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: #555; }
.chat-ai-summary { padding: 20px 0 19px; border-bottom: 1px solid var(--cap-line); }
.chat-ai-summary span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.chat-ai-summary p { margin: 13px 0 0; font-size: 13px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.chat-ai-summary small { display: block; margin-top: 12px; color: #777; font-size: 10px; line-height: 1.6; }
.chat-institution-choices { padding: 16px 0 2px; display: grid; gap: 7px; }
.chat-institution-choices > p { margin: 0 0 5px; color: #777; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.chat-institution-choices > button { border: 1px solid var(--cap-line); padding: 12px 14px; background: #fff; color: var(--cap-black); text-align: left; font-size: 12px; line-height: 1.5; }
.chat-institution-choices > button:hover { border-color: var(--cap-black); background: #f5f5f5; }
.chat-results-rail { margin-top: 20px; min-width: 0; }
.chat-results-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 9px; color: #777; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.chat-results-rail-controls { display: flex; align-items: center; gap: 5px; }
.chat-results-position { min-width: 58px; margin-right: 7px; color: #444; text-align: right; font-variant-numeric: tabular-nums; }
.chat-results-arrow { width: 29px; height: 27px; display: grid; place-items: center; border: 1px solid #bcbcbc; background: #fff; color: var(--cap-black); font-size: 16px; line-height: 1; }
.chat-results-arrow:hover:not(:disabled) { border-color: var(--cap-black); background: var(--cap-black); color: #fff; }
.chat-results-arrow:disabled { opacity: .35; cursor: default; }
.chat-results-list { min-width: 0; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scroll-padding-inline: 1px; scrollbar-width: thin; scrollbar-color: #8c8c8c #ebebeb; cursor: grab; padding: 0 1px 15px; }
.chat-results-list:focus-visible { outline: 2px solid var(--cap-black); outline-offset: 2px; }
.chat-results-list.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.chat-results-list::-webkit-scrollbar { height: 5px; }
.chat-results-list::-webkit-scrollbar-track { background: #ebebeb; }
.chat-results-list::-webkit-scrollbar-thumb { background: #8c8c8c; }
.chat-result-card { box-sizing: border-box; flex: 0 0 clamp(240px, 38%, 310px); min-height: 174px; padding: 19px 18px 18px; border: 1px solid var(--cap-line); background: #fff; scroll-snap-align: start; }
.chat-result-card:hover { border-color: #9b9b9b; }
.chat-result-meta { display: flex; justify-content: space-between; gap: 12px; color: #777; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.chat-result-card h3 { margin: 13px 0 0; font-size: 15px; line-height: 1.4; font-weight: 700; }
.chat-result-card h3 span { margin-left: 12px; color: #777; font-size: 12px; font-weight: 500; }
.chat-result-card p { margin: 9px 0 0; color: #333; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.chat-result-card .chat-result-note { color: #777; font-size: 10px; }
.chat-result-more { margin-top: 17px; padding: 11px 15px; border: 1px solid var(--cap-black); background: #fff; color: var(--cap-black); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.chat-result-more:hover { background: var(--cap-black); color: #fff; }
.chat-result-more:disabled { opacity: .5; cursor: wait; }
.chat-contact-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 22px; padding: 11px 17px; border: 1px solid var(--cap-black); color: var(--cap-black); background: #fff; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.chat-contact-link:hover { background: var(--cap-black); color: #fff; }

.cap-embed-content { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.cap-embed-content iframe { min-width: 0; min-height: 550px; flex: 1; width: 100%; border: 0; background: #fff; }
.cap-draft-banner { padding: 12px 31px; border-bottom: 1px solid var(--cap-line); display: flex; align-items: center; gap: 18px; }
.cap-draft-banner > span { color: var(--cap-black); white-space: nowrap; }
.cap-draft-banner strong { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
.cap-draft-banner button { border: 0; background: transparent; color: var(--cap-black); font-size: 11px; font-weight: 800; white-space: nowrap; }
.cap-draft-banner button:hover { color: #777; }

@media (min-width: 721px) {
  .cap-chat-body { height: calc(100svh - 56px); min-height: 0; }
  .cap-chat-aside { min-height: 0; overflow-y: auto; }
  .cap-chat-main { height: 100%; min-height: 0; }
  .cap-conversation { min-height: 0; padding-top: 0; }
  .cap-composer-wrap { flex: 0 0 auto; margin-bottom: 50px; }
}

@media (max-width: 940px) {
  .cap-chat-header { grid-template-columns: 270px minmax(0, 1fr) auto; }
  .cap-chat-body { grid-template-columns: 270px minmax(0, 1fr); }
  .cap-chat-aside { padding: 20px 16px; }
  .cap-conversation { padding-left: 33px; padding-right: 33px; }
  body[data-page="chat"] .cap-welcome-suggestions button { font-size: 12px; }
}
@media (max-width: 720px) {
  .cap-chat-header { height: 55px; padding: 0 17px; grid-template-columns: 1fr auto; }
  .cap-wordmark { width: auto; padding: 0; border-right: 0; font-size: 17px; }
  .cap-header-actions { gap: 15px; }
  .cap-header-contact { font-size: 9px; }
  .cap-header-label { display: none; }
  .cap-chat-body { min-height: calc(100svh - 55px); grid-template-columns: minmax(0, 1fr); }
  .cap-chat-aside { padding: 12px 17px; border-right: 0; border-bottom: 1px solid var(--cap-line); background: #fbfbfb; flex-direction: row; gap: 8px; align-items: center; }
  .cap-new-task { width: auto; min-height: 45px; padding: 8px 13px; flex: 0 0 auto; font-size: 12px; }
  .cap-new-task img, .cap-task-tab img, .cap-task-glyph { width: 19px; height: 19px; }
  .cap-task-glyph { font-size: 19px; }
  .cap-task-nav { min-width: 0; flex: 1; margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .cap-task-nav .cap-side-section-label, .cap-session-status, .cap-aside-foot { display: none; }
  .cap-task-tab { width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 6px 5px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; line-height: 1.25; white-space: normal; }
  body[data-page="chat"] .cap-task-tab { font-size: 11px; }
  .cap-task-tab img, .cap-task-glyph { display: none; }
  .cap-task-tab span:not(.cap-task-glyph) { flex: 0 0 auto; white-space: nowrap; }
  .cap-task-tab span.cap-task-name { max-width: 100%; min-width: 0; white-space: normal; }
  .cap-task-tab b, .cap-task-tab.is-coming b { display: block; font-size: 9px; line-height: 1; }
  .cap-chat-main { min-height: calc(100svh - 55px - 70px); }
  .cap-main-meta { min-height: 42px; padding: 0 18px; font-size: 9px; }
  .cap-conversation { min-height: 290px; padding: 9px 21px 18px; }
  .cap-welcome { margin: 8px auto 22px; }
  .cap-welcome-overline { margin-bottom: 15px; }
  .cap-welcome h2 { font-size: clamp(29px, 8vw, 38px); }
  .cap-welcome > p:nth-of-type(2) { margin-top: 14px; font-size: 12px; }
  .cap-welcome-suggestions { margin-top: 15px; grid-template-columns: minmax(0, 1fr); }
  .cap-welcome-suggestions button + button { border-top: 0; }
  body[data-page="chat"] .cap-welcome-suggestions button { min-height: 45px; font-size: 12px; }
  .cap-composer-wrap { width: calc(100% - 42px); margin-bottom: 18px; }
  .cap-unavailable-note { gap: 10px; }
  .cap-unavailable-note > span { font-size: 9px; }
  .cap-unavailable-note strong { font-size: 10px; }
  .cap-chat-composer { padding: 12px; }
  .cap-chat-composer textarea { min-height: 190px; max-height: 270px; }
  .cap-chat-composer button { min-width: 48px; padding: 7px 9px; font-size: 0; justify-content: center; }
  .cap-chat-composer button span { font-size: 19px; }
  .cap-composer-footnote { font-size: 9px; }
  .cap-draft-banner { padding: 10px 17px; }
  .chat-result-card { flex-basis: min(78vw, 310px); }
}
@media (max-width: 400px) {
  .cap-header-link { font-size: 9px; gap: 7px; }
  .cap-header-actions { gap: 10px; }
  .cap-new-task span { display: none; }
  .cap-new-task { width: 45px; justify-content: center; padding: 8px; }
  .cap-chat-main { min-height: calc(100svh - 55px - 70px); }
  .cap-welcome { margin-top: 0; }
  .cap-welcome h2 { font-size: clamp(27px, 8vw, 32px); }
  .cap-welcome > p:nth-of-type(2) { font-size: 11px; }
  .cap-conversation { min-height: 230px; }
  .cap-composer-wrap { width: calc(100% - 30px); }
  .cap-unavailable-note { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .cap-chat-layout *, .cap-chat-layout *::before, .cap-chat-layout *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
