:root {
  color-scheme: light;
  --blue: #0066cc;
  --blue-hover: #0071e3;
  --ink: #1d1d1f;
  --ink-secondary: #515154;
  --ink-tertiary: #76767b;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --hairline: rgba(29, 29, 31, 0.1);
  --hairline-strong: rgba(29, 29, 31, 0.16);
  --focus: #0071e3;
  --success: #238636;
  --radius-shell: 24px;
  --radius-control: 14px;
  --font-ui: "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "SF Pro Display", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--parchment);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--parchment);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.app-header {
  position: relative;
  z-index: 10;
  height: 56px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.header-inner {
  width: min(calc(100% - 40px), 1720px);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand-lockup strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup span,
.version-tag {
  display: none;
}

.header-promise {
  margin: 0;
  color: var(--ink-tertiary);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.1px;
}

.header-meta {
  justify-self: end;
}

.live-status {
  min-height: 30px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--ink-secondary);
  background: var(--parchment);
  font-size: 12px;
  font-weight: 500;
}

.live-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.product-shell {
  width: min(calc(100% - 24px), 1720px);
  height: calc(100dvh - 72px);
  margin: 8px auto;
  display: grid;
  grid-template-columns: minmax(420px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
}

.exploration-sidebar,
.chat-workspace {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-shell);
}

.exploration-sidebar {
  padding: clamp(34px, 4.3vw, 68px) clamp(30px, 3.5vw, 56px) 28px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #f0f0f2;
}

.sidebar-intro {
  align-self: center;
  max-width: 520px;
}

.eyebrow {
  display: none;
}

.sidebar-intro h1 {
  max-width: 8em;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(44px, 3.25vw, 58px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.sidebar-intro > p:last-child {
  max-width: 27em;
  margin: 0;
  color: var(--ink-secondary);
  font-size: 17px;
  font-weight: 450;
  line-height: 1.65;
  letter-spacing: -0.12px;
}

.journey-section {
  padding-top: 18px;
  border-top: 1px solid var(--hairline-strong);
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading > span {
  color: var(--ink-tertiary);
  font-size: 12px;
  font-weight: 500;
}

.section-heading small {
  display: none;
}

.journey-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
}

.journey-list li {
  min-width: 0;
  padding-top: 11px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  border-top: 2px solid #d1d1d6;
}

.journey-list li.is-current {
  border-top-color: var(--blue);
}

.journey-list li > span {
  color: var(--ink-tertiary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.journey-list strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.journey-list p {
  margin: 3px 0 0;
  color: var(--ink-tertiary);
  font-size: 11px;
  line-height: 1.45;
}

.journey-list .is-current > span,
.journey-list .is-current strong {
  color: var(--blue);
}

.collection-section {
  display: none;
}

.chat-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--hairline);
  background: var(--canvas);
}

.chat-workspace-header {
  min-height: 88px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.94);
}

.assistant-identity {
  min-width: 0;
  display: flex;
  align-items: center;
}

.assistant-avatar,
.assistant-title-row span,
.output-preview {
  display: none;
}

.assistant-title-row h2 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.45px;
}

.assistant-identity p {
  margin: 0;
  overflow: hidden;
  color: var(--ink-tertiary);
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reset-button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 8px 4px 8px 12px;
  border-radius: 8px;
  color: var(--blue);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.reset-button:hover {
  color: var(--blue-hover);
  background: rgba(0, 102, 204, 0.06);
}

.reset-button span {
  margin-right: 5px;
}

.chat-container,
.demo-chat {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.demo-chat {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  background: var(--pearl);
}

.demo-chat-scroll {
  min-height: 0;
  overflow: auto;
  padding: clamp(34px, 4.2vw, 64px) clamp(30px, 4.5vw, 72px) 30px;
  overscroll-behavior: contain;
  scrollbar-color: #c7c7cc transparent;
  scrollbar-width: thin;
}

.message {
  width: min(78%, 760px);
  margin: 0 0 30px;
  display: grid;
}

.message-user {
  width: min(66%, 640px);
  margin-left: auto;
}

.message-avatar {
  display: none;
}

.message-bubble {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: -0.18px;
  overflow-wrap: anywhere;
}

.message-assistant .message-bubble {
  padding: 0;
}

.message-user .message-bubble {
  padding: 17px 22px;
  border-radius: 20px 20px 6px 20px;
  color: #fff;
  background: var(--blue);
}

.message-heading {
  display: inline-block;
  margin-bottom: 3px;
  font-weight: 650;
}

.message-list-line {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 4px;
}

.message-list-line i {
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
}

.message-list-line:not(.numbered) i::after {
  content: "•";
}

.message-table-wrap {
  max-width: 100%;
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--canvas);
}

.message-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.message-table th,
.message-table td {
  min-width: 120px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.message-table th {
  font-weight: 600;
  background: var(--parchment);
}

.typing {
  color: var(--ink-tertiary);
}

.typing::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 8px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  animation: thinking 1.25s ease-in-out infinite;
}

.quick-prompts {
  padding: 8px clamp(24px, 3vw, 48px) 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.quick-prompt {
  min-width: 0;
  min-height: 48px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--hairline-strong);
  color: var(--ink-secondary);
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.quick-prompt:hover {
  border-top-color: var(--blue);
  color: var(--blue);
}

.quick-prompt-index {
  display: none;
}

.quick-prompt-arrow {
  justify-self: end;
  color: var(--blue);
  font-size: 17px;
  font-weight: 400;
}

.chat-form {
  padding: 10px clamp(24px, 3vw, 48px) 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  background: var(--pearl);
}

.chat-form textarea {
  width: 100%;
  min-height: 58px;
  max-height: 120px;
  resize: none;
  padding: 16px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  color: var(--ink);
  background: var(--canvas);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.045);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.chat-form textarea::placeholder {
  color: #77777c;
  opacity: 1;
}

.chat-form textarea:hover {
  border-color: rgba(29, 29, 31, 0.24);
}

.chat-form textarea:focus {
  border-color: rgba(0, 102, 204, 0.5);
  box-shadow: 0 10px 34px rgba(0, 102, 204, 0.08);
}

.chat-form button {
  min-width: 88px;
  min-height: 52px;
  padding: 12px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 160ms ease, transform 160ms ease;
}

.chat-form button:hover:not(:disabled) {
  background: var(--blue-hover);
}

.chat-form button:active:not(:disabled) {
  transform: scale(0.97);
}

.chat-form button i {
  font-size: 17px;
  font-style: normal;
}

.chat-loading {
  height: 100%;
  display: grid;
  place-content: center;
  color: var(--ink-secondary);
  text-align: center;
}

.chat-loading strong {
  font-size: 17px;
  font-weight: 600;
}

.chat-loading p {
  margin: 5px 0 0;
  color: var(--ink-tertiary);
  font-size: 13px;
}

@keyframes thinking {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.75);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes settle-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .exploration-sidebar,
  .chat-workspace {
    animation: settle-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .chat-workspace {
    animation-delay: 70ms;
  }
}

@media (max-width: 1180px) {
  .product-shell {
    grid-template-columns: 350px minmax(0, 1fr);
  }

  .exploration-sidebar {
    padding: 36px 24px 24px;
  }

  .sidebar-intro h1 {
    font-size: 38px;
    letter-spacing: -0.03em;
  }

  .sidebar-intro > p:last-child {
    font-size: 15px;
  }

  .journey-list {
    gap: 14px;
  }

  .journey-list p {
    display: none;
  }

  .quick-prompts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 6px;
  }
}

@media (max-width: 760px), (max-height: 520px) and (max-width: 960px) {
  body {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .app-header {
    height: 52px;
  }

  .header-inner {
    width: calc(100% - 24px);
    grid-template-columns: 1fr auto;
  }

  .header-promise {
    display: none;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
  }

  .brand-lockup strong {
    font-size: 14px;
  }

  .live-status {
    padding: 5px 9px;
  }

  .product-shell {
    width: 100%;
    height: calc(100dvh - 52px);
    min-height: 0;
    margin: 0;
    display: block;
  }

  .exploration-sidebar {
    display: none;
  }

  .chat-workspace {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .demo-chat {
    display: flex;
    flex-direction: column;
  }

  .chat-workspace-header {
    min-height: 68px;
    padding: 14px 16px;
  }

  .assistant-title-row h2 {
    font-size: 18px;
  }

  .assistant-identity p {
    max-width: 58vw;
    font-size: 12px;
  }

  .reset-button {
    padding-left: 8px;
    font-size: 12px;
  }

  .demo-chat-scroll {
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(100% - 184px);
    padding: 24px 18px 16px;
  }

  .message,
  .message-user {
    width: 100%;
    margin-bottom: 20px;
  }

  .message-bubble {
    font-size: 16px;
    line-height: 1.65;
  }

  .message-user {
    width: 88%;
  }

  .quick-prompts {
    flex: 0 0 auto;
    padding: 6px 16px 8px;
    grid-template-columns: 1fr 1fr;
    gap: 2px 16px;
    background: var(--pearl);
  }

  .quick-prompt {
    min-height: 44px;
    padding: 8px 0;
    font-size: 12px;
  }

  .chat-form {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 6px 12px max(12px, env(safe-area-inset-bottom));
    gap: 8px;
  }

  .chat-form textarea {
    min-height: 54px;
    padding: 14px 15px;
    font-size: 15px;
  }

  .chat-form button {
    min-width: 64px;
    min-height: 52px;
    padding: 10px 15px;
  }

  .chat-form button i {
    display: none;
  }
}

@media (max-width: 420px) {
  .message-user {
    width: 94%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-header {
    background: var(--canvas);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
