:root {
  color-scheme: dark;
  --bg: #101218;
  --side: #171a21;
  --panel: #1a1e26;
  --line: #2a2f39;
  --text: #f1f3f7;
  --muted: #a0a8b8;
  --accent: #baff66;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button,
input,
textarea,
select {
  outline-offset: 4px;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
}
[hidden] {
  display: none !important;
}
button {
  border: 0;
  background: none;
}
input,
select,
textarea {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #8991a1;
}
label {
  display: block;
  font-size: 14px;
  color: var(--muted);
}
label input {
  margin-top: 7px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 36px;
  letter-spacing: -1px;
  font-weight: 600;
}
h2 {
  font-size: 20px;
  font-weight: 550;
}
.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  height: 100dvh;
}
aside {
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 28px 18px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #17250d;
  font-weight: 800;
  font-size: 23px;
}
.logo span {
  font-size: 14px;
  align-self: flex-end;
  margin-bottom: 3px;
}
.brand small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-left: auto;
}
.newchat {
  margin-top: 32px;
  width: 100%;
  background: #282e25;
  border: 1px solid #48583a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 14px;
  color: #d2f3b3;
}
.newchat > span {
  font-size: 24px;
  line-height: 1;
}
kbd {
  margin-left: auto;
  border: 1px solid #526047;
  border-radius: 4px;
  padding: 0 5px;
  font: 12px monospace;
  color: #b3c4a7;
}
.section-label,
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.7px;
  color: var(--muted);
  font-weight: 600;
}
.section-label {
  margin: 30px 12px 12px;
}
nav {
  overflow: auto;
  flex: 1;
}
nav button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  color: #adb4c2;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
nav button.active,
nav button:hover {
  background: #242a34;
  color: #fff;
}
.empty {
  font-size: 14px;
  color: var(--muted);
  padding: 14px 12px;
}
.sidebar-bottom {
  padding-top: 16px;
}
.sidebar-bottom > button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #b8becc;
}
.sidebar-bottom > button:hover,
.sidebar-bottom > button.active {
  background: #242a34;
  color: white;
}
.count {
  margin-left: auto;
  background: #353b46;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 12px;
}
.profile {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding: 21px 8px 4px;
  font-size: 13px;
}
.profile small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #353b48;
  border: 1px solid #4c5361;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 13px;
}
main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
header {
  height: 76px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 34px;
  font-size: 14px;
}
header b {
  font-weight: 450;
  color: #d0d5df;
}
header span:not(.badge) {
  color: var(--muted);
}
#pageTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#pageTitle > span {
  margin: 0 14px;
}
.header-end {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  white-space: nowrap;
}
.badge {
  border: 1px solid #414c36;
  color: #bfd59e;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
  letter-spacing: 1px;
}
.view {
  min-height: 0;
}
.chat-view {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.chat-toolbar {
  padding: 20px 34px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.chat-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-toolbar select {
  width: auto;
  max-width: 280px;
  padding: 7px 30px 7px 12px;
  font-size: 14px;
  background: #1c2028;
}
.quiet {
  font-size: 14px;
  color: #c4cbd7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  white-space: nowrap;
}
.messages {
  overflow: auto;
  flex: 1;
  padding: 10px 30px 30px;
}
.welcome {
  max-width: 800px;
  margin: 5vh auto 0;
  text-align: center;
}
.welcome-mark {
  margin: 0 auto 25px;
  display: grid;
  place-items: center;
  font-size: 44px;
  color: var(--accent);
  background: #1d2519;
  border: 1px solid #344329;
  width: 70px;
  height: 70px;
  border-radius: 21px;
}
.welcome .eyebrow {
  font-size: 11px;
}
.welcome h1 {
  font-size: 40px;
  margin: 10px 0;
}
.welcome > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 15px;
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}
.suggestions button {
  background: #191d25;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px;
  text-align: left;
  color: #c5d5b5;
  font-size: 23px;
}
.suggestions button:hover {
  border-color: #6b8156;
  background: #20271d;
}
.suggestions strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #eceff5;
  margin: 12px 0 6px;
}
.suggestions span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.composer-wrap {
  padding: 0 30px 13px;
  width: 100%;
  max-width: 920px;
  margin: auto;
}
.notice {
  font-size: 13px;
  color: #bac5ad;
  background: #1d251b;
  border: 1px solid #35432d;
  padding: 11px 14px;
  border-radius: 9px;
  margin-bottom: 12px;
}
.notice button {
  color: var(--accent);
  font-size: 13px;
  padding: 0;
  margin-left: 8px;
}
.composer {
  border: 1px solid #414754;
  background: #1d212a;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 25px #0002;
}
.composer textarea {
  background: transparent;
  border: 0;
  padding: 2px 0;
  resize: vertical;
  max-height: 200px;
  min-height: 58px;
}
.composer-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
}
.attach {
  color: #b9c1cf;
  cursor: pointer;
  font-size: 24px;
}
.attach span {
  font-size: 13px;
}
.file-hint {
  color: #8993a2;
  font-size: 12px;
}
.send {
  margin-left: auto;
  border-radius: 10px;
  background: var(--accent);
  color: #17210e;
  font-size: 24px;
  width: 38px;
  height: 38px;
}
.composer-foot {
  font-size: 11px;
  text-align: center;
  color: #8991a0;
  margin-top: 10px;
}
.file-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.file-list span {
  font-size: 12px;
  padding: 4px 8px;
  background: #303742;
  border-radius: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.bubble {
  max-width: 820px;
  margin: 20px auto;
  overflow-wrap: anywhere;
}
.bubble .role {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.bubble.user .body {
  background: #252c36;
  margin-left: auto;
  padding: 15px 20px;
  border-radius: 16px 16px 3px 16px;
  width: fit-content;
  max-width: 90%;
  white-space: pre-wrap;
}
.bubble.assistant .body {
  white-space: pre-wrap;
  line-height: 1.75;
}
.bubble pre {
  background: #080b10;
  border: 1px solid var(--line);
  padding: 18px;
  overflow: auto;
  white-space: pre;
  border-radius: 10px;
  font-size: 14px;
}
.bubble code {
  font-family: Consolas, monospace;
}
.settings {
  overflow: auto;
  padding: 35px clamp(20px, 5vw, 80px) 60px;
  flex: 1;
}
.section-heading {
  margin-bottom: 30px;
}
.section-heading h1 {
  margin: 8px 0;
}
.section-heading p,
.panel p {
  color: var(--muted);
  font-size: 14px;
}
.tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 20px;
  font-size: 14px;
}
.subtle {
  color: var(--muted);
  font-size: 12px;
}
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  margin-bottom: 22px;
}
.panel p {
  margin: 12px 0;
}
.panel summary {
  cursor: pointer;
  font-size: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.primary {
  background: var(--accent);
  border-radius: 9px;
  padding: 11px 18px;
  color: #17210e;
  font-weight: 600;
  font-size: 14px;
}
.form-grid .primary {
  justify-self: start;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.dropzone {
  margin: 20px 0;
  border: 1px dashed #525e48;
  background: #20271e;
  text-align: center;
  border-radius: 10px;
  padding: 24px;
  cursor: pointer;
  color: #cfe7b7;
  font-size: 24px;
}
.dropzone strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}
.dropzone span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 17px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card p {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.card strong {
  font-size: 15px;
  font-weight: 500;
}
.card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.card-actions button {
  font-size: 13px;
  padding: 7px;
}
.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.copy-row input {
  font-family: Consolas, monospace;
  font-size: 14px;
}
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, #253023 0, transparent 60%);
}
.login {
  max-width: 420px;
  width: 100%;
}
.login .brand {
  margin-bottom: 45px;
}
.login h1 {
  font-size: 32px;
}
.login p {
  color: var(--muted);
  margin: 14px 0 28px;
}
.login label {
  margin-top: 20px;
}
.login .primary {
  margin-top: 24px;
  width: 100%;
}
.error {
  color: #ff9b9b !important;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(90vw, 700px);
  border: 1px solid #586345;
  border-radius: 12px;
  background: #282f24;
  padding: 14px 22px;
  box-shadow: 0 5px 30px #0008;
  font-size: 14px;
}
.mobile {
  display: none;
}
@media (min-width: 1500px) {
  .welcome {
    margin-top: 10vh;
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 230px 1fr;
  }
  .brand small {
    display: none;
  }
  .header-end #availability {
    display: none;
  }
  .suggestions {
    gap: 8px;
  }
  .suggestions button {
    padding: 12px;
  }
  .welcome h1 {
    font-size: 34px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .shell main {
    height: 100dvh;
  }
  .mobile {
    display: block;
  }
  aside {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    z-index: 10;
  }
  aside.open {
    display: flex;
  }
  .brand small {
    display: block;
  }
  header {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
  }
  #pageTitle {
    flex: 1;
    font-size: 13px;
  }
  .header-end {
    gap: 0;
  }
  .chat-toolbar {
    padding: 14px 16px;
  }
  .chat-toolbar select {
    max-width: 190px;
  }
  .messages {
    padding: 0 18px 20px;
  }
  .welcome {
    margin: 3vh auto 0;
  }
  .welcome-mark {
    width: 54px;
    height: 54px;
    font-size: 34px;
    margin-bottom: 18px;
  }
  .welcome h1 {
    font-size: 30px;
  }
  .welcome > p:not(.eyebrow) {
    font-size: 14px;
  }
  .suggestions {
    grid-template-columns: 1fr;
    margin-top: 25px;
    gap: 8px;
  }
  .suggestions button {
    display: grid;
    grid-template-columns: 30px 1fr;
    column-gap: 12px;
    padding: 11px 14px;
    align-items: center;
    font-size: 21px;
  }
  .suggestions strong {
    margin: 0;
    font-size: 14px;
  }
  .suggestions span {
    grid-column: 2;
  }
  .composer-wrap {
    padding: 0 12px max(10px, env(safe-area-inset-bottom));
  }
  .composer {
    padding: 12px;
  }
  .composer-foot,
  .file-hint {
    display: none;
  }
  .notice {
    font-size: 12px;
    padding: 9px 12px;
  }
  .notice button {
    display: block;
    margin: 3px 0 0;
  }
  .settings {
    padding: 25px 16px 40px;
  }
  .settings h1 {
    font-size: 30px;
  }
  .panel {
    padding: 18px;
  }
  .row {
    flex-wrap: wrap;
  }
  .tabs .subtle {
    display: none;
  }
  .card {
    align-items: flex-start;
    flex-direction: column;
  }
  .copy-row {
    flex-wrap: wrap;
  }
  .copy-row input {
    flex: 1;
    min-width: 180px;
  }
  .badge {
    font-size: 9px;
  }
  .bubble.user .body {
    max-width: 95%;
  }
}
.answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.answer-actions a {
  color: inherit;
  text-decoration: none;
}
.composer-wrap {
  flex-shrink: 0;
}
@media (min-width: 701px) and (max-height: 800px) {
  .welcome {
    margin-top: 0;
  }
  .welcome-mark {
    margin-bottom: 12px;
    width: 50px;
    height: 50px;
    font-size: 32px;
  }
  .suggestions {
    margin-top: 20px;
  }
}
