:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #202536;
  background: #f6f7fb;
  font-synthesis: none;
  --accent: #4669df;
  --line: #e5e7ee;
  --muted: #788196;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.legal {
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.legal a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9bb1ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: white;
  background: var(--accent);
  border-radius: 16px;
  font-size: 26px;
  font-weight: 750;
  box-shadow: 0 8px 24px #4669df20;
}
.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 19px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  color: #8b92a5;
  font-weight: 600;
}
.auth {
  min-height: calc(100dvh - 34px);
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(320px, 420px);
  justify-content: center;
  gap: clamp(32px, 6vw, 100px);
  place-items: center;
  padding: 64px 32px;
  background: radial-gradient(ellipse at 80% 15%, #e4eaff, transparent 50%), #f6f7fb;
}
.site-brand {
  color: #202536;
  text-decoration: none;
  font-size: 24px;
  font-weight: 750;
}
.site-brand span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}
.intro .eyebrow {
  margin-top: 64px;
}
.auth .intro h1 {
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.3;
  letter-spacing: -1px;
}
.intro-copy {
  max-width: 480px;
  color: #59647a;
  line-height: 1.9;
}
.intro-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 40px 0;
}
.intro-features span {
  font-size: 12px;
  color: var(--accent);
}
.intro-features h2 {
  font-size: 16px;
  margin: 12px 0 8px;
}
.intro-features p {
  font-size: 13px;
  line-height: 1.8;
  color: #59647a;
}
.service-link {
  color: #3554bc;
  font-size: 14px;
  text-underline-offset: 5px;
}
.auth-card h2 {
  font-size: 26px;
  margin-bottom: 8px;
}
.signup-guide {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: #59647a;
}
.signup-guide summary {
  cursor: pointer;
  color: #3554bc;
  font-weight: 600;
}
@media (max-width: 820px) {
  .auth {
    grid-template-columns: minmax(0, 520px);
    padding: 32px 20px;
    gap: 32px;
  }
  .intro .eyebrow {
    margin-top: 32px;
  }
  .intro-features {
    gap: 14px;
    margin: 24px 0;
  }
  .auth-card {
    max-width: 520px;
  }
}
.auth-card {
  width: min(100%, 420px);
  padding: 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 20px 80px #243f7a09;
}
.auth h1 {
  font-size: 28px;
  margin: 22px 0 8px;
}
.auth .eyebrow {
  margin-top: 26px;
}
.auth form {
  margin-top: 30px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
input:not([type="file"]) {
  display: block;
  width: 100%;
  margin: 8px 0 18px;
  padding: 13px 14px;
  border: 1px solid #dce0ea;
  background: #fbfcfe;
  border-radius: 10px;
  outline: none;
  font-size: 16px;
}
input:focus {
  border-color: var(--accent);
}
.primary {
  width: 100%;
  background: var(--accent);
  color: white;
  padding: 14px;
  font-weight: 600;
}
.auth-note {
  font-size: 12px;
  color: #9ba1af;
  text-align: center;
  margin: 28px 0 0;
}
.error {
  font-size: 13px;
  color: #b34545;
  line-height: 1.6;
  min-height: 0;
}
.error:empty {
  display: none;
}
.app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}
aside {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 24px 16px 12px;
  display: flex;
  flex-direction: column;
  background: #f3f5fa;
}
.side-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 10px 28px;
}
.side-brand strong {
  font-size: 17px;
}
.new-chat {
  background: white;
  border: 1px solid #dce2ef;
  min-height: 46px;
  text-align: left;
  padding: 12px 16px;
  color: #3e5cc5;
  font-weight: 600;
}
.history-label {
  margin: 28px 12px 10px;
}
nav {
  overflow: auto;
  flex: 1;
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin: 3px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
nav button:hover {
  background: #e9edf6;
}
nav button.selected {
  background: #e3e9fa;
  color: #3657c7;
}
.empty-list {
  font-size: 13px;
  color: var(--muted);
  padding: 14px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 6px 4px;
}
.account strong {
  font-size: 13px;
}
.account-note {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.account .icon {
  margin-left: auto;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dfe6fa;
  display: grid;
  place-items: center;
  color: #4d65a2;
  font-weight: 600;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
header {
  height: 78px;
  flex-shrink: 0;
  border-bottom: 1px solid #f0f1f5;
  padding: 18px 32px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.heading {
  min-width: 0;
  flex: 1;
}
h2 {
  font-size: 16px;
  margin: 0 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model {
  color: var(--muted);
  font-size: 11px;
}
.icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  font-size: 23px;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon:hover {
  background: #edf0f7;
}
.mobile {
  display: none;
}
#conversation {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 32px max(24px, calc((100% - 780px) / 2));
  scroll-behavior: smooth;
}
.welcome {
  margin: clamp(24px, 10vh, 120px) auto 0;
  max-width: 580px;
}
.welcome h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.7px;
  margin: 24px 0 12px;
}
.welcome p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.suggestions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}
.suggestions button {
  border: 1px solid var(--line);
  padding: 18px 14px;
  flex: 1;
  text-align: left;
  font-size: 13px;
}
.suggestions span {
  float: right;
  color: var(--muted);
  margin-left: 12px;
}
.message {
  margin: 0 0 28px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.message .label {
  font-size: 11px;
  font-weight: 600;
  color: #8b93a6;
  margin-bottom: 8px;
  letter-spacing: 0.7px;
}
.message.user {
  margin-left: auto;
  max-width: 85%;
}
.message.user .text {
  background: #edf1fd;
  padding: 12px 18px;
  border-radius: 18px 18px 4px 18px;
}
.message.user .label {
  text-align: right;
}
.text {
  white-space: pre-wrap;
}
.text pre {
  white-space: pre;
  overflow: auto;
  background: #f4f5f8;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
}
.message a,
.attachments .chip {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4868bd;
  background: #f0f3fa;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  margin: 6px 6px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.generating {
  font-size: 13px;
  color: var(--accent);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
footer {
  padding: 12px max(24px, calc((100% - 800px) / 2)) max(10px, env(safe-area-inset-bottom));
  background: #fff;
}
.composer {
  border: 1px solid #dce1ec;
  border-radius: 20px;
  box-shadow: 0 4px 24px #243f7a06;
  padding: 8px 12px;
}
.composer:focus-within {
  border-color: #a7b8ee;
}
textarea {
  display: block;
  width: 100%;
  max-height: 160px;
  resize: none;
  outline: none;
  border: 0;
  background: transparent;
  padding: 10px 6px;
  line-height: 1.6;
  font-size: 16px;
  color: inherit;
}
.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.composer-actions .muted {
  font-size: 11px;
  flex: 1;
}
.upload {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.send {
  background: var(--accent);
  color: white;
  width: 38px;
  height: 38px;
  font-size: 24px;
  border-radius: 12px;
}
.disclaimer {
  text-align: center;
  font-size: 10px;
  color: #9da4b3;
  margin: 9px 0 0;
}
.attachments .chip button {
  padding: 1px 5px;
  font-size: 16px;
}
#stop {
  font-size: 12px;
  background: #edf0f7;
  padding: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  width: min(420px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #14203c55;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
}
.dialog-actions button {
  padding: 10px;
}
.scrim {
  position: fixed;
  inset: 0;
  background: #14203c55;
  z-index: 10;
  border-radius: 0;
}
@media (max-width: 700px) {
  .mobile {
    display: inline-grid;
  }
  aside {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 85vw);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  aside:not(.open) {
    visibility: hidden;
  }
  aside.open {
    transform: translateX(0);
    visibility: visible;
  }
  .side-brand {
    padding-bottom: 20px;
  }
  .side-brand .icon {
    margin-left: auto;
  }
  header {
    height: 70px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  #conversation {
    padding: 24px 18px;
  }
  .welcome {
    margin-top: 7vh;
  }
  .welcome h1 {
    font-size: 25px;
  }
  .suggestions {
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
  }
  .suggestions button {
    padding: 16px;
  }
  .message {
    font-size: 15px;
  }
  .message.user {
    max-width: 92%;
  }
  footer {
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  }
  .composer {
    border-radius: 18px;
  }
  .auth-card {
    padding: 28px;
  }
  .auth {
    padding: 18px;
  }
  .composer-actions .muted {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
#workspace-dialog {
  width: min(920px, 100vw);
  height: 90dvh;
  max-width: 100vw;
  max-height: 100dvh;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}
#workspace-dialog[open] {
  display: flex;
  flex-direction: column;
}
.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 12px;
}
#workspace-frame {
  border: 0;
  width: 100%;
  flex: 1;
  min-height: 0;
}
@media (max-width: 600px) {
  #workspace-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .workspace-bar {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}
/* Workspace sign-in is deliberately separate from the public product website. */
.workspace-auth {
  display: grid;
  grid-template-columns: minmax(0, 400px);
  justify-content: center;
  min-height: calc(100dvh - 40px);
  padding: 48px 24px;
  background: #f5f5f7;
}
.workspace-auth .auth-card {
  width: 100%;
  background: white;
  border: 0;
  box-shadow: 0 12px 48px #00000008;
  padding: 40px;
}
.workspace-brand {
  display: inline-block;
  color: #1d1d1f;
  font-size: 28px;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -1px;
}
.workspace-auth .eyebrow {
  letter-spacing: 0;
}
.workspace-auth .primary {
  background: #0071e3;
  border-radius: 999px;
}
#assets-open,
#plugins-open {
  min-width: 48px;
  width: auto;
  font-size: 14px;
  padding: 8px;
  white-space: nowrap;
}
