* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #000000;
  color: #ececec;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background: #000000;
}

.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 10px 8px 12px;
  background: #0d0d0d;
  border-right: 1px solid #242424;
  transition: transform 180ms ease, width 180ms ease;
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  margin-bottom: 8px;
}

.icon-button,
.sidebar-action,
.recent-button,
.account-button,
.suggestion,
.send-button,
.header-title {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
}

.icon-button:hover,
.sidebar-action:hover,
.recent-button:hover,
.account-button:hover,
.header-title:hover {
  background: #212121;
}

.cat-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: #ececec;
  color: #111111;
}

.cat-mark svg {
  width: 19px;
  height: 19px;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 14px;
}

.sidebar-action svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.sidebar-label {
  padding: 18px 10px 7px;
  color: #9b9b9b;
  font-size: 12px;
  font-weight: 600;
}

.recent-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.recent-button {
  width: 100%;
  padding: 9px 10px;
  overflow: hidden;
  border-radius: 9px;
  color: #d6d6d6;
  text-align: left;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  padding-top: 8px;
}

.sidebar-meta-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 5px 7px;
}

.sidebar-meta-nav a {
  padding: 4px 5px;
  border-radius: 6px;
  color: #8f8f8f;
  font-size: 11.5px;
  line-height: 1.2;
  text-decoration: none;
}

.sidebar-meta-nav a:hover,
.sidebar-meta-nav a:focus-visible {
  background: #212121;
  color: #d6d6d6;
  outline: 0;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border-radius: 10px;
  text-align: left;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 50%;
  background: #333333;
  font-size: 15px;
  font-weight: 700;
}

.account-copy {
  min-width: 0;
}

.account-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sub {
  display: block;
  color: #9b9b9b;
  font-size: 12px;
}

.main {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: #000000;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  flex: 0 0 auto;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-menu {
  display: none;
}

.header-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-title span {
  color: #a8a8a8;
  font-weight: 500;
}

.header-title svg {
  width: 15px;
  height: 15px;
  color: #9b9b9b;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.share-button:hover {
  background: #212121;
}

.share-button svg {
  width: 17px;
  height: 17px;
}

.chat-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.welcome {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.welcome-inner {
  width: min(100%, 760px);
  text-align: center;
}

.welcome-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #ececec;
  color: #111111;
}

.welcome-logo svg {
  width: 29px;
  height: 29px;
}

.welcome h1 {
  margin: 0 0 26px;
  font-size: clamp(27px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 640px);
  margin: 0 auto;
}

.suggestion {
  min-height: 58px;
  padding: 12px 15px;
  border: 1px solid #333333;
  border-radius: 14px;
  background: #171717;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}

.suggestion:hover {
  background: #212121;
  border-color: #444444;
}

.suggestion strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
}

.suggestion span {
  color: #a8a8a8;
  font-size: 13px;
}

.messages {
  display: none;
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 24px 24px 32px;
}

.messages.is-active {
  display: block;
}

.message-row {
  display: flex;
  width: 100%;
  margin: 0 0 32px;
}

.message-row.user {
  justify-content: flex-end;
}

.user-bubble {
  max-width: min(78%, 560px);
  padding: 10px 15px;
  border-radius: 20px;
  background: #2f2f2f;
  color: #ececec;
  font-size: 15.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.assistant-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
}

.assistant-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: 9px;
  background: #ececec;
  color: #111111;
}

.assistant-icon svg {
  width: 19px;
  height: 19px;
}

.assistant-copy {
  min-width: 0;
  padding-top: 2px;
  color: #ececec;
  font-size: 15.5px;
  line-height: 1.62;
}

.assistant-copy p {
  margin: 0 0 12px;
}

.assistant-copy p:last-child {
  margin-bottom: 0;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
}

.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9b9b9b;
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing i:nth-child(2) {
  animation-delay: 140ms;
}

.typing i:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes typingPulse {
  0%,
  70%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.composer-wrap {
  position: relative;
  z-index: 15;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  padding: 12px 24px 10px;
  background: #000000;
  pointer-events: none;
}

.composer-area {
  width: min(100%, 770px);
  pointer-events: auto;
}

.composer {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px 9px 14px;
  border: 1px solid #333333;
  border-radius: 27px;
  background: #212121;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.composer:focus-within {
  border-color: #4a4a4a;
}

.attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin: 1px 7px 1px -4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d1d1d1;
  cursor: pointer;
}

.attach-button:hover {
  background: #333333;
}

.attach-button svg {
  width: 20px;
  height: 20px;
}

.prompt-input {
  width: auto;
  min-width: 0;
  max-height: 150px;
  min-height: 38px;
  flex: 1 1 auto;
  resize: none;
  overflow-y: auto;
  padding: 7px 3px 6px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ececec;
  font-size: 16px;
  line-height: 1.45;
  scrollbar-width: thin;
}

.prompt-input::placeholder {
  color: #9b9b9b;
}

.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin: 1px 0 1px 8px;
  border-radius: 50%;
  background: #ececec;
  color: #111111;
  transition: opacity 120ms ease, transform 120ms ease;
}

.send-button:disabled {
  cursor: default;
  opacity: 0.24;
}

.send-button:not(:disabled):hover {
  transform: scale(1.03);
}

.send-button svg {
  width: 18px;
  height: 18px;
}

.composer-note {
  margin-top: 6px;
  color: #9b9b9b;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
}

.mash-hint {
  position: absolute;
  right: 18px;
  bottom: 90px;
  z-index: 10;
  padding: 7px 10px;
  border: 1px solid #333333;
  border-radius: 9px;
  background: rgba(33, 33, 33, 0.96);
  color: #c7c7c7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.mash-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-scrim {
  display: none;
}

.info-body {
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
}

.info-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background: #000000;
}

.info-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid #242424;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
}

.info-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 960px);
  min-height: 58px;
  margin: 0 auto;
  padding: 8px 24px;
}

.info-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ececec;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.info-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: #ececec;
  color: #111111;
}

.info-brand-mark svg {
  width: 19px;
  height: 19px;
}

.info-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.info-nav a {
  padding: 6px 8px;
  border-radius: 7px;
  color: #9b9b9b;
  font-size: 12px;
  text-decoration: none;
}

.info-nav a:hover,
.info-nav a:focus-visible,
.info-nav a[aria-current="page"] {
  background: #171717;
  color: #ececec;
  outline: 0;
}

.info-main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.info-eyebrow {
  margin: 0 0 10px;
  color: #8f8f8f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-main h1 {
  margin: 0;
  color: #f2f2f2;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.info-lead {
  margin: 20px 0 0;
  color: #cfcfcf;
  font-size: 18px;
  line-height: 1.65;
}

.info-section {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid #242424;
}

.info-section h2 {
  margin: 0 0 12px;
  color: #ececec;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.info-section p {
  margin: 0 0 14px;
  color: #b8b8b8;
  font-size: 15px;
  line-height: 1.7;
}

.info-section p:last-child {
  margin-bottom: 0;
}

.info-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #b8b8b8;
  font-size: 15px;
  line-height: 1.7;
}

.info-section li + li {
  margin-top: 7px;
}

.info-link {
  color: #ececec;
  text-decoration-color: #555555;
  text-underline-offset: 3px;
}

.info-link:hover,
.info-link:focus-visible {
  text-decoration-color: #ececec;
  outline: 0;
}

.info-meta {
  margin-top: 44px;
  color: #777777;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .app {
    display: block;
  }

  .main {
    width: 100%;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: auto;
    left: 0;
    width: min(86vw, 320px);
    height: 100vh;
    height: 100dvh;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-right: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
    transform: translateX(-102%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.32);
    overscroll-behavior: contain;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
  }

  .sidebar-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .welcome {
    padding: 32px 20px 40px;
  }
}

@media (max-width: 640px) {

	.info-topbar-inner {
	  gap: 12px;
	  padding-top: max(8px, env(safe-area-inset-top));
	  padding-right: max(14px, env(safe-area-inset-right));
	  padding-bottom: 8px;
	  padding-left: max(14px, env(safe-area-inset-left));
	}
	
	.info-brand {
	  font-size: 15px;
	}
	
	.info-nav {
	  gap: 1px;
	}
	
	.info-nav a {
	  padding: 6px;
	  font-size: 11px;
	}
	
	.info-main {
	  padding: 48px 18px 72px;
	}
	
	.info-lead {
	  font-size: 17px;
	}
	
	.info-section {
	  margin-top: 36px;
	  padding-top: 24px;
	}
	
  .topbar {
    min-height: 54px;
    padding-top: max(6px, env(safe-area-inset-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: 6px;
    padding-left: max(8px, env(safe-area-inset-left));
  }

  .header-title {
    font-size: 16px;
  }

  .share-button span {
    display: none;
  }

  .welcome {
    align-items: center;
    padding: 28px 16px 32px;
  }

  .welcome-logo {
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
  }

  .welcome-logo svg {
    width: 26px;
    height: 26px;
  }

  .welcome h1 {
    margin-bottom: 22px;
  }

  .suggestions {
    grid-template-columns: 1fr;
  }

  .suggestion:nth-child(n + 3) {
    display: none;
  }

  .messages {
    padding: 16px 14px 24px;
  }

  .message-row {
    margin-bottom: 26px;
  }

  .user-bubble {
    max-width: 88%;
  }

  .assistant-message {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 11px;
  }

  .assistant-icon {
    width: 28px;
    height: 28px;
  }

  .composer-wrap {
    padding-top: 10px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .composer {
    min-height: 54px;
    padding: 7px 8px 7px 12px;
    border-radius: 24px;
  }

  .attach-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    margin-right: 5px;
  }

  .prompt-input {
    max-height: 120px;
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .send-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    margin-left: 6px;
  }

  .composer-note {
    margin-top: 5px;
    font-size: 10px;
  }

  .mash-hint {
    display: none;
  }
}

@media (max-width: 380px) {
  .header-title {
    padding-right: 5px;
    padding-left: 5px;
  }

  .share-button {
    padding-right: 6px;
    padding-left: 6px;
  }

  .composer-wrap {
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
  }

  .messages {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 860px) and (max-height: 560px) {
  .welcome {
    align-items: flex-start;
    padding-top: 20px;
  }

  .composer-wrap {
    padding-top: 6px;
  }

  .composer-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

  .typing i {
    animation-duration: 2s;
  }
}
