@font-face {
  font-family: "Valentina Montserrat";
  src: url("./fonts/Montserrat-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family:
    Arial, Helvetica, sans-serif;
  font-synthesis: none;
  --black: #000000;
  --surface: #000000;
  --surface-raised: #000000;
  --text: #f4f4f4;
  --muted: #969696;
  --quiet: #7a7a7a;
  --valentina-magenta: #e31b5d;
  --blue: #b8b8b8;
  --blue-bright: #f4f4f4;
  --blue-soft: transparent;
  --line: transparent;
  --line-strong: transparent;
  --danger: #f4f4f4;
  --header-height: 64px;
  --truth-height: 36px;
  --nav-width: 272px;
  --message-font-size: 13px;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
  box-shadow: none !important;
}

html,
body,
#app {
  min-width: 0;
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-size: 13px;
  color: var(--text);
  background: #000000;
}

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

button,
select {
  cursor: pointer;
}

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

button:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: #f4f4f4;
  color: #000000;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  display: grid;
  grid-template:
    "top top top" var(--header-height)
    "nav main context" minmax(0, 1fr)
    "truth truth truth" var(--truth-height)
    / var(--nav-width) minmax(0, 1fr) 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns 180ms ease;
}

.app-shell[data-context-open="true"] {
  grid-template-columns: var(--nav-width) minmax(0, 1fr) 326px;
}

.topbar {
  position: relative;
  z-index: 30;
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: #000000;
  border-bottom: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand__lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand__logo {
  display: block;
  width: auto;
  height: 27px;
  object-fit: contain;
}

.brand__name {
  font-size: 18px;
  font-weight: 620;
  font-kerning: normal;
  letter-spacing: 0.26em;
}

.brand__maker {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.brand-mark {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark--large {
  width: 50px;
  height: 50px;
  margin-bottom: 24px;
  transform: scale(1.8);
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--blue);
}

.state-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--quiet);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.state-picker select {
  padding: 6px 22px 6px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
}

.ecosystem-switcher {
  position: relative;
}

.ecosystem-trigger {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 2px 0 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-left: 0;
}

.ecosystem-trigger__symbol {
  color: var(--muted);
  font-size: 16px;
}

.ecosystem-trigger__copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.ecosystem-trigger__copy small {
  color: var(--quiet);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.15em;
}

.ecosystem-trigger__copy strong {
  font-size: 11px;
  font-weight: 620;
}

.ecosystem-trigger__chevron {
  color: var(--quiet);
  transition: transform 160ms ease;
}

.ecosystem-switcher[data-ecosystem-open="true"] .ecosystem-trigger__chevron {
  transform: rotate(180deg);
}

.ecosystem-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 9px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  padding: 18px;
  background: #000000;
  border: 0;
  box-shadow: 0 24px 70px rgb(0 0 0 / 58%);
}

.ecosystem-menu__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 14px;
}

.ecosystem-menu__heading strong {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ecosystem-menu__heading span,
.ecosystem-menu__status {
  color: var(--quiet);
  font-size: 10px;
}

.ecosystem-products {
  border-block: 0;
}

.ecosystem-product {
  display: flex;
  width: 100%;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 2px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 0;
}

.ecosystem-product:last-child {
  border-bottom: 0;
}

.ecosystem-product > span {
  display: grid;
  gap: 5px;
}

.ecosystem-product strong {
  font-size: 13px;
  font-weight: 620;
}

.ecosystem-product small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.ecosystem-product em {
  flex: 0 0 auto;
  color: var(--quiet);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.ecosystem-product[data-product-state="CURRENT"] strong,
.ecosystem-product[data-product-state="CURRENT"] em,
.ecosystem-product[data-product-state="AVAILABLE"] em {
  color: var(--text);
}

.ecosystem-product[data-product-state="AVAILABLE"]:hover {
  color: var(--blue-bright);
}

.ecosystem-product:disabled {
  cursor: default;
  opacity: 0.64;
}

.ecosystem-menu__status {
  margin: 14px 2px 0;
  line-height: 1.45;
}

.context-trigger,
.icon-button {
  padding: 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
}

.context-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.nav-toggle {
  display: none;
}

.navigation {
  position: relative;
  grid-area: nav;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px 20px 18px;
  overflow: auto;
  background: #000000;
  border-right: 0;
}

.navigation__resize {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  width: 24px;
  cursor: ew-resize;
  touch-action: none;
}

.navigation__resize::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  content: "";
  background: transparent;
  transition: background 140ms ease;
}

.navigation__resize:hover::after,
.navigation__resize:focus-visible::after,
.app-shell[data-nav-resizing="true"] .navigation__resize::after {
  background: #404040;
}

.app-shell[data-nav-resizing="true"] {
  cursor: ew-resize;
  user-select: none;
}

.new-chat {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  color: var(--text);
  font-weight: 650;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
}

.new-chat span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
}

.new-chat:hover,
.new-chat:hover span {
  color: var(--blue-bright);
}

.navigation__section {
  margin-top: 32px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.pinned-list,
.recent-list,
.capabilities ul {
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.pinned-list button,
.recent-list button {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 6px 11px 16px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
}

.pinned-list button::before,
.recent-list button::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  content: "";
  background: transparent;
}

.pinned-list button[aria-current="page"],
.recent-list button[aria-current="page"] {
  color: var(--text);
}

.pinned-list button[aria-current="page"]::before,
.recent-list button[aria-current="page"]::before {
  background: transparent;
}

.pinned-list small,
.recent-list small,
.capabilities small {
  color: var(--quiet);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.recent-empty {
  padding: 12px 6px;
  color: var(--quiet);
  font-size: 12px;
}

.capabilities,
.view-settings {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.capabilities summary,
.view-settings summary {
  padding: 12px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.capability-label {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 8px 4px;
  color: var(--quiet);
  text-align: left;
}

.view-settings__control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 12px;
  align-items: center;
  padding: 10px 4px 4px;
  color: var(--quiet);
  font-size: 11px;
}

.view-settings__control output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.view-settings__control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--blue);
}

.app-shell[data-nav-docked="true"] .navigation {
  align-items: center;
  padding-inline: 12px;
}

.app-shell[data-nav-docked="true"] .new-chat {
  width: 44px;
  justify-content: center;
  padding-inline: 0;
  overflow: hidden;
  color: transparent;
  white-space: nowrap;
}

.app-shell[data-nav-docked="true"] .new-chat span {
  color: var(--muted);
}

.app-shell[data-nav-docked="true"] .navigation__section,
.app-shell[data-nav-docked="true"] .capabilities,
.app-shell[data-nav-docked="true"] .view-settings,
.app-shell[data-nav-docked="true"] .identity > span:last-child {
  display: none;
}

.app-shell[data-nav-docked="true"] .identity {
  justify-content: center;
  width: 100%;
}

.identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.identity strong,
.identity small {
  display: block;
}

.identity strong {
  color: var(--text);
}

.identity small {
  margin-top: 2px;
  color: var(--quiet);
}

.identity__avatar,
.message__author-mark {
  display: block;
  width: 22px;
  height: auto;
  flex: 0 0 22px;
  color: var(--muted);
  font-size: 11px;
}

.message__avatar {
  display: block;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  object-fit: contain;
}

.conversation {
  grid-area: main;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 30px clamp(26px, 5vw, 76px) 14px;
  overflow: hidden;
}

.conversation__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
}

.conversation__heading h1 {
  margin: 7px 0 0;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 620;
  letter-spacing: -0.025em;
}

.conversation__heading > p {
  max-width: 260px;
  margin: 0;
  color: var(--quiet);
  font-size: 11px;
  text-align: right;
}

.conversation__stream {
  max-width: 920px;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.message {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
}

.message + .message {
  border-top: 1px solid var(--line);
}

.message--assistant .message__avatar {
  background: transparent;
}

.message__meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 9px;
}

.message__meta strong {
  font-size: 13px;
}

.message__meta time {
  color: var(--quiet);
  font-size: 10px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
}

.history-row__open {
  display: grid !important;
  min-width: 0;
  justify-items: start !important;
}

.history-row__open span,
.history-row__open small {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row__pin {
  width: auto !important;
  padding: 8px 4px !important;
  color: var(--quiet) !important;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-row__pin::before {
  display: none;
}

.history-more button {
  justify-content: center;
  padding-left: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message__content > p:not(.message__meta),
.message__content li,
.assistant-prose p {
  color: #dedede;
  font-size: var(--message-font-size);
  line-height: 1.68;
}

.message__content > p:not(.message__meta) {
  margin: 0;
}

.message__content ul {
  padding-left: 19px;
  margin: 13px 0 0;
}

.assistant-prose {
  display: grid;
  gap: 10px;
}

.assistant-prose h3,
.assistant-prose h4 {
  margin: 8px 0 0;
  color: #f4f4f4;
  letter-spacing: -.015em;
}

.assistant-prose h3 {
  font-size: 15px;
  font-weight: 650;
}

.assistant-prose h4 {
  font-size: 13px;
  font-weight: 620;
}

.assistant-prose p,
.assistant-prose ul,
.assistant-prose ol {
  margin: 0;
}

.assistant-prose ul,
.assistant-prose ol {
  padding-left: 20px;
}

.assistant-prose li + li {
  margin-top: 5px;
}

.assistant-prose strong {
  color: #fff;
  font-weight: 650;
}

.assistant-prose code {
  color: #c8c8c8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .92em;
}

.assistant-prose pre {
  max-width: 100%;
  margin: 2px 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #2a2a2a;
  background: #080808;
}

.message__delivery,
.receipt-summary {
  margin-top: 9px !important;
  color: var(--quiet) !important;
  font-size: 10px !important;
  overflow-wrap: anywhere;
}

.receipt-summary {
  color: var(--muted) !important;
  letter-spacing: 0.02em;
}

.receipt-summary:hover {
  color: var(--blue-bright) !important;
}

.receipt-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.receipt-details summary {
  width: fit-content;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.receipt-details dl {
  margin: 10px 0 0;
}

.receipt-details dl div {
  display: grid;
  grid-template-columns: minmax(92px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
  padding: 3px 0;
}

.receipt-details dt {
  color: var(--quiet);
}

.receipt-details dd {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.state {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  padding: 44px 18px;
  text-align: center;
}

.state h2 {
  max-width: 560px;
  margin: 10px 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 620;
  letter-spacing: -0.025em;
}

.state > p:last-child,
.state--loading p,
.state--error > p {
  max-width: 480px;
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.55;
}

.state--error .eyebrow {
  color: var(--muted);
}

.workspace-surface {
  width: min(820px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 48px 0 32px;
}

.workspace-surface__heading {
  padding: 0 0 20px;
  border-bottom: 1px solid #202020;
}

.workspace-surface__heading > .eyebrow {
  margin: 0 0 12px;
  color: var(--blue-bright);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
}

.workspace-surface__heading > div {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.workspace-surface__heading h2 {
  margin: 0;
  color: #f4f4f4;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 520;
  letter-spacing: -.04em;
}

.workspace-surface__observed {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workspace-surface__refresh {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: #9a9a9a;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workspace-surface__refresh:hover,
.workspace-surface__refresh:focus-visible {
  border-bottom-color: var(--blue-bright);
  color: #fff;
}

.workspace-surface__list {
  display: grid;
}

.workspace-card {
  display: block;
  border-bottom: 1px solid #171717;
}

.workspace-card__body,
.workspace-card__action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 20px 2px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  transition: background-color 140ms ease, padding 140ms ease;
}

.workspace-card__action {
  cursor: pointer;
}

.workspace-card:hover > .workspace-card__body,
.workspace-card__action:hover,
.workspace-card__action:focus-visible {
  padding-inline: 12px;
  background: #0b0b0b;
}

.workspace-card__action:focus-visible {
  outline: 1px solid var(--blue-bright);
  outline-offset: -1px;
}

.workspace-card h3 {
  margin: 0;
  color: #ededed;
  font-size: 14px;
  font-weight: 570;
  letter-spacing: -.01em;
}

.workspace-card p {
  max-width: 650px;
  margin: 7px 0 0;
  color: #777;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.workspace-card__status {
  justify-self: end;
  color: var(--blue-bright);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
  text-align: right;
  text-transform: uppercase;
}

.workspace-surface__loading,
.workspace-surface__empty {
  display: grid;
  min-height: 240px;
  place-content: center;
  justify-items: center;
  color: #777;
  font-size: 11px;
  text-align: center;
}

.workspace-surface__pulse {
  width: 7px;
  height: 7px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 18px color-mix(in srgb, var(--blue-bright) 70%, transparent);
  animation: workspace-pulse 1.15s ease-in-out infinite;
}

.conversation-history {
  width: min(820px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 48px 0 32px;
}

.conversation-history__heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #202020;
}

.conversation-history__heading .eyebrow {
  margin-bottom: 12px;
  color: var(--blue-bright);
}

.conversation-history__heading h2 {
  margin: 0;
  color: #f4f4f4;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 520;
  letter-spacing: -.04em;
}

.conversation-history__heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 12px;
}

.conversation-history__heading button,
.conversation-history__more {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: #9a9a9a;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.conversation-history__heading button:hover,
.conversation-history__heading button:focus-visible,
.conversation-history__more:hover,
.conversation-history__more:focus-visible {
  border-bottom-color: var(--blue-bright);
  color: #fff;
}

.conversation-history__messages {
  display: grid;
  gap: 1px;
}

.history-message {
  padding: 22px 2px;
  border-bottom: 1px solid #171717;
}

.history-message--assistant {
  padding-left: clamp(16px, 4vw, 52px);
}

.history-message p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #c8c8c8;
  font-size: var(--message-font-size);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history-message .history-message__author {
  margin: 0;
  color: var(--blue-bright);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.history-message time {
  display: block;
  margin-top: 10px;
  color: var(--quiet);
  font-size: 11px;
}

.conversation-history__state {
  display: grid;
  min-height: 240px;
  place-content: center;
  color: #777;
  font-size: 11px;
  text-align: center;
}

.conversation-history__more {
  display: block;
  margin: 22px auto 0;
}

@keyframes workspace-pulse {
  50% { opacity: .32; transform: scale(.72); }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-surface__pulse { animation: none; }
  .workspace-card__body,
  .workspace-card__action { transition: none; }
}

.text-action {
  margin-top: 22px;
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 0;
}

.text-action:hover {
  color: var(--blue-bright);
}

.composer {
  width: min(920px, 100%);
  margin: 12px auto 0;
  padding: 8px 0 6px;
  background: #000000;
  border: 0;
  border-radius: 0;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 32px;
  resize: none;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: var(--quiet);
}

.composer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--quiet);
  font-size: 10px;
}

.composer__meta button {
  padding: 5px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.composer__meta button:hover:not(:disabled) {
  color: var(--blue-bright);
}

.composer__meta button:disabled {
  color: var(--quiet);
  background: transparent;
}

.composer__notice {
  min-height: 14px;
  margin: 7px 0 0;
  color: var(--quiet);
  font-size: 10px;
  text-align: center;
}

/* User-controlled conversation history without a permanently occupied column. */
.navigation__conversations {
  min-height: 0;
  margin-top: 20px;
}

.navigation__conversations[open] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.navigation__conversations > summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  color: var(--quiet);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  list-style: none;
}

.navigation__conversations > summary::-webkit-details-marker {
  display: none;
}

.navigation__conversations > summary .tabler-icon {
  width: 15px;
  height: 15px;
  color: var(--quiet);
  transition: transform 160ms ease;
}

.navigation__conversations:not([open]) > summary .tabler-icon {
  transform: rotate(-90deg);
}

.navigation__conversations .navigation__section--pinned {
  margin-top: 12px;
}

.navigation__conversations .navigation__section--recent {
  min-height: 0;
  margin-top: 14px;
  overflow-y: auto;
}

.navigation__conversations[open] .navigation__section--recent {
  flex: 1 1 auto;
}

.navigation,
.navigation__section--recent,
.pinned-list,
.recent-list {
  scrollbar-width: none;
}

.navigation::-webkit-scrollbar,
.navigation__section--recent::-webkit-scrollbar,
.pinned-list::-webkit-scrollbar,
.recent-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

@media (min-width: 901px) {
  .app-shell[data-nav-docked="true"] .navigation__conversations {
    display: none !important;
  }
}

/* Account identity belongs to the sidebar, not to a boxed card. */
.account-trigger,
.account-trigger:hover,
.account-trigger:focus-visible,
.account-trigger[aria-expanded="true"] {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

/* Keep long histories inside their own usable viewport, above account identity. */
@media (min-width: 901px) {
  .navigation__conversations[open] {
    flex: 1 1 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .navigation__conversations[open]::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
  }

  .navigation__conversations .navigation__section--pinned {
    max-height: none;
    overflow: visible;
  }

  .navigation__conversations .navigation__section--recent {
    min-height: 0;
    padding-bottom: 12px;
    overflow: visible;
  }

  .navigation__maker {
    margin: 8px 10px 2px;
  }

  .account-trigger {
    flex: 0 0 56px;
    margin-top: 0;
  }

  .app-shell[data-nav-docked="true"] .navigation__conversations,
  .app-shell[data-nav-docked="true"] .navigation__maker {
    display: none !important;
  }

  .interaction-mode--top {
    padding: 2px;
  }

  .interaction-mode--top button {
    min-height: 28px;
    padding-inline: 12px;
    font-size: 11px;
  }
}

.interaction-mode {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
}

.interaction-mode button {
  min-height: 28px;
  padding: 0 12px 0 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.interaction-mode button[aria-pressed="true"] {
  color: var(--text);
  background: transparent;
  font-weight: 650;
}

.interaction-mode button:hover {
  color: var(--blue-bright);
}

.research-scope {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
}

.research-scope summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--text);
  cursor: pointer;
}

.research-scope dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 8px 0;
}

.research-scope dl div {
  min-width: 0;
}

.research-scope dt,
.research-scope dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.research-scope dt {
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-result {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.research-result h3,
.research-result h4,
.research-result p,
.research-result ul,
.research-result ol {
  margin: 0;
}

.research-result section {
  display: grid;
  gap: 8px;
}

.research-result ul,
.research-result ol {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.research-result li {
  padding-left: 4px;
}

.research-result li small {
  display: block;
  margin-top: 3px;
  color: var(--quiet);
  overflow-wrap: anywhere;
}

.research-result a {
  color: var(--muted);
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.research-result a:hover {
  color: var(--blue-bright);
}

.research-result code {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-result__id {
  color: var(--quiet);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.research-result__source-note {
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.45;
}

.runtime-alert {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  color: #dedede;
  font-size: 11px;
  line-height: 1.45;
}

.runtime-alert[hidden] {
  display: none;
}

.runtime-alert .text-action {
  flex: 0 0 auto;
  margin-top: 0;
}

.app-shell[data-health="READY"] .status-dot {
  background: #bdbdbd;
}

.app-shell[data-health="UNAVAILABLE"] .status-dot,
.app-shell[data-health="MALFORMED"] .status-dot,
.app-shell[data-health="AUTH_REQUIRED"] .status-dot,
.app-shell[data-health="FORBIDDEN"] .status-dot {
  background: var(--danger);
}

.context {
  position: relative;
  z-index: 20;
  grid-area: context;
  min-width: 0;
  padding: 25px 22px;
  overflow: auto;
  visibility: hidden;
  opacity: 0;
  background: rgb(8 8 8 / 96%);
  border-left: 1px solid var(--line);
  transform: translateX(24px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms;
}

.app-shell[data-context-open="true"] .context {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.context__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.context__facts {
  margin: 28px 0;
}

.context__facts div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 6px 0;
  font-size: 12px;
}

.context dt {
  color: var(--quiet);
}

.context dd {
  margin: 0;
  color: var(--muted);
}

.context section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.context section h2 {
  margin: 10px 0 4px;
  font-size: 14px;
  font-weight: 570;
}

.context section > p:last-child {
  margin: 0;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.5;
}

.scrim {
  display: none;
  position: fixed;
  z-index: 15;
  inset: var(--header-height) 0 var(--truth-height);
  background: rgb(0 0 0 / 54%);
  border: 0;
}

.truth-bar {
  position: relative;
  z-index: 35;
  grid-area: truth;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--quiet);
  background: var(--black);
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.truth-bar strong {
  color: var(--muted);
  letter-spacing: 0.12em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1099px) {
  :root {
    --nav-width: 232px;
  }

  .app-shell {
    grid-template-columns: var(--nav-width) minmax(0, 1fr) 0;
  }

  .app-shell[data-context-open="true"] {
    grid-template-columns: var(--nav-width) minmax(0, 1fr) 300px;
  }

  .conversation {
    padding-inline: 30px;
  }

  .brand__maker,
  .state-picker {
    display: none;
  }
}

@media (max-width: 899px) {
  :root {
    --header-height: 58px;
  }

  body {
    overflow: auto;
  }

  .app-shell,
  .app-shell[data-context-open="true"] {
    grid-template:
      "top" var(--header-height)
      "main" minmax(0, 1fr)
      "truth" var(--truth-height)
      / minmax(0, 1fr);
    min-height: 100dvh;
  }

  .topbar {
    gap: 10px;
    padding-inline: 12px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .brand__name {
    font-size: 15px;
    letter-spacing: 0.24em;
  }

  .topbar__status {
    margin-left: auto;
    font-size: 9px;
  }

  .ecosystem-trigger {
    min-height: 36px;
    padding-left: 10px;
  }

  .ecosystem-trigger__copy {
    display: none;
  }

  .ecosystem-menu {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    right: 12px;
  }

  .context-trigger {
    font-size: 0;
  }

  .context-trigger span {
    font-size: 18px;
  }

  .navigation,
  .context {
    position: fixed;
    z-index: 25;
    top: var(--header-height);
    bottom: var(--truth-height);
    width: min(88vw, 330px);
    visibility: hidden;
    opacity: 0;
    box-shadow: 24px 0 70px rgb(0 0 0 / 46%);
  }

  .navigation {
    left: 0;
    transform: translateX(-102%);
    transition:
      opacity 160ms ease,
      transform 160ms ease,
      visibility 160ms;
  }

  .navigation__resize {
    display: none;
  }

  .app-shell[data-nav-docked="true"] .navigation {
    align-items: stretch;
    padding-inline: 20px;
  }

  .app-shell[data-nav-docked="true"] .new-chat {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 4px;
    color: var(--text);
  }

  .app-shell[data-nav-docked="true"] .navigation__section,
  .app-shell[data-nav-docked="true"] .capabilities,
  .app-shell[data-nav-docked="true"] .view-settings {
    display: block;
  }

  .app-shell[data-nav-docked="true"] .identity > span:last-child {
    display: inline;
  }

  .app-shell[data-nav-open="true"] .navigation {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
  }

  .context {
    right: 0;
    left: auto;
    width: min(92vw, 360px);
    transform: translateX(102%);
  }

  .app-shell[data-nav-open="true"] .scrim,
  .app-shell[data-context-open="true"] .scrim {
    display: block;
  }

  .conversation {
    padding: 22px 18px 10px;
  }

  .conversation__heading {
    align-items: start;
    padding-bottom: 14px;
  }

  .conversation__heading > p {
    display: none;
  }

  .message {
    gap: 12px;
    padding: 16px 0;
  }

  .truth-bar span {
    max-width: 72vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .topbar__status {
    display: none;
  }

  .ecosystem-switcher {
    margin-left: auto;
  }
}

@media (max-width: 420px) {
  .product-switcher--brand > summary .brand__logo {
    height: 22px;
  }

  .brand-mark {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    transform: scale(0.82);
  }

  .brand__name {
    font-size: 13px;
    letter-spacing: 0.18em;
  }

  .topbar__status span:last-child {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .conversation {
    padding-inline: 14px;
  }

  .conversation__heading h1 {
    font-size: 20px;
  }

  .message {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .message__avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .message__content > p:not(.message__meta),
  .message__content li {
    font-size: var(--message-font-size);
  }

  .composer {
    border-radius: 11px;
  }

  .composer__meta span {
    max-width: 190px;
  }

}

@media (max-width: 600px) {
  .interaction-mode {
    width: 100%;
  }

  .interaction-mode button {
    flex: 1 1 0;
  }

  .research-scope dl {
    grid-template-columns: 1fr;
  }
}

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

/* Commercial shell: the runtime keeps its verified semantics, while product UI exposes only
   the two canonical controls (navigation and account) and a compact conversation surface. */
.legacy-control,
.legacy-control[hidden],
.context,
.truth-bar,
.navigation__resize,
.conversation__heading,
.research-scope {
  display: none !important;
}

.app-shell,
.app-shell[data-context-open="true"] {
  grid-template:
    "top" 58px
    "main" minmax(0, 1fr)
    / minmax(0, 1fr);
  background: #000;
}

.topbar {
  position: relative;
  grid-area: top;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  background: #000;
}

.nav-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
}

.menu-icon {
  display: grid;
  width: 16px;
  gap: 3px;
}

.menu-icon i {
  display: block;
  width: 16px;
  height: 1px;
  background: #d8d8d8;
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
}

.brand__name {
  font-size: 15px;
  letter-spacing: .22em;
}

.brand__maker {
  color: #858585;
  font-size: 10px;
}

.interaction-mode--top {
  position: static;
  margin-left: auto;
  padding: 3px;
  border: 1px solid #242424;
  border-radius: 999px;
  background: #111;
  transform: none;
}

.interaction-mode--top button {
  min-height: 30px;
  padding: 0 15px;
  border-radius: 999px;
  color: #9b9b9b;
  font-size: 12px;
}

.interaction-mode--top button[aria-pressed="true"] {
  color: #f5f5f5;
  background: #1d1d1d;
}

.interaction-mode--top button:hover {
  color: var(--blue-bright);
}

.product-switcher {
  position: relative;
  flex: 0 0 auto;
}

.product-switcher summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 7px;
  border: 1px solid #242424;
  border-radius: 999px;
  color: #f4f4f4;
  background: #0d0d0d;
  cursor: pointer;
  list-style: none;
}

.product-switcher--brand > summary {
  min-height: 36px;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.product-switcher--brand > summary .brand-mark img {
  width: 100%;
  height: 100%;
}

.product-switcher--brand > summary .brand__logo {
  width: auto;
  height: 27px;
}

.product-switcher--brand > nav {
  right: auto;
  left: 0;
}

.product-switcher summary::-webkit-details-marker {
  display: none;
}

.product-switcher summary::after {
  color: #737373;
  content: "⌄";
  font-size: 11px;
}

.product-switcher summary img,
.product-switcher nav img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.product-switcher summary strong,
.product-switcher nav span {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
}

.product-switcher nav {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 174px;
  padding: 7px;
  border: 1px solid #242424;
  border-radius: 12px;
  background: rgb(8 8 8 / 98%);
  box-shadow: 0 18px 48px rgb(0 0 0 / 60%);
}

.product-switcher:not([open]) nav {
  display: none;
}

.product-switcher nav a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  border-radius: 8px;
  color: #d7d7d7;
  text-decoration: none;
}

.product-switcher nav a:hover,
.product-switcher nav a:focus-visible,
.product-switcher nav a[aria-current="page"] {
  color: #fff;
  background: #171717;
}

.product-switcher nav a[aria-current="page"] span {
  color: var(--blue-bright);
}

.account-trigger {
  position: fixed;
  z-index: 64;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: calc(10px + env(safe-area-inset-left));
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #303030;
  border-radius: 50%;
  background: #080808;
}

.account-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-trigger > [data-account-placeholder] {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #b8b8b8;
}

.account-trigger > [data-account-placeholder] .tabler-icon {
  width: 22px;
  height: 22px;
}

.account-trigger [hidden],
.account-profile [hidden],
.account-actions [hidden] {
  display: none !important;
}

.navigation {
  position: fixed;
  z-index: 61;
  top: 0;
  bottom: 0;
  left: 0;
  width: 220px;
  padding: 16px 12px 18px;
  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  border: 0;
  background: #080808;
  transform: translateX(-100%);
  transition: transform 180ms ease, opacity 180ms ease, visibility 180ms ease;
}

.app-shell[data-nav-open="true"] .navigation {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.new-chat {
  min-height: 44px;
  padding: 7px 6px;
  gap: 9px;
  border: 0;
  color: #dedede;
  font-size: 12.5px;
  font-weight: 560;
}

.navigation__section {
  margin-top: 22px;
}

.recent-empty {
  padding-inline: 6px;
  font-size: 10.5px;
}

.capabilities {
  margin-top: 16px;
}

.capabilities summary {
  min-height: 42px;
  padding: 12px 6px;
  border: 0;
}

.product-nav {
  display: grid;
  gap: 1px;
  margin-top: 18px;
}

.product-nav > span {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 6px;
  color: #8f8f8f;
  font-size: 12px;
}

.product-nav > span[aria-current="page"] strong {
  color: #f4f4f4;
}

.product-nav small {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 500;
}

.product-nav > span[aria-current="page"] small {
  color: var(--blue-bright);
}

.navigation__maker {
  margin: auto 6px 0;
  padding-top: 20px;
  color: var(--quiet);
  font-size: 11px;
}

.conversation {
  grid-area: main;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0 22px 22px;
  background: #000;
}

.conversation__stream {
  width: min(820px, 100%);
  max-width: 820px;
}

.state {
  min-height: 100%;
  padding: 32px 18px;
}

.state h2 {
  margin: 0;
  color: #f2f2f2;
  font-size: clamp(21px, 2.1vw, 27px);
  font-weight: 500;
  letter-spacing: -.025em;
}

.connection-state {
  margin: 12px 0 0 !important;
  color: var(--quiet) !important;
  font-size: 10px !important;
  font-weight: 650;
  letter-spacing: .14em;
}

.composer {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.composer__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px 38px;
  gap: 4px;
  align-items: center;
  min-height: 52px;
  padding: 6px 7px;
  border: 1px solid #292929;
  border-radius: 27px;
  background: #181818;
}

.tabler-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.composer__attach,
.composer__voice {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #b7b7b7;
  background: transparent;
}

.composer__attach:hover,
.composer__voice:hover {
  color: #f2f2f2;
  background: #262626;
}

.composer__voice[data-listening="true"] {
  color: var(--blue-bright);
}

.composer textarea {
  min-height: 22px;
  max-height: 112px;
  padding: 2px 0;
  overflow-y: auto;
  scrollbar-width: none;
  color: #f2f2f2;
  font-size: 14px;
  line-height: 1.3;
}

.composer textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.composer__send {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #050505;
  background: #ededed;
  font-size: 20px;
  font-weight: 700;
}

.composer__send:disabled {
  color: #777;
  background: #303030;
  opacity: 1;
}

.composer__send .tabler-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.runtime-alert {
  justify-content: center;
  margin-top: 7px;
}

.account-panel {
  position: fixed;
  z-index: 63;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(404px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 16px;
  background: rgb(8 8 8 / 96%);
  transform: translate(-50%, -48%);
  transition: transform 160ms ease, opacity 160ms ease, visibility 160ms ease;
}

.app-shell[data-account-open="true"] .account-panel {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, -50%);
}

.account-panel__head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  text-align: center;
}

.account-panel__head strong {
  grid-column: 2;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.account-close {
  grid-column: 3;
}

.account-back {
  grid-column: 1;
  font-size: 22px;
}

.account-profile {
  display: grid;
  justify-items: start;
  padding: 10px 24px 16px;
}

.app-shell[data-authenticated="false"] .account-profile {
  display: none;
}

.account-signin-copy {
  margin: 4px 22px 14px;
  color: #aaa;
  font-size: 11px;
  line-height: 1.55;
}

.account-signin-copy span {
  display: block;
  margin-top: 8px;
  color: #707070;
}

.account-profile img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
}

.account-profile__placeholder {
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 !important;
  place-items: center;
  border: 1px solid #2d2d2d;
  border-radius: 50%;
  color: #a8a8a8 !important;
  background: #0b0b0b;
}

.account-profile__placeholder .tabler-icon {
  width: 40px;
  height: 40px;
}

.account-profile strong {
  margin-top: 10px;
  font-size: 18px;
}

.account-profile span {
  margin-top: 2px;
  color: #8d8d8d;
  font-size: 11.5px;
}

.account-actions {
  display: grid;
}

.account-actions--signin {
  padding: 0 22px 22px;
}

.account-actions a,
.account-actions button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  border: 0;
  color: #f0f0f0;
  background: transparent;
  font-size: 13.5px;
  text-align: left;
  text-decoration: none;
}

.account-actions b {
  color: #555;
  font-size: 18px;
}

.account-authenticated {
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #303030 transparent;
}

.account-menu {
  display: grid;
  padding: 0 22px 20px;
}

.account-menu button {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  gap: 14px;
  align-items: center;
  padding: 0 2px;
  border: 0;
  color: #f4f4f4;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.account-menu button:hover,
.account-menu button:focus-visible {
  color: var(--blue-bright);
}

.account-menu i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--blue-bright);
  font-style: normal;
}

.account-menu i .tabler-icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.account-menu b {
  color: #666;
  font-size: 18px;
  font-weight: 400;
  text-align: right;
}

.account-section {
  padding: 14px 24px 24px;
}

.account-section__copy {
  margin: 6px 0 16px;
  color: #aaa;
  font-size: 11.5px;
  line-height: 1.55;
}

.account-password-form {
  display: grid;
  gap: 12px;
}

.account-password-form label {
  display: grid;
  gap: 6px;
  color: #aaa;
  font-size: 10.5px;
  letter-spacing: .04em;
}

.account-password-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 8px;
  outline: 0;
  color: #fff;
  background: #111;
  font: inherit;
}

.account-password-form input:focus {
  border-color: #707070;
}

.account-password-form .account-action {
  margin-top: 2px;
}

.account-password-form .account-action:disabled {
  opacity: .5;
  pointer-events: none;
}

.account-password-status {
  min-height: 16px;
  margin: 0;
  color: #d7d7d7;
  font-size: 11px;
  line-height: 1.45;
}

.account-row {
  display: grid;
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
}

.account-row:last-of-type {
  border-bottom: 0;
}

.account-row strong,
.account-row small {
  display: block;
}

.account-row strong {
  color: #fff;
  font-size: 12.5px;
}

.account-row small {
  margin-top: 3px;
  color: #929292;
  font-size: 10.5px;
}

.account-row > b {
  max-width: 164px;
  overflow-wrap: anywhere;
  color: #f2f2f2;
  font-size: 10.5px;
  font-weight: 750;
  text-align: right;
}

.account-switch {
  display: flex;
  width: 30px;
  height: 16px;
  align-items: center;
  justify-content: flex-start;
  padding: 1px;
  border: 1px solid #565656;
  border-radius: 999px;
  background: transparent;
}

.account-switch span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c0c0c0;
}

.account-switch.is-on {
  justify-content: flex-end;
  border-color: #606060;
  background: #303030;
}

.account-switch.is-on span {
  background: #f4f4f4;
}

.account-accent {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #b8b8b8;
}

.account-action {
  min-height: 38px;
  margin-top: 16px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  color: #fff;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .09em;
}

.account-action:hover,
.account-action:focus-visible {
  border-color: #707070;
  color: #fff;
  background: #111;
}

.account-action--primary {
  border-color: #565656;
  color: #f4f4f4;
  background: transparent;
}

.account-action--primary:hover,
.account-action--primary:focus-visible {
  border-color: #8a8a8a;
  color: #fff;
  background: #111;
}

.account-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-shell[data-account-large-text="true"] .account-menu button {
  font-size: 15.5px;
}

.app-shell[data-account-large-text="true"] .account-row strong {
  font-size: 14px;
}

.app-shell[data-account-compact="false"] .account-menu button,
.app-shell[data-account-compact="false"] .account-row {
  min-height: 58px;
}

.app-shell[data-account-reduce-motion="true"] .account-panel {
  transition: none;
}

.scrim {
  z-index: 60;
  background: rgb(0 0 0 / 58%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.app-shell[data-nav-open="true"] .scrim,
.app-shell[data-account-open="true"] .scrim {
  display: block;
}

@media (max-width: 700px) {
  .app-shell,
  .app-shell[data-context-open="true"] {
    grid-template:
      "top" 104px
      "main" minmax(0, 1fr)
      / minmax(0, 1fr);
  }

  .topbar {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    grid-template-rows: 52px 44px;
    gap: 0 8px;
    padding: 0 10px 8px;
  }

  .nav-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin: 0;
  }

  .brand__maker {
    display: none;
  }

  .interaction-mode--top {
    grid-column: 1 / -1;
    grid-row: 2;
    width: min(280px, 100%);
    margin: 0;
    justify-self: center;
  }

  .interaction-mode--top button {
    flex: 1 1 0;
    padding-inline: 9px;
    font-size: 10.5px;
  }

  .account-trigger {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .conversation {
    padding: 0 12px 12px;
  }

  .composer__row {
    min-height: 48px;
  }
}

/* Valentina commercial navigation and canonical account surface. */
.navigation__brand {
  display: block;
  width: auto;
  max-width: 174px;
  height: 26px;
  object-fit: contain;
}

.navigation__identity {
  display: grid;
  gap: 3px;
}

.navigation__identity small {
  color: #8f8f8f;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .04em;
}

.navigation__head {
  min-height: 44px;
  align-items: center;
}

.new-chat {
  display: flex;
  width: 100%;
  align-items: center;
  border: 1px solid #292929;
  border-radius: 10px;
  background: transparent;
}

.new-chat:hover,
.new-chat:focus-visible {
  border-color: #4a4a4a;
  color: #fff;
  background: #111;
}

.contextual-destinations {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.capability-group {
  margin-top: 14px;
}

.capability-group > .eyebrow,
.navigation__resources > .eyebrow,
.navigation__section > .eyebrow {
  padding: 0 10px;
  color: var(--valentina-magenta);
  font-size: 9px;
  letter-spacing: .14em;
}

.navigation__resources {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #1f1f1f;
}

.contextual-destinations button {
  display: grid;
  width: 100%;
  min-height: 38px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #b9b9b9;
  background: transparent;
  text-align: left;
}

.contextual-destinations button:hover,
.contextual-destinations button:focus-visible {
  color: #fff;
  background: #111;
}

.contextual-destinations button[aria-current="page"] {
  color: #fff;
  background: #151515;
}

.contextual-destinations button:disabled,
.contextual-destinations button[aria-disabled="true"] {
  color: #565656;
  background: transparent;
  cursor: default;
  opacity: 1;
}

.contextual-destinations button:disabled .tabler-icon,
.contextual-destinations button[aria-disabled="true"] .tabler-icon {
  color: #565656;
}

.contextual-destinations .tabler-icon,
.new-chat .tabler-icon {
  width: 18px;
  height: 18px;
  color: var(--valentina-magenta);
}

.account-trigger {
  position: static;
  display: grid;
  width: 100%;
  height: 56px;
  min-height: 56px;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 8px;
  overflow: visible;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 11px;
  color: #f4f4f4;
  background: #0d0d0d;
  text-align: left;
}

.account-trigger:hover,
.account-trigger:focus-visible,
.account-trigger[aria-expanded="true"] {
  border-color: #3a3a3a;
  background: #151515;
}

.account-trigger__avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 50%;
  background: #080808;
}

.account-trigger__avatar > span,
.account-trigger__avatar > img {
  width: 100%;
  height: 100%;
}

.account-trigger__avatar > span {
  display: grid;
  place-items: center;
}

.account-trigger__avatar > img {
  display: block;
  object-fit: cover;
}

.account-trigger__identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-trigger__identity strong,
.account-trigger__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger__identity strong {
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.account-trigger__identity small {
  color: #929292;
  font-size: 9.5px;
}

.account-trigger > b {
  color: #8e8e8e;
  font-size: 11px;
  letter-spacing: 1px;
}

.project-create {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #292929;
  border-radius: 12px;
  background: transparent;
}

.project-create[hidden] {
  display: none !important;
}

.project-create label {
  display: grid;
  gap: 6px;
  color: #aaa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-create input,
.project-create textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 8px;
  outline: 0;
  color: #fff;
  background: #0b0b0b;
  resize: vertical;
}

.project-create input:focus,
.project-create textarea:focus {
  border-color: #707070;
}

.project-create__status {
  min-height: 16px;
  margin: 0;
  color: #c9c9c9;
  font-size: 11px;
}

@media (min-width: 901px) {
  .app-shell,
  .app-shell[data-context-open="true"] {
    grid-template:
      "nav top" 58px
      "nav main" minmax(0, 1fr)
      / 264px minmax(0, 1fr);
  }

  .topbar {
    grid-area: top;
    border-bottom: 0;
  }

  .topbar .product-switcher--brand {
    visibility: hidden;
  }

  .rail {
    display: none !important;
  }

  .navigation,
  .app-shell[data-nav-open="true"] .navigation {
    position: relative;
    z-index: 40;
    top: auto;
    bottom: auto;
    left: auto;
    grid-area: nav;
    display: flex;
    width: auto;
    min-width: 0;
    height: 100vh;
    padding: 12px 12px 14px;
    visibility: visible;
    opacity: 1;
    overflow: hidden;
    border-right: 1px solid #1f1f1f;
    background: #070707;
    transform: none;
  }

  .navigation__head > button,
  .navigation__resize {
    display: none !important;
  }

  .navigation__section--pinned {
    margin-top: 18px;
  }

  .navigation__section--recent {
    min-height: 0;
    margin-top: 14px;
    overflow-y: auto;
  }

  .conversation {
    grid-area: main;
  }

  .account-panel {
    z-index: 75;
    top: auto;
    bottom: 80px;
    left: 12px;
    width: 352px;
    max-height: calc(100vh - 104px);
    border-color: #292929;
    border-radius: 12px;
    background: rgb(8 8 8 / 98%);
    transform: translateY(10px);
  }

  .app-shell[data-account-open="true"] .account-panel {
    transform: none;
  }

  .app-shell[data-nav-open="true"] .scrim {
    display: none;
  }

  .app-shell[data-account-open="true"] .scrim {
    display: block;
  }
}

@media (max-width: 900px) {
  .navigation {
    display: flex;
    flex-direction: column;
  }

  .account-trigger {
    margin-top: auto;
  }
}

/* Readable canonical lockups at product sizes. */
.brand__logo {
  width: 200px;
  max-width: min(200px, calc(100vw - 88px));
  height: auto;
}

.navigation__head {
  min-height: 62px;
}

.navigation > .new-chat {
  margin-top: 10px;
}

.history-row__actions,
.conversation-history__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-row__delete,
.conversation-history__delete {
  color: #737373 !important;
}

.history-row__delete:hover,
.history-row__delete:focus-visible,
.conversation-history__delete:hover,
.conversation-history__delete:focus-visible {
  color: #f4f4f4 !important;
}

.navigation__brand {
  width: 220px;
  max-width: 100%;
  height: auto;
}

/* Canonical Valentina accent: only small navigation titles and icons. */
.capability-group > .eyebrow,
.navigation__resources > .eyebrow,
.navigation__section > .eyebrow {
  color: var(--valentina-magenta);
  font-size: 9px;
}

.contextual-destinations .tabler-icon,
.new-chat .tabler-icon {
  color: var(--valentina-magenta);
}

.contextual-destinations button:disabled,
.contextual-destinations button[aria-disabled="true"],
.contextual-destinations button:disabled .tabler-icon,
.contextual-destinations button[aria-disabled="true"] .tabler-icon {
  color: #565656;
  background: transparent;
  cursor: default;
  opacity: 1;
}

.brand__logo {
  height: 38px;
}

.navigation__brand {
  max-width: 220px;
  height: 38px;
}

@media (max-width: 430px) {
  .brand__logo {
    height: 32px;
  }

  .navigation__brand {
    max-width: 196px;
    height: 34px;
  }
}

.message {
  display: block;
  padding: 14px 0;
}

.message + .message {
  border: 0;
}

.message__avatar,
.message__author-mark {
  display: none;
}

.message__content {
  width: min(100%, 720px);
}

.message--user .message__content {
  width: fit-content;
  max-width: min(78%, 620px);
  margin-left: auto;
  padding: 10px 15px;
  border-radius: 18px;
  background: #202020;
}

.message--assistant .message__content {
  margin-right: auto;
}

.message__content > p:not(.message__meta) {
  color: #ededed;
  font-size: var(--message-font-size);
  line-height: 1.65;
}

.receipt-summary {
  display: none;
}

.receipt-details {
  display: none;
  margin-top: 12px;
  padding: 12px 0;
  color: #777;
}

.receipt-details[open] {
  display: block;
}

.receipt-details > summary {
  display: none;
}

.message-actions {
  display: flex;
  gap: 4px;
  margin-top: 9px;
}

.message-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  color: #989898;
  background: transparent;
}

.message-actions button:hover {
  color: #ededed;
}

.message-actions svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 430px) {
  .brand__name {
    font-size: 12px;
    letter-spacing: .17em;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .interaction-mode--top button {
    padding-inline: 7px;
  }

  .interaction-mode--top button[data-interaction-mode="research"] {
    font-size: 10.5px;
  }
}

@media (min-width: 701px) {
  .app-shell,
  .app-shell[data-context-open="true"] {
    grid-template:
      "nav top" 58px
      "nav main" minmax(0, 1fr)
      / 54px minmax(0, 1fr);
  }

  .topbar {
    grid-area: top;
  }

  .nav-toggle {
    display: none;
  }

  .navigation,
  .app-shell[data-nav-open="true"] .navigation {
    position: relative;
    z-index: 30;
    grid-area: nav;
    top: auto;
    bottom: auto;
    width: 54px;
    padding: 12px 7px 64px;
    visibility: visible;
    opacity: 1;
    overflow: hidden;
    border-right: 1px solid #1f1f1f;
    transform: none;
  }

  .new-chat {
    width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    color: transparent;
    white-space: nowrap;
  }

  .new-chat .tabler-icon {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    color: #d8d8d8;
  }

  .new-chat > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .navigation__section,
  .capabilities,
  .product-nav,
  .navigation__maker {
    display: none;
  }

  .rail-products {
    display: grid;
    gap: 5px;
    margin-top: 8px;
  }

  .rail-products button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 0;
    color: #8a8a8a;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
  }

  .rail-products button[aria-current="page"] {
    color: var(--blue-bright);
  }

  .rail-products .tabler-icon {
    width: 21px;
    height: 21px;
  }

  .brand {
    margin-left: 2px;
  }
}

@media (max-width: 700px) {
  .rail-products {
    display: none;
  }
}

/* Canonical navigation: one product, one rail, one contextual panel. */
.app-shell,
.app-shell[data-context-open="true"] {
  grid-template:
    "rail top" 58px
    "rail main" minmax(0, 1fr)
    / 48px minmax(0, 1fr);
}

.topbar {
  grid-area: top;
}

.rail {
  position: relative;
  z-index: 62;
  grid-area: rail;
  display: flex;
  min-width: 48px;
  flex-direction: column;
  align-items: center;
  padding: 9px 4px 8px;
  border-right: 1px solid #171717;
  background: #000;
  transition: box-shadow 150ms ease;
}

.rail__primary,
.rail__secondary {
  display: grid;
  gap: 4px;
}

.rail__secondary {
  margin-top: auto;
}

.rail button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #d7d7d7;
  background: transparent;
}

.rail button:hover,
.rail button:focus-visible {
  color: #fff;
  background: #171717;
}

.rail button::after {
  position: absolute;
  z-index: 80;
  top: 50%;
  left: calc(100% + 9px);
  padding: 6px 8px;
  visibility: hidden;
  opacity: 0;
  border: 1px solid #252525;
  border-radius: 6px;
  color: #f2f2f2;
  background: #111;
  content: attr(data-tooltip);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 100ms ease, visibility 100ms ease;
  white-space: nowrap;
}

.rail button[data-tooltip]:hover::after,
.rail button[data-tooltip]:focus-visible::after {
  visibility: visible;
  opacity: 1;
}

.rail .tabler-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.7;
  transition: transform 110ms ease;
}

.rail button:hover .tabler-icon,
.rail button:focus-visible .tabler-icon {
  transform: scale(1.14);
}

.rail .account-trigger {
  position: relative;
  z-index: auto;
  bottom: auto;
  left: auto;
  width: 34px;
  height: 34px;
  margin: 3px 0;
  border-color: #282828;
}

.rail__more {
  display: none !important;
}

.rail__drag-handle {
  position: absolute;
  z-index: 3;
  top: 58px;
  right: -4px;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  touch-action: none;
}

.navigation .navigation__resize {
  display: block !important;
}

.navigation,
.app-shell[data-nav-open="true"] .navigation {
  position: fixed;
  z-index: 61;
  top: 58px;
  bottom: 0;
  left: 48px;
  width: var(--nav-width, 260px);
  padding: 14px 12px 18px;
  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid #1b1b1b;
  background: #080808;
  transform: translateX(-16px);
  transition: transform 150ms ease, opacity 150ms ease, visibility 150ms ease;
}

.app-shell[data-nav-open="true"] .navigation {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.navigation__head {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  color: #a3a3a3;
  font-size: 10px;
  letter-spacing: .14em;
}

.navigation__head button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  color: #9a9a9a;
  background: transparent;
}

.navigation__head .tabler-icon {
  width: 18px;
  height: 18px;
}

.contextual-destinations,
.mobile-more-actions {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.contextual-destinations[hidden],
.mobile-more-actions {
  display: none;
}

.app-shell[data-panel-kind="history"] [data-panel-group="data"],
.app-shell[data-panel-kind="data"] [data-panel-group="history"],
.app-shell[data-panel-kind="data"] .navigation__section {
  display: none;
}

.contextual-destinations button,
.mobile-more-actions button {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #d6d6d6;
  background: transparent;
  font-size: 12.5px;
  text-align: left;
}

.contextual-destinations button:hover,
.mobile-more-actions button:hover {
  color: #fff;
  background: #151515;
}

.navigation__section {
  margin-top: 22px;
}

.navigation__section .eyebrow {
  color: var(--quiet);
  font-size: 10px;
  letter-spacing: .15em;
}

.conversation {
  grid-area: main;
}

@media (min-width: 701px) {
  .app-shell[data-nav-open="true"] .scrim {
    display: none;
  }
}

@media (max-width: 700px) {
  .app-shell,
  .app-shell[data-context-open="true"] {
    grid-template:
      "top" 102px
      "main" minmax(0, 1fr)
      "mobile-nav" calc(58px + env(safe-area-inset-bottom))
      / minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 52px 42px;
    padding: 0 12px 8px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .product-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .product-switcher--brand {
    grid-column: 1;
    justify-self: start;
  }

  .interaction-mode--top {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin-left: 0;
    transform: none;
  }

  .rail {
    position: relative;
    z-index: 62;
    grid-area: mobile-nav;
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    padding: 5px 5px env(safe-area-inset-bottom);
    border-top: 1px solid #171717;
    border-right: 0;
    transition: none;
  }

  .rail__drag-handle,
  .navigation .navigation__resize {
    display: none !important;
  }

  .rail:hover,
  .rail:focus-within {
    width: auto;
    padding: 5px 5px env(safe-area-inset-bottom);
    box-shadow: none;
  }

  .rail:hover button,
  .rail:focus-within button {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .rail__primary {
    display: contents;
  }

  .rail__secondary {
    display: contents;
  }

  .rail button {
    width: 100%;
    height: 48px;
    justify-self: stretch;
  }

  .rail .nav-toggle,
  .rail .account-trigger {
    grid-column: auto;
    grid-row: auto;
  }

  .rail .account-trigger {
    width: 34px;
    height: 34px;
    align-self: center;
    justify-self: center;
  }

  .rail button::after {
    display: none;
  }

  .navigation,
  .app-shell[data-nav-open="true"] .navigation {
    top: auto;
    right: 0;
    bottom: calc(58px + env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    max-height: min(66vh, 520px);
    padding: 12px 16px 20px;
    border-top: 1px solid #242424;
    border-right: 0;
    border-radius: 18px 18px 0 0;
    transform: translateY(18px);
  }

  .app-shell[data-nav-open="true"] .navigation {
    transform: translateY(0);
  }

  .conversation {
    width: 100%;
    min-width: 0;
    padding: 0 12px 10px;
  }

  .workspace-surface {
    padding: 26px 2px 18px;
  }

  .workspace-surface__heading > div {
    align-items: start;
  }

  .workspace-card__body,
  .workspace-card__action {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 18px 0;
  }

  .workspace-card:hover > .workspace-card__body,
  .workspace-card__action:hover,
  .workspace-card__action:focus-visible {
    padding-inline: 8px;
  }

  .workspace-card__status {
    justify-self: start;
    text-align: left;
  }

  .composer,
  .composer__row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .composer__row {
    grid-template-columns: 32px minmax(0, 1fr) 32px 36px;
    gap: 3px;
    padding-inline: 6px;
    overflow: hidden;
  }

  .composer textarea {
    min-width: 0;
  }

}

/* Final precedence for the commercial desktop shell. */
@media (min-width: 901px) {
  .app-shell,
  .app-shell[data-context-open="true"] {
    grid-template:
      "nav top" 58px
      "nav main" minmax(0, 1fr)
      / var(--nav-width) minmax(0, 1fr) !important;
  }

  .topbar {
    grid-area: top;
  }

  .topbar .product-switcher--brand {
    visibility: hidden;
  }

  .rail {
    display: none !important;
  }

  .navigation,
  .app-shell[data-nav-open="true"] .navigation {
    position: relative !important;
    z-index: 40;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    grid-area: nav;
    display: flex !important;
    width: auto !important;
    min-width: 0;
    height: 100vh;
    flex-direction: column;
    padding: 12px 12px 14px !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-right: 1px solid #1f1f1f !important;
    background: #070707 !important;
    transform: none !important;
  }

  .navigation__head > button {
    display: none !important;
  }

  .navigation .navigation__resize {
    display: block !important;
  }

  .navigation .contextual-destinations {
    display: grid;
  }

  .navigation .contextual-destinations > button:not([hidden]) {
    display: grid !important;
  }

  .navigation .contextual-destinations > button[hidden] {
    display: none !important;
  }

  .navigation__section--pinned {
    display: block !important;
    margin-top: 18px;
  }

  .navigation__section--recent {
    display: block !important;
    min-height: 0;
    margin-top: 14px;
    overflow-y: auto;
  }

  .conversation {
    grid-area: main;
  }

  .account-panel {
    top: auto !important;
    bottom: 80px !important;
    left: 12px !important;
    width: 352px;
    border-color: #292929;
    background: rgb(8 8 8 / 98%);
    transform: translateY(10px) !important;
  }

  .app-shell[data-account-open="true"] .account-panel {
    transform: none !important;
  }

  .app-shell[data-nav-open="true"] .scrim {
    display: none;
  }

  .app-shell[data-account-open="true"] .scrim {
    display: block;
  }
}

@media (max-width: 900px) {
  .navigation {
    display: flex;
    flex-direction: column;
  }

  .navigation .contextual-destinations > button:not([hidden]) {
    display: grid !important;
  }

  .account-trigger {
    margin-top: auto;
  }
}

/* Final lockup scale after every legacy responsive rule. */
.brand__logo {
  width: 240px;
  max-width: min(240px, calc(100vw - 88px));
  height: auto;
}

.navigation__head {
  min-height: 72px;
}

.navigation__brand {
  width: 236px;
  max-width: 100%;
  height: auto;
}

/* Canonical lockup: both pieces share the same lower visual baseline. */
.brand__lockup,
.navigation__identity {
  display: inline-flex;
  align-items: flex-end;
  gap: 7px;
}

.brand__isotype,
.navigation__isotype {
  display: block;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand__wordmark,
.navigation__wordmark {
  display: inline-flex;
  flex: 0 1 188px;
  width: 188px;
  max-width: calc(100vw - 147px);
  align-items: flex-start;
  padding-bottom: 5px;
  overflow: visible;
}

.brand__wordmark-text,
.navigation__wordmark-text {
  display: block;
  color: #f4f4f4;
  font-family: "Valentina Montserrat", "Montserrat", "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .105em;
  line-height: .82;
  white-space: nowrap;
}

.brand__registered,
.navigation__registered {
  position: relative;
  top: -1px;
  flex: 0 0 auto;
  margin-left: 1px;
  color: #f4f4f4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* Independent maker attribution: never part of the Valentina title lockup. */
.navigation__maker {
  display: block;
  flex: 0 0 auto;
  margin: auto 8px 7px;
  color: #858585;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* Conversation rows keep their full width; secondary actions float above it. */
.history-row {
  position: relative;
  display: block;
}

.history-row__open {
  width: 100% !important;
  padding-right: 8px !important;
}

.history-row__actions {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 2px;
  display: flex;
  gap: 2px;
  align-items: center;
  padding-left: 18px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #070707 18px);
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 120ms ease;
}

.history-row:hover .history-row__actions,
.history-row:focus-within .history-row__actions {
  opacity: 1;
  pointer-events: auto;
}

.history-row__pin {
  display: grid !important;
  width: 28px !important;
  height: 28px;
  place-items: center;
  padding: 0 !important;
  border-radius: 6px !important;
  background: #070707 !important;
}

.history-row__pin .tabler-icon {
  width: 16px;
  height: 16px;
}

.history-row__pin[aria-pressed="true"] {
  color: var(--valentina-magenta) !important;
}

@media (hover: none) {
  .history-row__open {
    padding-right: 64px !important;
  }

  .history-row__actions {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Desktop sidebar: continuous resize and a true icon-only dock at minimum width. */
@media (min-width: 901px) {
  .navigation__section--recent {
    flex: 1 1 auto;
  }

  .app-shell[data-nav-docked="true"] .navigation {
    align-items: stretch;
    padding: 10px 8px 12px !important;
  }

  .app-shell[data-nav-docked="true"] .navigation__head {
    justify-content: center;
    min-height: 52px;
  }

  .app-shell[data-nav-docked="true"] .navigation__identity {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .app-shell[data-nav-docked="true"] .navigation__isotype {
    width: 42px;
    height: 42px;
    object-fit: contain;
  }

  .app-shell[data-nav-docked="true"] .navigation__wordmark {
    display: none !important;
  }

  .app-shell[data-nav-docked="true"] .new-chat,
  .app-shell[data-nav-docked="true"] .contextual-destinations button,
  .app-shell[data-nav-docked="true"] .account-trigger {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    padding-inline: 0;
  }

  .app-shell[data-nav-docked="true"] .new-chat span,
  .app-shell[data-nav-docked="true"] .contextual-destinations button span,
  .app-shell[data-nav-docked="true"] .capability-group .eyebrow,
  .app-shell[data-nav-docked="true"] .navigation__resources .eyebrow,
  .app-shell[data-nav-docked="true"] .navigation__section,
  .app-shell[data-nav-docked="true"] .navigation__maker,
  .app-shell[data-nav-docked="true"] .account-trigger__identity,
  .app-shell[data-nav-docked="true"] .account-trigger > b {
    display: none !important;
  }

  .app-shell[data-nav-docked="true"] .contextual-destinations {
    justify-items: center;
  }

  .app-shell[data-nav-docked="true"] .contextual-destinations .tabler-icon {
    width: 19px;
    height: 19px;
  }

  .app-shell[data-nav-docked="true"] .account-trigger {
    margin-top: auto;
  }
}

/* Final account treatment: identity is free-standing in the sidebar. */
.account-trigger,
.account-trigger:hover,
.account-trigger:focus-visible,
.account-trigger[aria-expanded="true"] {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

.purple-authorization { display:flex; gap:9px; align-items:flex-start; margin:8px 12px 0; color:#bdbdbd; font-size:11px; line-height:1.4; }
.purple-authorization[hidden] { display:none; }
.purple-authorization input { margin-top:2px; accent-color:#e31b5d; }
.history-row__open { padding-right:64px !important; }
.history-row__actions { opacity:1; pointer-events:auto; }
.interaction-mode--top { max-width:100%; }

.navigation__identity { min-width:0; flex:1 1 auto; gap:6px; }
.navigation__isotype { width:46px; height:46px; flex-basis:46px; }
.navigation__wordmark { min-width:0; width:auto; max-width:100%; flex:1 1 auto; overflow:hidden; }
.navigation__wordmark-text { font-size:18px; letter-spacing:.06em; }
.navigation__registered { font-size:10px; }
.navigation__head-actions { display:flex; flex:0 0 auto; gap:2px; align-items:center; }
.navigation__head-actions .new-chat {
  display:grid;
  width:32px;
  min-height:32px;
  place-items:center;
  padding:0;
  border:0;
}
.navigation__conversations[open] { min-height:0; overflow-y:auto; }
.navigation__conversations > summary[hidden] { display:none; }
.navigation__conversation-group { min-height:0; }
.navigation__conversation-group > summary {
  display:flex;
  min-height:34px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 10px;
  color:var(--quiet);
  cursor:pointer;
  font-size:10px;
  font-weight:700;
  letter-spacing:.15em;
  list-style:none;
}
.navigation__conversation-group > summary::-webkit-details-marker { display:none; }
.navigation__conversation-group > summary .tabler-icon {
  width:15px;
  height:15px;
  transition:transform 160ms ease;
}
.navigation__conversation-group:not([open]) > summary .tabler-icon { transform:rotate(-90deg); }
.navigation__conversation-group .navigation__section { margin:0; }
.navigation__conversation-group--recent[open] { display:flex; min-height:0; flex:1 1 auto; flex-direction:column; padding-bottom:8px; }
.navigation__conversation-group--recent .navigation__section--recent { flex:1 1 auto; }
.navigation__maker { flex:0 0 auto; margin:8px 8px 7px; }
.navigation > .account-trigger { flex:0 0 auto; margin-top:0; }

@media (max-width: 899px) {
  .interaction-mode--top { width:100%; overflow-x:auto; justify-content:center; scrollbar-width:none; }
  .interaction-mode--top::-webkit-scrollbar { display:none; }
  .interaction-mode--top button { flex:0 0 auto; padding-inline:7px; font-size:9px; letter-spacing:.02em; }
  .navigation__conversations[open] { flex:0 0 auto; overflow:visible; }
  .navigation__conversation-group--recent[open] { flex:0 0 auto; }
  .navigation__conversation-group--recent .navigation__section--recent { flex:0 0 auto; }
}

@media (min-width: 701px) and (max-width: 900px) {
  .app-shell[data-nav-open="true"] .navigation { overflow-x:hidden; }
  .app-shell[data-nav-open="true"] .navigation__section,
  .app-shell[data-nav-open="true"] .navigation__maker { display:block; }
  .app-shell[data-nav-open="true"] .navigation__isotype { display:none; }
  .app-shell[data-nav-open="true"] .navigation__wordmark { width:auto; max-width:100%; }
  .app-shell[data-nav-open="true"] .navigation__wordmark-text { font-size:19px; letter-spacing:.06em; }
}

@media (min-width: 901px) {
  .navigation__head-actions [data-action="close-navigation"] { display:none; }
}
