* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
  font:
    16px/1.45 -apple-system,
    BlinkMacSystemFont,
    Roboto,
    sans-serif;
  color: #efedf3;
  background: #151519;
}
body {
  margin: 0;
}
button,
a,
input,
textarea {
  font: inherit;
}
a {
  color: #d7c6ff;
}
button {
  background: #323038;
  color: inherit;
  border: 1px solid #44414b;
  border-radius: 0.5rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
button:hover,
button:focus-visible {
  background: #45414c;
}
button:disabled {
  opacity: 0.55;
}
header {
  height: 3.6rem;
  border-bottom: 1px solid #37343d;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(0.8rem, 3vw, 2rem);
  background: #1e1c23;
}
header strong {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.logo {
  display: grid;
  place-items: center;
  background: #514563;
  border: 1px solid #88769d;
  border-radius: 0.4rem;
  width: 1.75rem;
  height: 1.75rem;
  color: #eee2ff;
}
header span {
  margin-left: auto;
  font-size: 0.86rem;
  color: #c8bccf;
}
h1,
h2,
p {
  margin: 0 0 0.7rem;
}
h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1rem;
}
#login {
  margin: clamp(2rem, 12vh, 8rem) auto 2rem;
  width: min(28rem, calc(100% - 2rem));
}
#pair {
  padding: 1.6rem;
  border: 1px solid #47414f;
  background: #222027;
  border-radius: 1rem;
  margin-bottom: 1rem;
}
#pair p,
small {
  color: #c1bac9;
}
#pair label {
  display: block;
  margin: 1rem 0;
}
input,
textarea {
  display: block;
  width: 100%;
  background: #19181d;
  color: inherit;
  border: 1px solid #514b59;
  border-radius: 0.45rem;
  padding: 0.7rem;
}
input {
  margin-top: 0.3rem;
}
output,
#status {
  display: block;
  color: #dac8ef;
  white-space: pre-wrap;
}
output:not(:empty) {
  margin-top: 0.8rem;
}
.accent {
  background: #ceb9ef;
  color: #23182e;
  border-color: #ceb9ef;
  font-weight: 650;
}
.accent:hover {
  background: #ddccf5;
}
#workspace {
  height: calc(100dvh - 3.6rem);
  display: grid;
  grid-template-columns: clamp(14rem, 24vw, 22rem) 1fr;
}
aside {
  background: #1e1d23;
  border-right: 1px solid #39363e;
  padding: 1rem;
  overflow: auto;
}
.section {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}
.section h2,
.section h1 {
  margin: 0;
}
.section button,
nav button {
  font-size: 0.9rem;
}
nav section {
  margin-top: 1rem;
}
nav details > summary {
  cursor: pointer;
  font-weight: 600;
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  margin: 0.12rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
nav button[aria-current="true"] {
  background: #38323f;
}
.chat {
  padding: 1.1rem clamp(0.7rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.chat h1 {
  font-size: 1.25rem;
}
#thread {
  overflow: auto;
  flex: 1;
  margin: 1rem 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#thread article,
#thread details {
  max-width: 48rem;
  margin: 0.5rem auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#thread .user {
  background: #302c36;
  border-radius: 0.85rem;
  padding: 0.65rem 1rem;
  width: fit-content;
  max-width: min(85%, 48rem);
  margin-right: 0;
}
#thread details {
  color: #b8b0c1;
  font-size: 0.88rem;
}
#thread details p {
  margin: 0.45rem 0 0 1rem;
}
#composer textarea {
  max-height: 25vh;
  resize: vertical;
}
#composer > div {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 40vh;
  overflow: auto;
}
dialog {
  width: min(50rem, 90vw);
  border: 1px solid #51465d;
  border-radius: 0.8rem;
}
dialog::backdrop {
  background: #08080bbd;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  #workspace {
    display: flex;
    flex-direction: column;
  }
  aside {
    max-height: 30vh;
    border-bottom: 1px solid #39363e;
    border-right: 0;
    padding: 0.6rem 0.8rem;
  }
  .chat {
    flex: 1;
  }
  .chat .section {
    align-items: start;
  }
  .section button {
    white-space: nowrap;
  }
  #login {
    margin-top: 2rem;
  }
  header {
    gap: 0.4rem;
  }
}
