:root {
  --bg: #f5f7fa;
  --paper: #fff;
  --ink: #24334b;
  --muted: #647187;
  --line: #dce3ed;
  --blue: #305bb9;
  --soft: #eef3fc;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
label.upload-zone {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
.upload-zone:focus-within {
  outline: 3px solid #537bd3;
  outline-offset: 4px;
}
button,
a {
  transition:
    background 0.15s,
    color 0.15s;
}
.skip {
  position: absolute;
  top: -80px;
  left: 20px;
  background: var(--blue);
  color: #fff;
  z-index: 100;
  padding: 16px;
}
.skip:focus {
  top: 15px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 86px;
  padding: 0 4.5%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--blue);
  border-radius: 8px;
  color: #fff;
  width: 34px;
  height: 37px;
}
.brand-icon svg {
  width: 23px;
  height: 23px;
}
.brand-light {
  font-weight: 400;
  color: var(--muted);
}
.header nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: var(--muted);
}
.header nav a {
  padding: 16px 0;
}
.active-nav {
  color: var(--blue) !important;
}
.source-link {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 14px;
  display: flex;
  gap: 18px;
}
.source-link:hover {
  background: var(--soft);
}
.main {
  max-width: 1550px;
  margin: auto;
  padding: 0 4.5%;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 43px 0 33px;
}
.kicker {
  font-size: 11px;
  letter-spacing: 1.8px;
  color: var(--blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
.kicker > span {
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(37px, 3.9vw, 56px);
  line-height: 1.12;
  letter-spacing: -2px;
  font-weight: 500;
  margin: 18px 0;
}
.hero h1 > span {
  color: #7b8ba4;
}
.hero > div > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  padding-right: 15px;
}
.hero-note svg {
  color: var(--blue);
  width: 27px;
  height: 27px;
}
.workspace {
  display: grid;
  grid-template-columns: 250px minmax(300px, 1fr) 250px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px #24334b04;
  overflow: hidden;
  scroll-margin-top: 15px;
}
.workspace-top {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.workspace-top > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.workspace-top strong {
  font-weight: 600;
}
.workspace-top > div > span:last-child {
  color: var(--muted);
}
.workspace-icon {
  background: var(--soft);
  color: var(--blue);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 650;
}
.divider {
  color: #bac5d5;
}
.badge {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.panel {
  padding: 22px 18px;
  min-width: 0;
}
.library {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #fbfcfe;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
}
.section-heading h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.small-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}
.library-intro {
  text-align: center;
  padding: 34px 5px 20px;
}
.library-intro svg {
  width: 34px;
  height: 34px;
  color: #7e91ae;
  margin: auto;
}
.library-intro h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 15px 0 9px;
}
.library-intro p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.library:has(.doc) .library-intro {
  display: none;
}
.doc {
  display: block;
  text-align: left;
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  font-size: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.doc.active {
  border-color: #7193d4;
  background: var(--soft);
}
.doc small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed #9aabc7;
  border-radius: 8px;
  padding: 22px 10px;
  position: relative;
  cursor: pointer;
  background: #f6f9ff;
}
.upload-zone:hover {
  background: #edf3ff;
}
.upload-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  font-size: 21px;
  border-radius: 6px;
}
.upload-zone strong {
  font-size: 13px;
  font-weight: 500;
}
.upload-zone > span:last-of-type {
  font-size: 10px;
  color: var(--muted);
}
.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.library-bottom {
  margin-top: auto;
  padding-top: 38px;
}
.private-note {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}
.private-note > span {
  color: var(--blue);
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 15px;
  font-size: 13px;
  font-weight: 500;
  min-height: 42px;
}
.primary {
  background: var(--blue);
  color: #fff;
}
.primary:hover {
  background: #244790;
}
.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover {
  background: var(--soft);
}
.full {
  width: 100%;
}
.muted {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 14px 0 0;
}
.conversation {
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 570px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  min-width: 36px;
  min-height: 36px;
  padding: 5px;
}
.icon-button:hover {
  background: var(--soft);
}
.icon-button svg {
  width: 14px;
  height: 14px;
}
.conversation-intro {
  text-align: center;
  padding: 23px 10px 10px;
}
.assistant-mark {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border: 1px solid #cdd9f0;
  border-radius: 14px;
  background: var(--soft);
  color: var(--blue);
  margin: 0 auto 15px;
  transform: rotate(-6deg);
}
.assistant-mark svg {
  width: 27px;
  height: 27px;
}
.conversation-intro .small-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--blue);
}
.conversation-intro h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin: 12px 0;
}
.conversation-intro > p:last-child {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
#messages {
  overflow: auto;
  max-height: 310px;
  scrollbar-width: thin;
  margin: 14px 0;
}
.message {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: #f8faff;
  border-radius: 8px;
  margin: 9px 0;
  overflow-wrap: anywhere;
}
.message strong {
  display: block;
  font-size: 11px;
  color: var(--blue);
  margin-bottom: 5px;
  font-weight: 600;
}
.message.user {
  background: var(--soft);
  margin-left: 20px;
}
#messages:not(:has(.user)) .message:first-child {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  margin: 0;
  padding: 3px;
}
#messages:not(:has(.user)) .message:first-child strong {
  display: none;
}
.conversation:has(.user) .conversation-intro {
  display: none;
}
.suggestions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 6px 0 22px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  text-align: left;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px 10px;
  border-radius: 6px;
  min-height: 35px;
}
.chip:hover {
  background: var(--soft);
  color: var(--blue);
}
.chip > span {
  margin-left: auto;
  color: var(--blue);
}
.composer {
  margin-top: auto;
  border: 1px solid #b9c9e4;
  border-radius: 9px;
  padding: 12px;
  background: #fff;
}
.composer > label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}
.composer > div {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}
.composer textarea {
  width: 100%;
  min-width: 0;
  min-height: 51px;
  max-height: 180px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  padding: 4px 0;
}
.composer textarea::placeholder {
  color: #6d7e96;
}
.composer > p {
  font-size: 10px;
  color: var(--muted);
  margin: 8px 0 0;
}
.send-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex-shrink: 0;
  padding: 8px;
}
.send-button svg {
  width: 20px;
  height: 20px;
}
.status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  min-height: 17px;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}
.status.error {
  color: #a1322d;
}
.evidence {
  border-left: 1px solid var(--line);
  background: #fafbfd;
  display: flex;
  flex-direction: column;
}
.section-heading > svg {
  width: 16px;
  height: 16px;
  color: #7f91ac;
}
.evidence-caption {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 22px 0 15px;
  line-height: 1.7;
}
.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: white;
  min-height: 160px;
}
.source-number {
  font-size: 10px;
  background: var(--soft);
  color: var(--blue);
  border-radius: 4px;
  padding: 5px;
  margin-right: 6px;
}
.source-card .badge {
  border: 0;
  padding: 3px;
  font-size: 11px;
}
.source {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 300px;
  overflow: auto;
  margin-top: 20px;
}
.evidence-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 0;
  color: var(--blue);
}
.evidence-note > span {
  font-size: 23px;
  line-height: 1;
}
.evidence-note p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: var(--ink);
}
.evidence-note p > span {
  font-size: 11px;
  color: var(--muted);
}
.provider-note {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.status-dot {
  margin-top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a87838;
  flex-shrink: 0;
}
.provider-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}
.provider-note small {
  font-size: 10px;
  color: var(--muted);
}
.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 34px 0 43px;
}
.workflow article {
  display: flex;
  gap: 15px;
}
.workflow article > span {
  font-size: 11px;
  color: var(--blue);
  padding-top: 3px;
}
.workflow h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}
.workflow p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 4.5%;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: #fff;
}
.foot a {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 36px;
}
dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(480px, calc(100% - 32px));
  max-height: calc(100% - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 28px;
  background: white;
  color: var(--ink);
  box-shadow: 0 20px 80px #10264840;
}
dialog::backdrop {
  background: #14233999;
  backdrop-filter: blur(3px);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.modal-heading h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  font-weight: 500;
  margin: 10px 0 0;
}
.modal-heading .kicker {
  font-size: 10px;
  margin: 0;
}
.modal-heading .icon-button {
  font-size: 24px;
}
.stack > .muted {
  margin: 0;
  font-size: 13px;
}
.stack label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.stack input:not([type='checkbox']) {
  width: 100%;
  min-width: 0;
  border: 1px solid #aebdd3;
  padding: 12px;
  border-radius: 6px;
  color: var(--ink);
  background: white;
  font-size: 14px;
}
.stack .checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.checkbox-label input {
  width: 17px;
  height: 17px;
}
.name-fields {
  display: none;
  gap: 14px;
}
.name-fields > label {
  flex: 1;
  min-width: 0;
}
.stack:has(#register-mode:checked) .name-fields {
  display: flex;
}
.stack .primary {
  font-size: 13px;
  min-height: 46px;
}
.stack .status {
  margin: 0;
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 270px minmax(350px, 1fr) 270px;
  }
  .conversation {
    min-height: 610px;
  }
  .conversation-intro {
    padding-top: 40px;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 220px minmax(300px, 1fr);
  }
  .evidence {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 10px 24px;
  }
  .evidence .section-heading {
    grid-column: 1/-1;
  }
  .evidence-caption {
    display: none;
  }
  .source-card {
    grid-row: 2/4;
    min-height: 130px;
  }
  .evidence-note {
    padding: 10px 0;
  }
  .provider-note {
    margin: 0;
  }
  .hero-note {
    display: none;
  }
  .brand {
    font-size: 19px;
  }
  .workspace-top .badge {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  .header {
    height: 72px;
    padding: 0 20px;
  }
  .header nav,
  .source-link {
    display: none;
  }
  .brand {
    font-size: 19px;
  }
  .main {
    padding: 0 18px;
  }
  .hero {
    padding: 32px 0 26px;
  }
  .hero h1 {
    font-size: 40px;
    letter-spacing: -1.6px;
  }
  .hero > div > p:last-child {
    font-size: 14px;
  }
  .kicker {
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  .desktop-break {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .workspace-top {
    padding: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .workspace-top > div {
    font-size: 12px;
    gap: 9px;
  }
  .workspace-top .badge {
    font-size: 10px;
  }
  .library {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }
  .library-intro {
    padding: 18px 0;
  }
  .library-intro svg {
    width: 26px;
    height: 26px;
  }
  .library-intro h3 {
    margin: 8px 0;
  }
  .library-intro p {
    font-size: 13px;
  }
  .upload-zone {
    padding: 18px 10px;
    gap: 8px;
  }
  .upload-zone > span:last-of-type {
    font-size: 12px;
  }
  .library-bottom {
    padding-top: 17px;
  }
  .muted {
    font-size: 12px;
  }
  .conversation {
    padding: 18px;
    min-height: 570px;
  }
  .conversation-intro {
    padding: 22px 0 10px;
  }
  .conversation-intro h2 {
    font-size: 29px;
  }
  .conversation-intro > p:last-child {
    font-size: 14px;
  }
  .suggestions {
    gap: 8px;
  }
  .chip {
    font-size: 12px;
    min-height: 44px;
  }
  .section-heading h2 {
    font-size: 13px;
  }
  .icon-button {
    min-height: 44px;
    min-width: 44px;
  }
  .message {
    font-size: 14px;
  }
  .composer {
    padding: 12px;
  }
  .composer textarea {
    font-size: 14px;
  }
  .composer > label {
    font-size: 12px;
  }
  .composer > p {
    font-size: 11px;
  }
  .send-button {
    height: 44px;
    width: 44px;
    min-height: 44px;
  }
  .evidence {
    padding: 18px;
    display: flex;
  }
  .evidence-note {
    padding: 12px 0;
  }
  .evidence-caption {
    display: block;
    font-size: 10px;
    margin: 8px 0;
  }
  .source-card {
    min-height: 140px;
  }
  .evidence-note p,
  .evidence-note p > span {
    font-size: 13px;
  }
  .provider-note {
    padding: 13px;
  }
  .provider-note p {
    font-size: 13px;
  }
  .provider-note small {
    font-size: 12px;
  }
  .source {
    font-size: 14px;
  }
  .workflow {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 5px;
  }
  .workflow h2 {
    font-size: 14px;
  }
  .workflow p {
    font-size: 13px;
  }
  .foot {
    padding: 20px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .primary,
  .secondary {
    font-size: 14px;
    min-height: 44px;
  }
  .status {
    font-size: 13px;
  }
  dialog {
    padding: 22px;
  }
  .modal-heading h2 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 700px) {
  .composer textarea,
  .stack input:not([type='checkbox']) {
    font-size: 16px;
  }
}

.auth-divider{text-align:center;color:var(--muted);font-size:12px;margin:0}.verifying-email label:has(#password),.verifying-email .checkbox-label,.verifying-email .name-fields{display:none!important}.verifying-email #verification-step{display:flex}.stack #auth-setup{font-size:12px;margin:0}.stack #verification-code{letter-spacing:7px;font-size:21px}.verifying-email #google-login,.verifying-email .auth-divider{display:none}
