:root {
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color-scheme: dark;
  color: #edf5fc;
  background: #0b1320;
  --muted: #a0b3c7;
  --accent: #94dcf7;
  --line: #2b3e52;
  --panel: #132131;
  --surface: #1a2c3d;
  --dark: #0d1927;
  --warning: #f5c989;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 76% 0, #18324b 0, transparent 55%);
}
button,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.frame {
  width: min(1160px, calc(100% - 80px));
  margin: 0 auto;
}
.masthead {
  border-bottom: 1px solid var(--line);
}
.top {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 665;
}
.mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #497d99;
  border-radius: 9px;
  background: #172d43;
}
.mark i {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50% 50% 50% 1px;
  transform: rotate(-45deg);
}
.quota {
  color: var(--accent);
  border: 1px solid #38556e;
  border-radius: 100px;
  font-size: 13px;
  padding: 6px 12px;
  text-align: center;
  white-space: nowrap;
}
.intro {
  padding: 54px 0 30px;
}
.intro h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 730;
  letter-spacing: -0.065em;
  line-height: 1.06;
}
.intro h1 span {
  color: var(--accent);
}
.intro p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(265px, 325px);
  align-items: start;
  gap: 18px;
  padding-bottom: 52px;
}
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.panel-head {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 19px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 16px;
  margin: 0;
}
.quiet {
  color: var(--accent);
  border: 0;
  background: transparent;
  font-size: 13px;
  padding: 9px 5px;
}
.quiet:disabled {
  color: var(--muted);
  opacity: 0.65;
}
.quiet:not(:disabled):hover {
  text-decoration: underline;
}
.chat {
  min-height: 466px;
  display: flex;
  flex-direction: column;
}
.transcript {
  flex: 1;
  max-height: clamp(300px, 52vh, 640px);
  min-height: 264px;
  overflow-y: auto;
  overflow-anchor: none;
  padding: 24px;
  scrollbar-color: #3d5b73 transparent;
}
.welcome h3 {
  font-size: 22px;
  margin: 0 0 17px;
}
.examples {
  display: grid;
  gap: 9px;
  max-width: 480px;
}
.examples button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #dce9f5;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  padding: 9px 13px;
  text-align: left;
}
.examples button:not(:disabled):hover {
  border-color: var(--accent);
}
.examples button:disabled {
  opacity: 0.55;
}
.examples span {
  color: var(--accent);
}
.turn {
  margin-bottom: 22px;
}
.user {
  margin: 0 0 15px auto;
  padding: 9px 13px;
  border-radius: 11px 11px 2px 11px;
  background: #234259;
  max-width: min(90%, 520px);
  width: fit-content;
}
.answer {
  border-left: 2px solid #406b82;
  padding-left: 13px;
}
.user,
.answer,
blockquote,
.feedback {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.answer p,
.feedback p {
  margin: 0;
}
.answer p + p {
  margin-top: 10px;
}
.answer .answer-method {
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
}
.answer .notice {
  color: var(--muted);
}
.citation {
  padding: 1px 6px;
  margin: 2px 0 2px 6px;
  border: 1px solid #48788e;
  border-radius: 6px;
  background: #173247;
  color: var(--accent);
  font-size: 12px;
}
.citation[aria-pressed='true'],
.citation:hover {
  background: var(--accent);
  color: #142636;
}
.pending {
  color: var(--accent);
  font-size: 14px;
  margin: 8px 0;
}
form {
  border-top: 1px solid var(--line);
  padding: 12px 19px 17px;
}
.feedback {
  color: var(--warning);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.feedback:has(p:empty):has(button[hidden]) {
  display: none;
}
.input-row {
  display: flex;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--dark);
  padding: 8px;
}
.input-row:focus-within {
  border-color: var(--accent);
}
textarea {
  flex: 1;
  display: block;
  min-width: 0;
  resize: vertical;
  max-height: 145px;
  padding: 7px;
  line-height: 1.5;
  border: 0;
  color: inherit;
  background: transparent;
  outline: none;
}
textarea:focus-visible {
  outline: none;
}
textarea::placeholder {
  color: var(--muted);
}
#send {
  flex: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--accent);
  color: #142636;
  font-weight: 700;
}
#send:disabled {
  background: #2e4659;
  color: #b9ccd9;
}
#send:not(:disabled):hover {
  background: #bbebff;
}
.sources-body {
  padding: 17px;
}
.document {
  display: flex;
  align-items: center;
  gap: 11px;
}
.document h3,
.selected-source h3 {
  font-size: 15px;
  margin: 0;
  line-height: 1.4;
}
.document p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.document-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 44px;
  border: 1px solid #3d637d;
  background: #18314a;
  border-radius: 9px;
  font-size: 11px;
  color: var(--accent);
  flex: none;
}
.document-link,
.selected-source a {
  display: inline-block;
  margin-top: 13px;
  font-size: 13px;
}
.source-hint,
.selected-source {
  margin: 17px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.source-hint,
.source-page {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.source-page {
  margin-bottom: 5px;
}
blockquote {
  background: var(--dark);
  padding: 11px 13px;
  border-left: 2px solid #45718b;
  border-radius: 0 8px 8px 0;
  margin: 10px 0 0;
  font-size: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .frame {
    width: calc(100% - 32px);
  }
  .intro {
    padding: 33px 0 22px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 32px;
  }
  .transcript {
    padding: 17px;
    max-height: 58vh;
  }
  .panel-head,
  form {
    padding-inline: 13px;
  }
}

#wake-challenge {
  margin-block: 8px;
}
