:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #e6edf5;
  background: #0b1420;
  color-scheme: dark;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  padding: 24px 5vw;
  border-bottom: 1px solid #263447;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
a {
  color: #8be3ca;
}
header a {
  color: #fff;
  text-decoration: none;
  font-weight: 750;
}
header span,
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #9cacbf;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 48px 32px;
}
.intro {
  max-width: 760px;
  margin-bottom: 36px;
}
h1 {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 15px 0 24px;
}
h1 em {
  font-style: normal;
  color: #8be3ca;
}
.intro p {
  color: #afbed0;
}
h2 {
  font-size: 21px;
  line-height: 1.4;
  margin: 0 0 20px;
}
.badge {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #355044;
  border-radius: 20px;
  font-size: 12px;
}
section,
aside {
  min-width: 0;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 22px;
  background: #142131;
  border: 1px solid #2b3d52;
  border-radius: 12px;
}
.toolbar label {
  flex: 1;
}
.grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.8fr);
  gap: 24px;
  margin-top: 25px;
}
.grid > *,
#editor,
#source,
#auth {
  padding: 28px;
  background: #132032;
  border: 1px solid #2a3a50;
  border-radius: 12px;
}
label {
  display: block;
  font-size: 13px;
  color: #b7c8d9;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  font: inherit;
  color: #eef6ff;
  background: #0b1725;
  border: 1px solid #41536a;
  border-radius: 7px;
  padding: 11px;
  margin: 7px 0 17px;
}
select {
  margin-bottom: 0;
}
textarea {
  resize: vertical;
}
button {
  background: #8be3ca;
  color: #09201c;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  border-color: #4b6077;
  color: #d6e4f4;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #e7c77c;
  outline-offset: 3px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.section-title button {
  font-size: 12px;
}
#notice:empty {
  display: none;
}
#notice {
  padding: 14px 18px;
  background: #302b20;
  border-left: 3px solid #e7c77c;
  white-space: pre-wrap;
}
.hint,
#librarySummary,
footer {
  font-size: 12px;
  color: #9baec3;
}
.document {
  padding: 16px 0;
  border-top: 1px solid #304158;
}
.document p {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.document button {
  font-size: 12px;
  margin: 4px 6px 0 0;
}
.citation {
  border-left: 2px solid #8be3ca;
  padding: 12px 18px;
  margin: 18px 0;
  background: #0c1827;
}
.citation blockquote {
  margin: 12px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#answer {
  margin-top: 28px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#editor,
#source {
  margin-top: 24px;
}
pre {
  font:
    14px/1.7 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dialog {
  max-width: 460px;
  background: #17263a;
  border: 1px solid #50657d;
  border-radius: 12px;
  padding: 28px;
}
dialog::backdrop {
  background: #0009;
}
footer {
  border-top: 1px solid #263447;
  margin-top: 50px;
  padding-top: 24px;
}
#auth form {
  max-width: 450px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  main {
    padding: 30px 18px;
  }
  header {
    padding: 18px;
  }
  header > span {
    display: none;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .grid > *,
  #editor,
  #source {
    padding: 20px;
  }
  .section-title {
    flex-wrap: wrap;
  }
  h1 {
    letter-spacing: -1px;
  }
}
