:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242424;
  background: #fff;
  font-synthesis: none;
  --muted: #777;
  --line: #e8e8e8;
  --soft: #f7f7f7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  display: flex;
  min-height: 100dvh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9ec8f5;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sidebar {
  width: 252px;
  flex-shrink: 0;
  background: #f8f8f8;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 16px;
  height: 100dvh;
  position: sticky;
  top: 0;
}
.brand {
  font-size: 21px;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: #242424;
  font-weight: 650;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
}
.brand-mark {
  font-size: 30px;
  font-weight: 400;
}
.new-chat {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: left;
  padding: 12px;
  margin: 30px 0;
  color: #333;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.new-chat:hover {
  background: #eee;
}
.new-chat span {
  font-size: 22px;
  line-height: 12px;
}
.side-section {
  font-size: 10px;
  color: #888;
  font-weight: 650;
  letter-spacing: 1.5px;
  padding: 0 12px;
  margin: 6px 0 12px;
}
.side-link {
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  padding: 12px;
  font-size: 14px;
  color: #555;
  display: flex;
  gap: 10px;
  align-items: center;
}
.side-link.active {
  background: #eaeaea;
  color: #222;
}
.side-link:hover {
  background: #eee;
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  margin-bottom: 8px;
}
.chat-item {
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  padding: 9px 12px;
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.chat-item:hover {
  background: #eee;
}
.chat-item.active {
  background: #eaeaea;
  color: #222;
}
.sign-out {
  margin-left: auto;
  font-size: 12px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 16px 4px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  height: 33px;
  width: 33px;
  display: grid;
  place-items: center;
  background: #e4e4e4;
  border-radius: 50%;
  font-size: 13px;
}
.sidebar-bottom strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.sidebar-bottom small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
main {
  flex: 1;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
header {
  height: 76px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.header-title {
  font-size: 19px;
  font-weight: 550;
  letter-spacing: -0.4px;
}
.muted {
  color: #aaa;
  margin-left: 7px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.preview-badge {
  border: 1px solid #e6e6e6;
  padding: 5px 10px;
  border-radius: 20px;
  color: #888;
  font-size: 11px;
}
.quiet-button {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #555;
  padding: 8px;
}
.quiet-button:hover {
  background: var(--soft);
  border-radius: 8px;
}
.onboarding {
  width: min(440px, calc(100% - 48px));
  margin: auto;
  transform: translateY(-20px);
  padding: 28px 0;
}
.intro-mark {
  font-size: 45px;
  line-height: 1;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #909090;
  font-weight: 600;
  margin: 0 0 13px;
}
h1 {
  font-size: 31px;
  line-height: 1.2;
  font-weight: 550;
  letter-spacing: -1px;
  margin: 0 0 14px;
}
.subtitle {
  font-size: 14px;
  color: #777;
  line-height: 1.65;
  margin: 0 0 28px;
  max-width: 400px;
}
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  width: 150px;
}
.progress span {
  height: 3px;
  background: #e8e8e8;
  flex: 1;
  border-radius: 3px;
}
.progress span.done {
  background: #303030;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: #555;
  margin-bottom: 9px;
}
.field-input {
  width: 100%;
  height: 52px;
  border: 1px solid #dcdcdc;
  background: #fff;
  border-radius: 10px;
  padding: 0 14px;
  outline: none;
  font-size: 16px;
  color: #333;
}
.field-input:focus {
  border-color: #777;
  box-shadow: 0 0 0 2px #eee;
}
.phone-fields {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 9px;
}
.field-hint {
  font-size: 12px;
  color: #999;
  margin-top: 10px;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.primary-button {
  border: 0;
  border-radius: 10px;
  background: #242424;
  color: #fff;
  padding: 14px 20px;
  font-size: 14px;
  flex: 1;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  min-height: 49px;
}
.primary-button:hover {
  background: #444;
}
.back-button {
  border: 0;
  background: transparent;
  padding: 13px 8px;
  color: #888;
  font-size: 13px;
}
.setup-note {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  margin-top: 22px;
  line-height: 1.6;
}
.form-error {
  font-size: 13px;
  line-height: 1.5;
  color: #ae342b;
  margin: 14px 0 0;
}
.gender-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gender-option {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  text-align: left;
  font-size: 14px;
  color: #555;
}
.gender-option.selected {
  border-color: #333;
  background: #f5f5f5;
  color: #222;
}
.place-options {
  margin-top: 8px;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  overflow: hidden;
  max-height: 225px;
  overflow-y: auto;
}
.place-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.place-option:last-child {
  border-bottom: 0;
}
.place-option:hover {
  background: #f4f4f4;
}
.place-status {
  font-size: 12px;
  padding: 13px;
  color: #888;
}
.place-selected {
  font-size: 12px;
  color: #4c7555;
  margin-top: 12px;
  line-height: 1.5;
}
.review-list {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 4px 16px;
}
.review-row {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  font-size: 13px;
  padding: 13px 0;
  border-bottom: 1px solid #eee;
}
.review-row:last-child {
  border-bottom: 0;
}
.review-row span:first-child {
  color: #888;
}
.review-row span:last-child {
  text-align: right;
  max-width: 270px;
  line-height: 1.5;
}
.conversation {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.chat-welcome {
  width: min(730px, calc(100% - 48px));
  margin: auto;
  text-align: center;
  transform: translateY(-15px);
}
.ready-label {
  font-size: 12px;
  color: #6f7a70;
  display: inline-block;
  margin-bottom: 21px;
}
.chat-welcome h1 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -1px;
}
.chat-welcome > p {
  color: #888;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 15px;
}
.chart-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.chart-chip {
  padding: 8px 12px;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 18px;
  color: #777;
  font-size: 11px;
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 560px;
  margin: 35px auto 20px;
}
.suggestions button {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  color: #555;
  text-align: left;
  padding: 17px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.suggestions button span {
  color: #aaa;
}
.suggestions button:hover {
  background: #fafafa;
  border-color: #bbb;
}
.messages {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 15px max(24px, calc((100% - 760px) / 2)) 30px;
}
.messages:empty {
  display: none;
}
.message {
  padding: 15px 0;
  line-height: 1.8;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.message.user {
  align-items: flex-end;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.message.user .message-text {
  border-radius: 20px;
  padding: 11px 18px;
  background: #f1f1f1;
  max-width: 88%;
}
.message.assistant .message-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
  color: #555;
}
.message.failed .message-text {
  color: #9a5550;
}
.citation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}
.citation-label {
  width: 100%;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
}
.citation {
  border: 1px solid #e1e1e1;
  background: #fafafa;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 10px;
  color: #777;
  max-width: 100%;
  line-height: 1.5;
}
.thinking {
  font-size: 13px;
  color: #888;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.thinking:before {
  content: "";
  width: 8px;
  height: 8px;
  background: #888;
  border-radius: 50%;
  animation: breathe 1.4s ease-in-out infinite;
}
.composer-area {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 16px;
  flex-shrink: 0;
}
.composer {
  border: 1px solid #dfdfdf;
  border-radius: 22px;
  background: #fff;
  padding: 15px 15px 10px;
  box-shadow: 0 2px 6px #00000004;
}
.composer textarea {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  max-height: 150px;
  line-height: 1.5;
  font-size: 14px;
  padding: 0 3px;
  color: #333;
  background: transparent;
}
.composer textarea::placeholder {
  color: #aaa;
}
.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.composer select {
  border: 0;
  background: transparent;
  color: #999;
  font-size: 11px;
  outline: 0;
  padding: 6px 0;
}
.send-button {
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  background: #262626;
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 23px;
  line-height: 1;
}
.chat-note {
  font-size: 10px;
  color: #aaa;
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.6;
}
.chat-error {
  margin: 0 0 10px;
}
.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #666;
}
.icon-button:hover {
  background: #eee;
}
.mobile-only {
  display: none;
}
.loading-screen {
  position: absolute;
  inset: 76px 0 0;
  background: #ffffffed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #888;
}
.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-top-color: #444;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
dialog {
  width: min(540px, calc(100% - 32px));
  max-height: 90dvh;
  border: 1px solid #e3e3e3;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 20px 80px #0002;
  color: #333;
}
dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.dialog-top h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.7px;
  margin: 0;
}
.dialog-top .eyebrow {
  font-size: 9px;
}
#chart-summary {
  color: #888;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 18px;
}
#chart-drawing {
  max-width: 310px;
  margin: 22px auto;
}
.chart-table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 10px 5px;
  border-bottom: 1px solid #eee;
}
th {
  font-weight: 500;
  color: #999;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.chart-method {
  font-size: 10px;
  color: #999;
  text-align: center;
  margin-top: 20px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes breathe {
  50% {
    opacity: 0.25;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 210px;
  }
  header {
    padding: 0 24px;
  }
  .chat-welcome h1 {
    font-size: 30px;
  }
  .onboarding {
    transform: none;
  }
  h1 {
    font-size: 28px;
  }
}
@media (max-width: 680px) {
  .sidebar {
    display: none;
    position: fixed;
    z-index: 10;
    width: 252px;
    box-shadow: 10px 0 50px #0002;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-only {
    display: grid;
  }
  header {
    height: 64px;
    padding: 0 18px;
    gap: 10px;
  }
  .header-title {
    margin-right: auto;
    font-size: 18px;
  }
  .header-actions {
    gap: 5px;
  }
  .preview-badge {
    font-size: 9px;
    padding: 4px 7px;
  }
  .quiet-button {
    font-size: 11px;
  }
  .onboarding {
    width: calc(100% - 44px);
    max-width: 430px;
    padding: 18px 0 40px;
  }
  .intro-mark {
    margin-bottom: 22px;
    font-size: 35px;
  }
  h1 {
    font-size: 28px;
  }
  .subtitle {
    font-size: 13px;
    margin-bottom: 25px;
  }
  .chat-welcome {
    width: calc(100% - 40px);
    transform: none;
  }
  .chat-welcome h1 {
    font-size: 29px;
  }
  .chat-welcome > p {
    font-size: 13px;
  }
  .suggestions {
    gap: 8px;
    margin-top: 25px;
  }
  .suggestions button {
    font-size: 12px;
    padding: 14px 12px;
  }
  .chart-chips {
    gap: 5px;
  }
  .chart-chip {
    font-size: 10px;
    padding: 7px 9px;
  }
  .composer-area {
    width: calc(100% - 28px);
    padding-bottom: 12px;
  }
  .messages {
    padding: 4px 20px 20px;
  }
  .message {
    font-size: 13px;
  }
  .chat-note {
    font-size: 9px;
    padding: 0 10px;
  }
  .onboarding .setup-note {
    font-size: 10px;
  }
  dialog {
    padding: 20px;
  }
  .loading-screen {
    inset: 64px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
