:root {
  --page: #ffffff;
  --sidebar: #f7f7f6;
  --sidebar-line: #e6e6e4;
  --paper: #ffffff;
  --paper-soft: #f2f2f1;
  --ink: #1b1d21;
  --muted: #707782;
  --faint: #ececea;
  --blue: #4a9eff;
  --blue-dark: #1769d1;
  --green: #27a679;
  --shadow: 0 18px 46px rgba(22, 27, 34, 0.08);
  --sidebar-expanded-width: 230px;
  --sidebar-width: var(--sidebar-expanded-width);
  --sidebar-motion: 380ms;
  --sidebar-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --floating-control-edge: clamp(14px, 2.4vw, 34px);
  --floating-control-bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(76px, 10svh, 108px));
  --floating-control-stack-gap: clamp(12px, 2svh, 18px);
  --floating-feedback-size: 40px;
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  position: relative;
  min-height: 100svh;
  background: #fff;
  overflow: hidden;
}

.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 8px 10px;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: contain;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-line);
  transition:
    width var(--sidebar-motion) var(--sidebar-ease),
    gap var(--sidebar-motion) var(--sidebar-ease),
    border-color 220ms ease,
    box-shadow var(--sidebar-motion) var(--sidebar-ease);
  will-change: width;
}

@media (min-width: 761px) {
  .app-shell:not(.sidebar-collapsed) {
    --sidebar-width: var(--sidebar-expanded-width);
  }
}

.app-shell.is-resizing-sidebar,
.app-shell.is-resizing-sidebar * {
  cursor: ew-resize !important;
  user-select: none;
}

.app-shell.is-resizing-sidebar .side-rail,
.app-shell.is-resizing-sidebar .workspace,
.app-shell.is-resizing-sidebar .model-status {
  transition-duration: 0ms;
}

@media (min-width: 761px) {
  .app-shell.sidebar-collapsed {
    --sidebar-width: 62px;
  }

  .app-shell.sidebar-collapsed .side-rail {
    width: var(--sidebar-width);
    gap: 10px;
  }

  .app-shell.sidebar-collapsed .new-chat-button,
  .app-shell.sidebar-collapsed .rail-item {
    justify-content: center;
    grid-template-columns: 22px;
    gap: 0;
    padding-inline: 10px;
  }

  .app-shell.sidebar-collapsed .sidebar-top {
    justify-content: center;
    padding-inline: 0;
  }

  .app-shell.sidebar-collapsed .brand-lockup {
    position: absolute;
    width: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
  }

  .app-shell.sidebar-collapsed .sidebar-resizer {
    opacity: 0;
    pointer-events: none;
  }

  .app-shell.sidebar-collapsed .new-chat-button {
    width: 40px;
    min-height: 40px;
    align-self: center;
    grid-template-columns: 20px;
    padding: 0;
    border-radius: 10px;
  }

  .app-shell.sidebar-collapsed .brand-word {
    max-width: 0;
    opacity: 0;
    transform: translateX(-6px);
  }

  .app-shell.sidebar-collapsed .new-chat-button > span:not(.side-icon),
  .app-shell.sidebar-collapsed .rail-item > span:not(.side-icon):not(.side-more),
  .app-shell.sidebar-collapsed .rail-item .chevron,
  .app-shell.sidebar-collapsed .shortcut {
    position: absolute;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
  }

  .app-shell.sidebar-collapsed .sidebar-history {
    flex-basis: 0;
    min-height: 0;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
  }

  .app-shell.sidebar-collapsed .invite-access-button,
  .app-shell.sidebar-collapsed .side-rail .plan-meter,
  .app-shell.sidebar-collapsed .sidebar-bottom {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
  }
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 4px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #202226;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0;
  transition:
    gap var(--sidebar-motion) var(--sidebar-ease),
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
}

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

.brand-word {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  max-width: 70px;
  overflow: hidden;
  color: #202226;
  font-size: 14px;
  font-weight: 770;
  line-height: 1;
  white-space: nowrap;
  transition:
    max-width var(--sidebar-motion) var(--sidebar-ease),
    opacity 190ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.brand-word::before {
  content: attr(data-brand-text);
}

.brand-three,
.hero-three {
  display: inline-block;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
  margin-left: 0;
  text-shadow: none;
  transform: none;
}

.side-rail .brand-word {
  display: inline-flex;
}

.rail-toggle,
.icon-button,
.send-button,
.new-chat-button,
.rail-item,
.chat-title-button,
.history-item,
.history-item-open,
.history-action {
  background: transparent;
  color: inherit;
}

.rail-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #5f6670;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.rail-toggle::before {
  position: absolute;
  inset: 4px;
  border-radius: 7px;
  background: url("/assets/orb.svg") center / 22px 22px no-repeat;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 150ms ease,
    transform 180ms ease;
  content: "";
  pointer-events: none;
}

.rail-toggle svg {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  stroke-width: 1.55;
  transition:
    opacity 150ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

@media (min-width: 761px) {
  .sidebar-collapsed .rail-toggle svg {
    opacity: 0;
    transform: scaleX(-1) scale(0.9);
  }

  .app-shell.sidebar-collapsed .rail-toggle {
    border-color: transparent;
    background: transparent;
  }

  .app-shell.sidebar-collapsed .rail-toggle::before {
    opacity: 1;
    transform: scale(1);
  }

  .app-shell.sidebar-collapsed .rail-toggle:hover,
  .app-shell.sidebar-collapsed .rail-toggle:focus-visible {
    border-color: #dededb;
    background: #fff;
  }

  .app-shell.sidebar-collapsed .rail-toggle:hover::before,
  .app-shell.sidebar-collapsed .rail-toggle:focus-visible::before {
    opacity: 0;
    transform: scale(0.86);
  }

  .app-shell.sidebar-collapsed .rail-toggle:hover svg,
  .app-shell.sidebar-collapsed .rail-toggle:focus-visible svg {
    opacity: 1;
    transform: scaleX(-1);
  }
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 10px;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}

.sidebar-resizer::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--sidebar-line);
  transition:
    width 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
  content: "";
}

.sidebar-resizer:hover::after,
.sidebar-resizer:focus-visible::after,
.app-shell.is-resizing-sidebar .sidebar-resizer::after {
  width: 2px;
  background: #8ebced;
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.14);
}

.sidebar-resizer:focus-visible {
  outline: 0;
}

.new-chat-button {
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 7px;
  overflow: hidden;
  border: 1px solid #dfdfdd;
  border-radius: var(--radius);
  background: #fff;
  color: #202226;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  transition:
    grid-template-columns var(--sidebar-motion) var(--sidebar-ease),
    gap var(--sidebar-motion) var(--sidebar-ease),
    padding var(--sidebar-motion) var(--sidebar-ease),
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow var(--sidebar-motion) var(--sidebar-ease);
}

.side-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #17191d;
}

.side-icon svg {
  width: 17px;
  height: 17px;
}

.side-icon img {
  width: 17px;
  height: 17px;
  display: block;
  border-radius: 4px;
}

.rail-nav a.rail-item {
  text-decoration: none;
}

.shortcut {
  display: inline-flex;
  gap: 3px;
  color: #9b9fa6;
  max-width: 58px;
  overflow: hidden;
  transition:
    max-width var(--sidebar-motion) var(--sidebar-ease),
    opacity 190ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

kbd {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #f0f0ef;
  color: #8a8f97;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
}

.rail-nav {
  flex: 0 1 auto;
  min-height: 0;
  display: grid;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.rail-item {
  min-height: 34px;
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #22252b;
  font-size: 14px;
  text-align: left;
  transition:
    grid-template-columns var(--sidebar-motion) var(--sidebar-ease),
    gap var(--sidebar-motion) var(--sidebar-ease),
    padding var(--sidebar-motion) var(--sidebar-ease),
    background-color 180ms ease,
    color 180ms ease;
}

.rail-item > span:not(.side-icon):not(.beta):not(.side-more),
.new-chat-button > span:nth-child(2) {
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition:
    max-width var(--sidebar-motion) var(--sidebar-ease),
    opacity 190ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.rail-item:hover,
.rail-item.is-active,
.rail-toggle:hover,
.new-chat-button:hover,
.chat-title-button:hover,
.icon-button:hover,
.agent-pill:hover,
.model-select:hover,
.quick-chip:hover,
.ghost-button:hover,
.message-tools button:hover {
  background: #ededeb;
}

.rail-toggle:hover {
  border-color: #dededb;
  color: #202226;
}

.rail-item.is-active {
  color: #111317;
}

.muted-row {
  color: #8b9098;
}

.side-more {
  color: #8b9098;
  font-weight: 700;
  transition:
    max-width var(--sidebar-motion) var(--sidebar-ease),
    opacity 190ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.chevron {
  width: 15px;
  height: 15px;
  color: #9a9fa7;
  transition:
    opacity 190ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.beta {
  padding: 1px 5px 2px;
  border-radius: 4px;
  background: #ddecff;
  color: #2a76d2;
  font-size: 11px;
  max-width: 46px;
  overflow: hidden;
  transition:
    max-width var(--sidebar-motion) var(--sidebar-ease),
    opacity 190ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.app-shell.extras-collapsed .rail-item[data-panel="artifacts"],
.app-shell.extras-collapsed .rail-item[data-panel="code"],
.app-shell.extras-collapsed .rail-item[data-panel="swarm"] {
  display: none;
}

.sidebar-history {
  flex: 1 1 82px;
  min-height: 82px;
  max-height: 999px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
  overflow: hidden;
  opacity: 1;
  transition:
    flex-basis var(--sidebar-motion) var(--sidebar-ease),
    min-height var(--sidebar-motion) var(--sidebar-ease),
    max-height var(--sidebar-motion) var(--sidebar-ease),
    margin-top var(--sidebar-motion) var(--sidebar-ease),
    opacity 180ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.history-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-heading p {
  margin: 0;
  color: #8a8f97;
  font-size: 13px;
}

.history-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.history-search-toggle,
.history-archive-toggle {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #7f858e;
}

.history-search-toggle:hover,
.history-archive-toggle:hover,
.history-archive-toggle.is-active {
  background: #ececea;
}

.history-archive-toggle.is-active {
  color: #2b2f36;
}

.history-search-toggle svg,
.history-archive-toggle svg {
  width: 15px;
  height: 15px;
}

.history-search[hidden] {
  display: none;
}

.history-search input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #dcdee2;
  border-radius: var(--radius);
  background: #fff;
  color: #24272d;
  font-size: 12px;
}

.invite-access-button {
  flex: 0 0 auto;
  width: 100%;
  min-height: 48px;
  max-height: 56px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  overflow: hidden;
  border-radius: var(--radius);
  background: transparent;
  color: #262a31;
  text-align: left;
  transition:
    grid-template-columns var(--sidebar-motion) var(--sidebar-ease),
    gap var(--sidebar-motion) var(--sidebar-ease),
    min-height var(--sidebar-motion) var(--sidebar-ease),
    max-height var(--sidebar-motion) var(--sidebar-ease),
    padding var(--sidebar-motion) var(--sidebar-ease),
    opacity 180ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease),
    background-color 180ms ease;
}

.invite-access-button:hover,
.invite-access-button.is-active {
  background: #ecebea;
}

.invite-access-button strong,
.invite-access-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-access-button strong {
  font-size: 13px;
}

.invite-access-button small {
  margin-top: 2px;
  color: #8b9098;
  font-size: 11px;
}

.plan-meter {
  --meter-fill: 42%;
  --plan-track: #d8e1ec;
  position: fixed;
  z-index: 79;
  right: var(--floating-control-edge);
  bottom: calc(var(--floating-control-bottom) + var(--floating-feedback-size) + var(--floating-control-stack-gap));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(178px, calc(100vw - var(--floating-control-edge) - var(--floating-control-edge)));
  min-height: 34px;
  padding: 5px 10px 5px 6px;
  overflow: hidden;
  border: 1px solid rgba(102, 118, 140, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #171a1f;
  text-decoration: none;
  text-align: left;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 8px 24px rgba(36, 46, 64, 0.075), inset 0 1px 0 #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.plan-meter:hover,
.plan-meter:focus-visible,
.plan-meter.is-active {
  border-color: rgba(91, 112, 140, 0.28);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(36, 46, 64, 0.1);
  transform: translateY(-1px);
}

.plan-meter:focus-visible {
  outline: 2px solid rgba(99, 122, 154, 0.2);
  outline-offset: 3px;
}

.plan-meter[data-floating-dragged="true"] {
  right: auto;
  bottom: auto;
}

.app-shell:not([data-panel="chat"]) ~ .plan-meter,
.app-shell:not([data-panel="chat"]) ~ .feedback-bubble {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.plan-meter.is-active-plan {
  --meter-fill: 100%;
  --plan-track: #cfdbea;
}

.plan-meter[data-plan="moderato"] { --plan-track: #cedbeb; }
.plan-meter[data-plan="allegretto"] { --plan-track: #d8d5eb; }
.plan-meter[data-plan="allegro"] { --plan-track: #cfe3df; }
.plan-meter[data-plan="vivace"] { --plan-track: #e5d7e5; }
.plan-meter[data-plan="gray-test"] { --plan-track: #ddd8cb; }

.plan-meter.is-empty-plan,
.plan-meter.is-setup-required {
  --meter-fill: 48%;
  --plan-track: #d9e1ea;
}

.plan-meter-orb {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  animation: plan-note-breath 3.8s ease-in-out infinite;
}

.plan-meter-note {
  display: block;
  color: #7894b8;
  font-family: Baskerville, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  transform: translate(0, -0.5px) rotate(-5deg);
  opacity: 0.88;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86),
    0 6px 14px rgba(78, 96, 124, 0.18);
}

.plan-meter-copy,
.plan-meter-copy strong,
.plan-meter-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-meter-copy {
  min-width: 74px;
  align-self: end;
  animation: plan-line-breath 4.2s ease-in-out infinite;
}

.plan-meter-kicker,
.plan-meter-copy small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.plan-meter-copy strong {
  color: #171a1f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  transform: translateY(1px);
}

.plan-meter-bar {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(212, 220, 230, 0.72);
  box-shadow: 0 5px 14px rgba(80, 96, 120, 0.08);
}

.plan-meter-bar > span {
  display: block;
  width: var(--meter-fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--plan-track), rgba(236, 240, 246, 0.92));
  transition: width 260ms ease, background-color 260ms ease;
}

@keyframes plan-note-breath {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(0) scale(0.985);
  }

  52% {
    opacity: 0.94;
    transform: translateY(-1px) scale(1.035);
  }
}

@keyframes plan-line-breath {
  0%,
  100% {
    opacity: 0.82;
    transform: translateY(0);
  }

  52% {
    opacity: 1;
    transform: translateY(-0.5px);
  }
}

.sidebar-bottom {
  flex: 0 0 auto;
  max-height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px 26px;
  align-items: center;
  gap: 0;
  margin-top: 0;
  padding-top: 8px;
  overflow: hidden;
  opacity: 1;
  transition:
    max-height var(--sidebar-motion) var(--sidebar-ease),
    padding-top var(--sidebar-motion) var(--sidebar-ease),
    opacity 180ms ease,
    transform var(--sidebar-motion) var(--sidebar-ease);
}

.login-button {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--radius);
  background: transparent;
  color: #202226;
  font-weight: 650;
  text-align: left;
}

.login-button span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-button:disabled {
  cursor: not-allowed;
  color: #6b7280;
}

.login-dot {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 39%, #f8f8f8 0 4px, transparent 5px),
    radial-gradient(circle at 50% 80%, #f8f8f8 0 10px, transparent 11px),
    #dadcde;
  background-position: center;
  background-size: cover;
  color: #3b82f6;
  display: grid;
  font-size: 13px;
  font-weight: 750;
  place-items: center;
}

.bottom-icon {
  width: 26px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: transparent;
  color: #777d86;
  text-decoration: none;
}

.bottom-icon svg {
  width: 17px;
  height: 17px;
}

.login-button:hover,
.bottom-icon:hover {
  background: #ededeb;
}

.sidebar-history > p {
  margin: 0;
  padding: 0 0 0 0;
  color: #8a8f97;
  font-size: 13px;
}

.history-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: auto;
}

.history-empty {
  padding: 8px 0;
  color: #9a9fa7;
  font-size: 13px;
}

.history-item {
  position: relative;
  width: 100%;
  min-height: 40px;
  display: block;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  color: #2b2f36;
}

.history-item-open {
  width: 100%;
  min-height: 40px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 56px 8px 7px;
  border-radius: var(--radius);
  color: inherit;
  text-align: left;
  transition: color 0.16s ease;
}

.history-actions {
  position: absolute;
  top: 50%;
  right: 5px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.history-item:hover .history-actions,
.history-item:focus-within .history-actions,
.history-item.is-pinned .history-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.history-item.is-pinned:not(:hover):not(:focus-within) .history-action:not([data-history-action="pin"]) {
  display: none;
}

.history-action {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #6f7580;
}

.history-action:hover,
.history-action:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  color: #1f2937;
}

.history-action.is-pinned {
  background: #e4eefc;
  color: #245f9d;
  box-shadow: inset 0 0 0 1px rgba(36, 95, 157, 0.24);
}

.history-action.is-pinned:hover,
.history-action.is-pinned:focus-visible {
  background: #d7e7fb;
  color: #174b83;
}

.history-action.is-pinned svg {
  fill: currentColor;
  stroke: none;
}

.history-action.is-restore {
  color: #4e709f;
}

.history-action svg {
  width: 14px;
  height: 14px;
}

.history-item.is-active,
.history-item:hover {
  background: #ecebea;
}

.history-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
}

.history-item span {
  display: none;
}

.workspace {
  min-height: 100svh;
  margin-left: var(--sidebar-width);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  transition: margin-left var(--sidebar-motion) var(--sidebar-ease);
}

.conversation-column {
  min-width: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
}

.conversation-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
}

.mobile-menu-button {
  display: none !important;
  flex: 0 0 auto;
}

.app-shell:not(.chat-started) .chat-title-button,
.header-actions,
.model-status {
  visibility: hidden;
  pointer-events: none;
}

.app-shell.chat-started .chat-title-button {
  visibility: visible;
  pointer-events: auto;
}

.chat-title-button {
  min-width: 0;
  max-width: min(420px, 42vw);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: var(--radius);
  color: #2d3138;
  font-size: 14px;
}

.chat-title-button span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-title-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #8b9098;
}

.model-status {
  position: fixed;
  left: calc(var(--sidebar-width) + 20px);
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 260px;
  color: #858b94;
  font-size: 12px;
  transition:
    left var(--sidebar-motion) var(--sidebar-ease),
    opacity 180ms ease;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8a241;
}

.status-dot.is-ready {
  background: var(--green);
}

.status-dot.is-offline {
  background: #c45a6b;
}

.tool-drawer {
  position: fixed;
  top: 72px;
  right: 20px;
  bottom: 22px;
  z-index: 24;
  width: min(440px, calc(100vw - var(--sidebar-width) - 44px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #e0e3e8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.tool-drawer[hidden] {
  display: none;
}

.tool-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tool-drawer-head p {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.tool-drawer-head h2 {
  margin: 0;
  color: #101216;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

.tool-copy {
  margin: 0;
  color: #5e6470;
  font-size: 13px;
  line-height: 1.55;
}

.tool-drawer-body {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.tool-card,
.task-row,
.task-form {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #fff;
}

.tool-card strong,
.task-row strong {
  display: block;
  margin-bottom: 5px;
  color: #20242b;
  font-size: 14px;
  line-height: 1.25;
}

.tool-card span,
.task-row span {
  display: block;
  color: #66707c;
  font-size: 12px;
  line-height: 1.45;
}

.action-card {
  display: grid;
  gap: 10px;
}

.tool-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-card button {
  justify-self: start;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #111318;
  border-radius: var(--radius);
  background: #111318;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.action-card .tool-card-secondary {
  border-color: #d8dde5;
  background: #fff;
  color: #20242b;
}

.action-card .tool-card-secondary:hover {
  border-color: #adb8c7;
  background: #f3f5f8;
}

.plugin-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dfe2e6;
  border-radius: var(--radius);
  background: #fff;
  color: #272b31;
}

.tool-section-title {
  margin: 5px 0 -4px;
  color: #23272e;
  font-size: 13px;
}

.desktop-workbench {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #d9e2ee;
  border-radius: var(--radius);
  background: #f8fbff;
}

.desktop-workbench-head strong,
.desktop-launch-form > strong {
  display: block;
  margin-bottom: 4px;
  color: #171b21;
  font-size: 14px;
  line-height: 1.25;
}

.desktop-workbench-head span {
  display: block;
  color: #5e6875;
  font-size: 12px;
  line-height: 1.45;
}

.desktop-workbench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.desktop-workbench-grid button {
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  border: 1px solid #d8e0ea;
  border-radius: var(--radius);
  background: #fff;
  color: #171b21;
  text-align: left;
}

.desktop-workbench-grid button:hover {
  border-color: #aebccd;
  background: #f3f7fb;
}

.desktop-workbench-grid strong,
.desktop-workbench-grid span {
  display: block;
}

.desktop-workbench-grid strong {
  font-size: 18px;
  line-height: 1.1;
}

.desktop-workbench-grid span {
  margin-top: 4px;
  color: #687382;
  font-size: 12px;
  line-height: 1.25;
}

.desktop-launch-form {
  display: grid;
  gap: 10px;
}

.desktop-launch-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.capability-list {
  display: grid;
  gap: 8px;
}

.capability-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e5e9;
  border-radius: var(--radius);
  background: #fff;
}

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

.capability-row strong {
  margin-bottom: 4px;
  color: #20242b;
  font-size: 13px;
}

.capability-row span {
  color: #67707b;
  font-size: 11px;
  line-height: 1.4;
}

.capability-row small {
  margin-top: 5px;
  color: #8a9099;
  font-size: 10px;
}

.capability-row > button {
  min-width: 60px;
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #15171b;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}

.settings-form {
  display: grid;
  gap: 0;
  border: 1px solid #e2e5e9;
  border-radius: var(--radius);
  background: #fff;
}

.settings-form label {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #eceef1;
}

.settings-form label:last-child {
  border-bottom: 0;
}

.settings-form label > span,
.settings-form label small {
  display: block;
}

.settings-form label > span {
  color: #292d34;
  font-size: 12px;
  font-weight: 700;
}

.settings-form label small {
  margin-top: 3px;
  color: #858b94;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.35;
}

.settings-form select {
  min-width: 110px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dfe2e6;
  border-radius: 6px;
  background: #fff;
  color: #343941;
  font-size: 11px;
}

.settings-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-dark);
}

.memory-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e2e5ea;
  border-radius: var(--radius);
  background: #fff;
}

.memory-panel-head {
  display: grid;
  gap: 4px;
}

.memory-panel-head strong,
.memory-summary-card strong,
.memory-item strong {
  color: #20242b;
  font-size: 13px;
  line-height: 1.3;
}

.memory-panel-head span,
.memory-summary-card p,
.memory-item span,
.memory-item small {
  margin: 0;
  color: #69717d;
  font-size: 11px;
  line-height: 1.45;
}

.memory-panel-actions,
.memory-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-panel-actions button,
.memory-item-actions button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dce1e8;
  border-radius: var(--radius);
  background: #f7f8fa;
  color: #2f3540;
  font-size: 11px;
  font-weight: 720;
}

.memory-panel-actions button:first-child {
  border-color: #111318;
  background: #111318;
  color: #fff;
}

.memory-summary-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #edf0f4;
  border-radius: var(--radius);
  background: #fafbfc;
}

.memory-list {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.memory-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid #eceff3;
  border-radius: var(--radius);
  background: #fff;
}

.memory-item strong,
.memory-item span,
.memory-item small {
  display: block;
  overflow-wrap: anywhere;
}

.task-form {
  display: grid;
  gap: 10px;
}

.task-form label {
  display: grid;
  gap: 5px;
  color: #454c56;
  font-size: 12px;
  font-weight: 680;
}

.task-form input,
.task-form select,
.task-form textarea {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #dfe3e8;
  border-radius: var(--radius);
  background: #fff;
  color: #22262d;
}

.task-form textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.45;
}

.task-form button,
.task-actions button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: #111318;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.task-form .tool-card-secondary {
  border: 1px solid #d8dde5;
  background: #fff;
  color: #20242b;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.task-actions button.secondary {
  background: #f1f2f4;
  color: #333840;
}

.task-run-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #e5e9ef;
  border-radius: var(--radius);
  background: #fafcff;
  color: #5e6875;
  font-size: 11px;
  line-height: 1.4;
}

.task-run-list strong {
  margin-bottom: 0;
  color: #262b33;
  font-size: 12px;
}

.task-run-list span {
  display: block;
  color: #66707c;
  overflow-wrap: anywhere;
}

.task-run-list.is-error {
  border-color: #efd5dc;
  background: #fff8fa;
  color: #9b4054;
}

.tool-empty {
  padding: 14px;
  border: 1px dashed #d9dde4;
  border-radius: var(--radius);
  color: #6d7480;
  background: #fafbfc;
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-button,
.primary-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  color: #3a3e46;
  white-space: nowrap;
}

.ghost-button svg,
.primary-button svg {
  width: 16px;
  height: 16px;
}

.messages {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 24px 28px;
  scroll-behavior: smooth;
}

.empty-state {
  position: relative;
  min-height: calc(100svh - 86px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 42px;
}

.mode-intro {
  max-width: 520px;
  margin: 12px auto 0;
  color: #777d86;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.greeting {
  width: min(100%, 770px);
  display: grid;
  justify-items: center;
  gap: 0;
}

.greeting-orb {
  display: none;
}

.eyebrow {
  display: none;
  margin: 0 0 6px;
  color: #8b9099;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #050505;
  font-size: clamp(48px, 5.2vw, 64px);
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
}

.composer {
  position: relative;
  width: min(100%, 770px);
  min-height: 132px;
  padding: 17px 16px 14px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 10px;
  border: 1px solid #d4d6db;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(21, 25, 32, 0.035), 0 1px 3px rgba(21, 25, 32, 0.025);
}

.composer:focus-within {
  border-color: rgba(74, 158, 255, 0.46);
  box-shadow: 0 8px 22px rgba(74, 158, 255, 0.045), 0 1px 4px rgba(21, 25, 32, 0.035);
}

.composer.is-dragging {
  border-color: var(--blue);
  background: #f6fbff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.07);
}

textarea {
  width: 100%;
  height: 50px;
  min-height: 50px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

textarea::placeholder {
  color: #8a8d94;
}

textarea:focus-visible {
  outline: 0;
}

.attachment-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(100%, 260px);
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #e0e2e6;
  border-radius: var(--radius);
  background: #f7f8fa;
  color: #464b54;
  font-size: 12px;
}

.attachment-pill.is-image {
  padding-left: 5px;
}

.attachment-thumb {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 25, 34, 0.08);
}

.attachment-pill span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.attachment-pill small {
  flex: 0 0 auto;
  color: #2c7b60;
  font-size: 10px;
  font-weight: 700;
}

.attachment-pill button {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6e8ec;
  color: #676d76;
}

.source-controls {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: -32px 0 -30px;
  color: #777e88;
  font-size: 12px;
}

.source-controls[hidden] {
  display: none;
}

.source-controls > span {
  margin-right: 2px;
  font-weight: 700;
}

.source-controls button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dfe2e6;
  border-radius: var(--radius);
  background: #fff;
  color: #666d77;
}

.source-controls button[aria-pressed="true"] {
  border-color: rgba(74, 158, 255, 0.36);
  background: #edf6ff;
  color: #1769d1;
}

.draft-status {
  min-height: 16px;
  margin: -36px 0;
  color: #858b94;
  font-size: 11px;
  text-align: center;
}

.draft-status:empty {
  display: none;
}

.composer-actions,
.left-tools,
.right-tools {
  min-width: 0;
  display: flex;
  align-items: center;
}

.composer-actions {
  justify-content: space-between;
  gap: 16px;
}

.left-tools,
.right-tools {
  gap: 10px;
}

.left-tools {
  flex: 1 1 auto;
}

.right-tools {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #33363b;
}

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

.agent-pill,
.model-select,
.quick-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #31343a;
  white-space: nowrap;
}

.agent-pill {
  padding: 7px 10px;
}

.active-mode-label {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding-left: 2px;
  color: #8a8f97;
  font-size: 12px;
}

.agent-pill svg,
.quick-chip svg {
  width: 17px;
  height: 17px;
}

.model-select {
  min-width: 0;
  padding: 7px 5px 7px 12px;
  color: #272a30;
  font-size: 14px;
}

.model-select span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-select svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.send-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d7d8dc;
  color: #fff;
  transition: background 160ms ease, transform 160ms ease;
}

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

.composer.has-text .send-button,
.send-button:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

.send-button:disabled {
  cursor: wait;
  background: #aab0ba;
  transform: none;
}

.send-button.is-busy {
  background: #202226;
  transform: none;
}

.send-button.is-busy svg {
  display: none;
}

.send-button.is-busy::before {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #fff;
  content: "";
}

.quick-actions {
  width: min(100%, 800px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: -18px;
}

.quick-chip {
  padding: 8px 14px;
  border-color: #dedfe4;
  background: rgba(255, 255, 255, 0.72);
  color: #666b74;
}

.quick-chip.is-selected {
  color: var(--blue-dark);
  border-color: rgba(74, 158, 255, 0.32);
  background: rgba(74, 158, 255, 0.08);
}

.hero-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: -26px;
  color: #5f6670;
  font-size: 14px;
}

.hero-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #e2e4e8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.hero-links a:first-child {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.hero-links a:hover {
  background: #ededeb;
}

.hero-links a:first-child:hover {
  background: var(--blue-dark);
}

.product-content {
  padding: 88px 24px 108px;
  border-top: 1px solid #efefee;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}

.product-wrap {
  width: min(100%, 1120px);
  margin: 0 auto;
  color: #252932;
}

.section-kicker {
  margin: 0 0 10px;
  color: #6d737e;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.product-content h2 {
  max-width: 760px;
  margin: 32px 0 14px;
  color: #15181d;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 760;
}

.product-content h2:first-of-type {
  margin-top: 0;
}

.product-content h3 {
  margin: 0 0 9px;
  color: #171a1f;
  font-size: 17px;
  line-height: 1.25;
}

.product-content p,
.product-content li {
  color: #4b535f;
  font-size: 16px;
  line-height: 1.76;
}

.product-content p {
  margin: 0 0 15px;
}

.product-content a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 16px;
}

.feature-grid article {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #fff;
}

.feature-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
}

.story-intro {
  max-width: 820px;
  margin-bottom: 34px;
}

.story-intro h2 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.story-intro p {
  max-width: 740px;
  color: #4d5665;
  font-size: 18px;
  line-height: 1.72;
}

.story-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 36px 0 66px;
  border-top: 1px solid #dfe5ee;
  border-bottom: 1px solid #dfe5ee;
}

.story-pillars article {
  padding: 22px 24px 24px 0;
  border-right: 1px solid #dfe5ee;
}

.story-pillars article + article {
  padding-left: 24px;
}

.story-pillars article:last-child {
  border-right: 0;
}

.story-pillars span,
.story-step {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.story-pillars p {
  margin: 0;
  font-size: 14px;
  line-height: 1.66;
}

.story-chapters {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 12px;
  padding-left: 30px;
}

.story-chapters::before {
  position: absolute;
  top: 12px;
  bottom: 18px;
  left: 7px;
  width: 1px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.62), rgba(37, 99, 235, 0.1));
  content: "";
}

.story-chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.24fr);
  gap: 48px;
  align-items: center;
  padding: 58px 0;
  border-top: 1px solid #e2e8f0;
}

.story-chapter:first-child {
  border-top: 0;
  padding-top: 0;
}

.story-chapter::before {
  position: absolute;
  top: 66px;
  left: -28px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
  content: "";
}

.story-chapter:first-child::before {
  top: 10px;
}

.story-chapter:nth-child(even) .story-copy {
  order: 2;
}

.story-chapter:nth-child(even) .story-figure {
  order: 1;
}

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

.story-copy h3 {
  margin-bottom: 14px;
  color: #111827;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.story-copy p {
  max-width: 460px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.74;
}

.story-points {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.story-points li {
  position: relative;
  padding-left: 18px;
  color: #374151;
  font-size: 14px;
  line-height: 1.55;
}

.story-points li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  content: "";
}

.story-figure {
  margin: 0;
}

.story-visual {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  aspect-ratio: 1672 / 941;
  background: #eef2f7;
  box-shadow: 0 18px 54px rgba(31, 39, 51, 0.12);
  isolation: isolate;
}

.story-visual::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 15, 29, 0.6), rgba(7, 15, 29, 0.06) 52%, rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 82% 18%, rgba(96, 165, 250, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(15, 23, 42, 0.22));
  content: "";
  pointer-events: none;
}

.story-visual::after {
  position: absolute;
  right: 8%;
  bottom: 12%;
  left: 12%;
  z-index: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(147, 197, 253, 0.14), rgba(147, 197, 253, 0.72), rgba(147, 197, 253, 0.08));
  content: "";
  pointer-events: none;
  transform: rotate(-4deg);
  transform-origin: center;
}

.story-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.02);
}

.visual-label,
.visual-callout,
.visual-result,
.visual-format-grid,
.visual-flow,
.visual-checklist {
  position: absolute;
  z-index: 2;
  color: #f8fafc;
  letter-spacing: 0;
}

.visual-label {
  top: 22px;
  left: 22px;
  max-width: min(330px, 58%);
  padding: 14px 16px;
  border: 1px solid rgba(191, 219, 254, 0.38);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(14px);
}

.visual-label span,
.visual-callout span,
.visual-result span {
  display: block;
  margin-bottom: 4px;
  color: #bfdbfe;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-label strong,
.visual-callout strong,
.visual-result strong {
  display: block;
  font-size: 16px;
  line-height: 1.18;
}

.visual-label small {
  display: block;
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.86);
  font-size: 12px;
  line-height: 1.35;
}

.visual-callout {
  max-width: 190px;
  padding: 10px 12px;
  border-left: 2px solid #93c5fd;
  border-radius: 0 12px 12px 0;
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.visual-callout span {
  color: #2563eb;
  font-size: 9px;
}

.visual-callout strong {
  color: #111827;
  font-size: 12px;
  line-height: 1.25;
}

.visual-callout::before {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 1px;
  background: rgba(147, 197, 253, 0.72);
  content: "";
}

.visual-callout.callout-a::before {
  right: 100%;
}

.visual-callout.callout-b::before {
  left: 100%;
}

.visual-result {
  right: 22px;
  bottom: 20px;
  max-width: 260px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(15, 23, 42, 0.86));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
}

.visual-result span {
  color: #dbeafe;
}

.visual-result strong {
  font-size: 13px;
  line-height: 1.28;
}

.visual-format-grid,
.visual-checklist {
  right: 22px;
  top: 30%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(300px, 44%);
}

.visual-format-grid span,
.visual-checklist span,
.visual-flow span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

.visual-flow {
  right: 22px;
  top: 36%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visual-flow i {
  width: 28px;
  height: 1px;
  background: rgba(147, 197, 253, 0.82);
}

.visual-checklist {
  grid-template-columns: 1fr;
  width: min(250px, 38%);
}

.story-figure-context .callout-a {
  top: 34%;
  right: clamp(24px, 8vw, 126px);
}

.story-figure-context .callout-b {
  bottom: 33%;
  left: 45%;
}

.story-figure-research .callout-a {
  top: 31%;
  right: clamp(28px, 8vw, 126px);
}

.story-figure-research .callout-b {
  bottom: 31%;
  left: 50%;
}

.story-figure-output .story-visual::after,
.story-figure-files .story-visual::after {
  transform: rotate(0);
}

.story-figure-files .visual-result,
.story-figure-review .visual-result {
  left: 22px;
  right: auto;
}

.story-figure-boundary .callout-a {
  top: 35%;
  left: 34px;
}

.story-figure-boundary .callout-b {
  right: clamp(28px, 8vw, 126px);
  bottom: 36%;
}

.story-figure-boundary .callout-a::before {
  left: 100%;
  right: auto;
}

.story-figure-boundary .callout-b::before {
  right: 100%;
  left: auto;
}

.story-figure figcaption {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.workspace-film {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 30px;
  align-items: center;
  margin: 72px 0 28px;
  padding: 30px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.16);
}

.workspace-film-copy {
  max-width: 360px;
}

.workspace-film .section-kicker {
  margin-bottom: 8px;
  color: #93c5fd;
}

.workspace-film h2 {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: 30px;
}

.workspace-film p {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.68;
}

.workspace-film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: #020617;
}

.story-note {
  max-width: 760px;
  margin: 24px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.68;
}

.story-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding-top: 22px;
  border-top: 1px solid #dfe5ee;
}

.story-resources a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #d6dee9;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.story-resources a:hover {
  border-color: rgba(37, 99, 235, 0.34);
  color: #1d4ed8;
}

.model-library {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
  gap: 22px;
  align-items: start;
  margin: 28px 0 0;
  padding: 24px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.07), transparent 34%),
    #fff;
}

.model-library-copy h2 {
  margin: 0 0 10px;
  max-width: 520px;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: 0;
}

.model-library-copy p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.65;
}

.model-library .primary-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.model-library-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.model-library-links a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  color: #263348;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.model-library-links a:hover {
  border-color: rgba(37, 99, 235, 0.38);
  color: #1d4ed8;
  background: #fff;
}

.use-list {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  padding-left: 20px;
}

.product-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.product-cta a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #dcdfe4;
  border-radius: var(--radius);
  background: #fff;
  color: #2d333d;
  text-decoration: none;
  font-weight: 650;
}

.product-cta .primary-link {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.site-footer {
  padding: 22px 24px 28px;
  border-top: 1px solid #eceeed;
  background: #fafafa;
  color: #6d737e;
  font-size: 13px;
}

.site-footer-inner,
.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer nav {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.site-footer a {
  color: #444b55;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message-list {
  width: min(100%, 780px);
  min-height: calc(100svh - 90px);
  margin: 0 auto;
  display: grid;
  align-content: start;
  gap: 30px;
  padding: 12px 0 220px;
}

.app-shell.chat-started .conversation-column {
  height: 100svh;
  min-height: 0;
}

.app-shell.chat-started .product-content {
  display: none;
}

html[data-surface="desktop"] .product-content,
html[data-surface="desktop"] .site-footer {
  display: none;
}

.messages.has-chat {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.messages.has-chat .message-list {
  flex: 1 0 auto;
  min-height: 0;
  padding-bottom: 178px;
}

.messages.has-chat .empty-state {
  position: sticky;
  bottom: 0;
  min-height: auto;
  z-index: 12;
  flex: 0 0 auto;
  padding: 18px 0 24px;
  background: #fff;
  box-shadow: 0 -18px 34px rgba(255, 255, 255, 0.96);
  align-content: end;
  gap: 0;
}

.messages.has-chat .greeting,
.messages.has-chat .quick-actions,
.messages.has-chat .hero-links {
  display: none;
}

.messages.has-chat .hero-composer {
  margin: 0 auto;
}

.messages.has-chat .source-controls {
  margin: 8px auto 0;
}

.messages.has-chat .draft-status {
  margin: 4px 0 0;
}

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

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

.message-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 50%;
}

.message.user .message-avatar {
  display: none;
}

.message.assistant .message-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  filter: drop-shadow(0 5px 10px rgba(74, 158, 255, 0.2));
}

.message.assistant.is-lifecycle-breathing .message-avatar {
  animation: kimi-spirit-breathe 1.7s ease-in-out infinite;
  transform-origin: 50% 70%;
}

.message-bubble {
  min-width: 0;
  max-width: 680px;
  padding: 0;
  color: #20242b;
}

.message.user .message-bubble {
  justify-self: end;
  max-width: min(520px, 78%);
  padding: 12px 14px;
  border-radius: 12px;
  background: #f2f2f1;
}

.message.assistant .message-bubble {
  padding-top: 1px;
}

.message-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.72;
}

.message-meta {
  display: none;
}

.message-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.message-tools button {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #e0e2e7;
  border-radius: var(--radius);
  background: #f8f9fa;
  color: #5c626d;
  font-size: 12px;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.message-actions[hidden] {
  display: none;
}

.message-actions button[aria-pressed="true"] {
  background: #eaf6f1;
  color: #147054;
}

.memory-source-row {
  max-width: 620px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.memory-source-row > span {
  color: #737b86;
  font-size: 11px;
  font-weight: 700;
}

.memory-source-chip {
  max-width: 230px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #dfe4eb;
  border-radius: var(--radius);
  background: #f7f9fb;
  color: #48515d;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.message-more-actions {
  display: contents;
}

.message-more-actions[hidden] {
  display: none;
}

.generation-lifecycle {
  width: auto;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  vertical-align: -1px;
}

.lifecycle-moon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #101114;
  box-shadow:
    0 2px 7px rgba(17, 19, 25, 0.2),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lifecycle-moon::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  content: "";
  transform: translateX(8px) scale(0.95);
}

.generation-lifecycle.is-breathing .lifecycle-moon::before {
  animation: kimi-moon-phase 3.4s linear infinite;
}

.generation-lifecycle.is-terminal {
  padding: 0;
  border: 0;
  background: transparent;
}

.generation-lifecycle.is-complete {
  opacity: 0.88;
}

.generation-lifecycle.is-blocked,
.generation-lifecycle.is-failed {
  opacity: 0.9;
}

.generation-lifecycle.is-stopped {
  opacity: 0.84;
}

.generation-lifecycle.is-terminal .lifecycle-moon {
  width: 10px;
  height: 10px;
}

.generation-lifecycle.is-terminal .lifecycle-moon::before {
  transform: translateX(8px) scale(0.95);
}

@keyframes kimi-spirit-breathe {
  0%,
  100% {
    transform: translateY(2px) scale(0.96);
    filter: saturate(0.98);
  }
  48% {
    transform: translateY(-5px) scale(1.04);
    filter: saturate(1.08);
  }
}

@keyframes kimi-moon-phase {
  0% {
    transform: translateX(-13px) scale(0.94);
  }
  32% {
    transform: translateX(-6px) scale(1.02);
  }
  66% {
    transform: translateX(4px) scale(1.02);
  }
  100% {
    transform: translateX(13px) scale(0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-meter-orb,
  .plan-meter-copy,
  .message.assistant.is-lifecycle-breathing .message-avatar,
  .generation-lifecycle.is-breathing .lifecycle-moon::before {
    animation: none;
  }
}

.feedback-bubble {
  position: fixed; z-index: 80; right: var(--floating-control-edge); bottom: var(--floating-control-bottom);
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px;
  border: 1px solid rgba(102, 118, 140, .18); border-radius: 999px; color: #343840;
  background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(36, 46, 64, .075), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px); cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; font-size: 13px; font-weight: 650; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feedback-bubble::before { content: none; }
.feedback-bubble svg { width: 16px; height: 16px; fill: none; stroke: #7894b8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feedback-bubble:hover, .feedback-bubble:focus-visible { transform: translateY(-1px); border-color: rgba(91, 112, 140, .28); box-shadow: 0 10px 28px rgba(36, 46, 64, .1); }
.app-shell.chat-started ~ .feedback-bubble { bottom: calc(var(--floating-control-bottom) + 150px); }
.feedback-bubble[data-floating-dragged="true"] { right: auto; bottom: auto; }
.plan-meter.is-dragging,
.feedback-bubble.is-dragging { cursor: grabbing; transform: none; transition: none; }
.feedback-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(238, 241, 246, .62); backdrop-filter: blur(10px); }
.feedback-backdrop[hidden] { display: none; }
.feedback-dialog { position: relative; width: min(460px, 100%); padding: 24px; border: 1px solid rgba(42, 50, 62, .1); border-radius: 20px; color: #23262c; background: rgba(255, 255, 255, .98); box-shadow: 0 20px 60px rgba(29, 37, 51, .14); }
.feedback-dialog::before { content: none; }
.feedback-kicker { margin: 0 0 7px; color: #7b8797; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.feedback-dialog h2 { max-width: 360px; margin: 0; color: #202329; font-size: clamp(23px, 3.2vw, 27px); font-weight: 720; line-height: 1.12; letter-spacing: 0; }
.feedback-intro { margin: 9px 0 18px; color: #747a84; font-size: 14px; line-height: 1.5; }
.feedback-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(42, 50, 62, .09); border-radius: 50%; color: #7d838c; background: #f7f8fa; font-size: 19px; line-height: 1; }
.feedback-close:hover, .feedback-close:focus-visible { color: #3b4048; border-color: rgba(42, 50, 62, .18); background: #eef0f3; }
.feedback-field { display: grid; gap: 7px; margin-top: 13px; color: #3b3f46; font-size: 12px; font-weight: 680; }
.feedback-field textarea, .feedback-field input { width: 100%; border: 1px solid #dfe2e7; border-radius: 12px; color: #262a31; background: #fafbfc; outline: 0; font: inherit; font-weight: 450; }
.feedback-field textarea { min-height: 132px; padding: 14px 15px; line-height: 1.5; resize: vertical; }
.feedback-field input { height: 44px; padding: 0 14px; }
.feedback-field textarea:focus, .feedback-field input:focus { border-color: #a7b1bf; box-shadow: 0 0 0 3px rgba(93, 111, 135, .06); background: #fff; }
.feedback-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.feedback-submit { width: 100%; min-height: 43px; margin-top: 18px; border: 0; border-radius: 12px; color: #fff; background: #2c3037; box-shadow: none; font-size: 13px; font-weight: 700; }
.feedback-submit:disabled { opacity: .65; cursor: wait; }
.feedback-status { display: block; min-height: 21px; margin-top: 11px; color: #676d78; font-size: 13px; line-height: 1.45; }
body.feedback-open { overflow: hidden; }
@media (max-width: 680px) {
  .feedback-bubble { right: var(--floating-control-edge); bottom: var(--floating-control-bottom); width: 42px; min-height: 42px; padding: 0; justify-content: center; }
  .feedback-bubble span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .feedback-dialog { padding: 22px 18px 18px; border-radius: 18px; }
  .feedback-dialog h2 { padding-right: 34px; }
  .feedback-field textarea { min-height: 120px; }
}

.artifact-card {
  max-width: 620px;
  display: grid;
  gap: 11px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #dfe3e8;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.artifact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.artifact-head span,
.artifact-head strong,
.artifact-head em {
  display: block;
}

.artifact-head span {
  margin-bottom: 3px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.artifact-head strong {
  color: #171a20;
  font-size: 15px;
}

.artifact-head em {
  flex: 0 0 auto;
  color: #8a9099;
  font-size: 10px;
  font-style: normal;
}

.artifact-summary,
.artifact-boundary {
  margin: 0;
  color: #5f6874;
  font-size: 12px;
  line-height: 1.5;
}

.artifact-boundary {
  color: #777e88;
}

.artifact-sources,
.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.artifact-sources span {
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf4fb;
  color: #356892;
  font-size: 10px;
  font-weight: 700;
}

.artifact-actions button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dce0e5;
  border-radius: 6px;
  background: #fff;
  color: #303640;
  font-size: 11px;
  font-weight: 700;
}

.artifact-actions button:hover {
  border-color: #b9cee7;
  background: #f2f7fc;
}

.request-error-card {
  max-width: 540px;
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #e8c9ce;
  border-radius: var(--radius);
  background: #fff8f8;
}

.request-error-card strong {
  color: #812c3a;
  font-size: 14px;
}

.request-error-card span {
  color: #76555c;
  font-size: 12px;
  line-height: 1.45;
}

.request-error-card button {
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #7b2c3b;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}

.message-actions button {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  color: #777d86;
  font-size: 12px;
}

.message-actions button:hover {
  background: #f0f0ef;
  color: #282c33;
}

.plan-required-card {
  max-width: 520px;
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid #e0e2e6;
  border-radius: var(--radius);
  background: #fafafa;
}

.plan-required-card strong {
  color: #20242b;
  font-size: 14px;
}

.plan-required-card span {
  color: #666d78;
  font-size: 13px;
  line-height: 1.45;
}

.plan-required-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}

.plan-required-card a,
.plan-required-card button {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #111318;
  border-radius: var(--radius);
  background: #111318;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.plan-required-card .plan-required-login {
  border-color: #d8dde5;
  background: #fff;
  color: #20242b;
}

.plan-required-card a:hover,
.plan-required-card button:hover {
  transform: translateY(-1px);
}

.plan-required-card .plan-required-login:hover {
  border-color: #adb8c7;
  background: #f3f5f8;
}

.toolkit-menu,
.more-menu,
.title-menu {
  position: fixed;
  z-index: 50;
  width: 260px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #dfe2e7;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.model-menu,
.model-submenu {
  position: fixed;
  z-index: 90;
  max-height: min(360px, calc(100svh - 20px));
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(216, 219, 224, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 34px rgba(20, 24, 31, 0.14), 0 1px 3px rgba(20, 24, 31, 0.08);
}

.model-menu {
  width: min(226px, calc(100vw - 20px));
}

.model-submenu {
  z-index: 91;
  width: min(260px, calc(100vw - 20px));
}

.toolkit-menu {
  width: 296px;
}

.more-menu {
  width: 224px;
}

.title-menu {
  width: 180px;
}

.model-menu[hidden],
.model-submenu[hidden],
.toolkit-menu[hidden],
.more-menu[hidden],
.title-menu[hidden] {
  display: none;
}

.toolkit-menu button {
  padding: 10px;
  display: grid;
  gap: 3px;
  border: 1px solid #e1e3e8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: #30343b;
  text-align: left;
}

.more-menu button,
.more-menu a,
.title-menu button {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: #30343b;
  font-size: 13px;
  text-align: left;
}

.more-menu button:hover,
.more-menu a:hover,
.title-menu button:hover {
  background: #f0f0ef;
}

.more-menu span {
  color: #8b9098;
  font-size: 12px;
}

.title-menu button.danger {
  color: #b2394d;
}

.model-menu-panel,
.model-submenu-panel {
  display: grid;
  gap: 1px;
}

.model-setting-row,
.model-reset-row,
.model-choice-row,
.model-menu-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: #23272f;
  font: inherit;
  cursor: pointer;
}

.model-setting-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 10px;
  border-radius: 8px;
  text-align: left;
}

.model-setting-row:hover,
.model-setting-row.is-active,
.model-reset-row:hover,
.model-choice-row:hover,
.model-menu-back:hover {
  background: #f4f5f7;
}

.model-setting-label {
  min-width: 0;
  overflow: hidden;
  color: #20242b;
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-setting-value {
  max-width: 92px;
  overflow: hidden;
  color: #8b9098;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-setting-arrow,
.model-reset-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #8f949d;
}

.model-setting-arrow svg,
.model-reset-icon svg,
.model-menu-back svg,
.model-choice-check {
  width: 16px;
  height: 16px;
}

.model-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: #eceef1;
}

.model-reset-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 10px;
  border-radius: 8px;
  color: #999fa8;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.model-menu-header,
.model-submenu-header {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  margin: 0 0 4px;
  padding: 0 8px 5px;
  border-bottom: 1px solid #eceef1;
}

.model-menu-header strong,
.model-submenu-header strong {
  overflow: hidden;
  color: #23272f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-menu-back {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #656b75;
}

.model-choice-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: left;
}

.model-choice-row.is-selected {
  background: #eff6ff;
}

.model-choice-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.model-choice-copy strong {
  overflow: hidden;
  color: #252933;
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-choice-copy span {
  overflow: hidden;
  color: #7a818c;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-choice-check {
  opacity: 0;
  color: #1b75e5;
}

.model-choice-row.is-selected .model-choice-check {
  opacity: 1;
}

.toolkit-menu button strong {
  font-size: 13px;
}

.toolkit-menu button span {
  color: #747b86;
  font-size: 12px;
  line-height: 1.35;
}

.app-dialog {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid #e0e3e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.app-dialog::backdrop {
  background: rgba(17, 20, 27, 0.32);
  backdrop-filter: blur(2px);
}

.dialog-frame {
  position: relative;
  margin: 0;
  padding: 22px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.dialog-content {
  display: grid;
  gap: 12px;
  padding-right: 30px;
}

.dialog-content p,
.dialog-content li {
  color: #5e6470;
  font-size: 14px;
  line-height: 1.55;
}

.dialog-kicker {
  margin: 0;
  color: var(--blue-dark) !important;
  font-size: 11px !important;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-content h2 {
  margin: 0;
  color: #191c22;
  font-size: 22px;
}

.artifact-preview pre {
  max-height: min(52vh, 480px);
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #e2e5e9;
  border-radius: var(--radius);
  background: #f7f8fa;
  color: #2c3139;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.artifact-preview small {
  color: #777e88;
  font-size: 11px;
  line-height: 1.45;
}

.dialog-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dialog-inline-actions button,
.secondary-dialog-button {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid #dce0e5;
  border-radius: var(--radius);
  background: #fff;
  color: #2f3540;
  font-size: 12px;
  font-weight: 700;
}

.permission-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e7d7b7;
  border-radius: var(--radius);
  background: #fffaf0;
}

.permission-summary strong {
  color: #704c13;
  font-size: 12px;
}

.permission-summary span {
  color: #77684e;
  font-size: 11px;
  line-height: 1.45;
}

.dialog-action-form {
  display: grid;
  gap: 12px;
}

.dialog-action-form label {
  display: grid;
  gap: 6px;
  color: #4e5560;
  font-size: 12px;
  font-weight: 650;
}

.dialog-action-form input,
.dialog-action-form textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dfe2e7;
  border-radius: var(--radius);
  font: inherit;
}

.dialog-action-form select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dfe2e7;
  border-radius: var(--radius);
  font: inherit;
}

.dialog-action-form textarea {
  min-height: 72px;
  resize: vertical;
}

.dialog-action-form button,
.dialog-danger-button {
  width: fit-content;
  min-height: 34px;
  padding: 8px 11px;
  border-radius: var(--radius);
  background: #111318;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.dialog-danger-button {
  background: #b2394d;
}

.api-key-dialog {
  max-width: 620px;
}

.api-key-panel {
  display: grid;
  gap: 12px;
}

.api-key-section {
  display: grid;
  gap: 10px;
}

.api-key-section h3 {
  margin: 0;
  color: #20242b;
  font-size: 13px;
  line-height: 1.25;
}

.api-key-help {
  margin: 0;
  min-width: 0;
  line-height: 1.25;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  color: #1769d1;
  font-size: 12px;
  font-weight: 760;
}

.api-key-help strong {
  font-weight: 760;
}

.api-field-label {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.api-field-required,
.api-field-optional {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid #dfe4eb;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.api-field-required {
  border-color: #efc4ce;
  background: #fff4f6;
  color: #9c3044;
}

.api-field-optional {
  background: #f6f8fb;
  color: #626d7c;
}

.api-number-field {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #dfe2e7;
  border-radius: var(--radius);
  background: #fff;
}

.dialog-action-form .api-number-field input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.api-number-field span {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid #edf0f3;
  color: #697280;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.api-key-reveal {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e0ea;
  border-radius: var(--radius);
  background: #f7fafc;
}

.api-key-reveal strong {
  color: #20242b;
  font-size: 13px;
}

.api-key-reveal code {
  display: block;
  max-width: 100%;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 1px solid #e1e5eb;
  border-radius: var(--radius);
  background: #fff;
  color: #20242b;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.api-key-reveal-actions {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.api-key-reveal button,
.api-key-row button,
.api-key-form-actions button {
  width: fit-content;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #dce0e5;
  border-radius: var(--radius);
  background: #fff;
  color: #2f3540;
  font-size: 12px;
  font-weight: 700;
}

.api-key-reveal small {
  color: #697280;
  font-size: 11px;
  line-height: 1.4;
}

.api-key-list {
  display: grid;
  gap: 10px;
}

.api-key-row {
  display: grid;
  gap: 4px;
}

.api-key-row-actions,
.api-key-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.api-empty-state {
  margin: 0;
  color: #697280;
  font-size: 13px;
}

.form-error {
  margin: 0;
  color: #a53b4a !important;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width)) / 2);
  bottom: 24px;
  z-index: 70;
  transform: translateX(-50%);
  max-width: calc(100vw - var(--sidebar-width) - 32px);
  padding: 10px 13px;
  border: 1px solid #dfe3e8;
  border-radius: var(--radius);
  background: #fff;
  color: #39404a;
  box-shadow: var(--shadow);
  font-size: 13px;
}

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

:focus-visible {
  outline: 3px solid rgba(74, 158, 255, 0.35);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 0px;
    --floating-control-edge: 16px;
    --floating-control-bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
    --floating-control-stack-gap: 12px;
  }

  .side-rail {
    display: none;
  }

  .app-shell.mobile-rail-open .side-rail {
    display: flex;
    width: 230px;
    box-shadow: 0 18px 46px rgba(22, 27, 34, 0.18);
  }

  .workspace {
    margin-left: 0;
  }

  .mobile-menu-button {
    display: grid !important;
  }

  .tool-drawer {
    top: 62px;
    right: 10px;
    bottom: 12px;
    left: 10px;
    width: auto;
    padding: 15px;
  }

  .conversation-column {
    grid-template-rows: 54px minmax(0, 1fr);
  }

  .conversation-header {
    min-height: 54px;
    padding: 0 14px;
  }

  .plan-meter {
    right: var(--floating-control-edge);
    bottom: calc(var(--floating-control-bottom) + var(--floating-feedback-size) + var(--floating-control-stack-gap));
    max-width: min(150px, calc(100vw - 32px));
    min-height: 32px;
    gap: 7px;
    padding: 4px 9px 4px 5px;
  }

  .plan-meter-orb {
    width: 23px;
    height: 23px;
  }

  .plan-meter-copy {
    min-width: 68px;
  }

  .plan-meter-copy strong {
    font-size: 11.5px;
  }

  .chat-title-button {
    max-width: 48vw;
  }

  .model-status {
    left: 14px;
    bottom: 10px;
    max-width: 210px;
  }

  .ghost-button {
    display: none;
  }

  .messages {
    padding: 0 14px 26px;
  }

  .empty-state {
    min-height: calc(100svh - 80px);
    align-content: start;
    padding-top: 84px;
    gap: 32px;
  }

  .greeting {
    justify-content: flex-start;
    gap: 14px;
  }

  .greeting-orb {
    width: 46px;
    height: 46px;
  }

  .eyebrow {
    font-size: 11px;
  }

  h1 {
    max-width: 12ch;
    font-size: 38px;
  }

  .composer {
    min-height: 150px;
    border-radius: 20px;
    padding: 15px 13px 13px;
  }

  .composer-actions {
    width: 100%;
    align-items: flex-end;
    gap: 8px;
  }

  .left-tools,
  .right-tools {
    gap: 6px;
  }

  .left-tools {
    flex: 1 1 0;
  }

  .right-tools {
    flex: 0 1 auto;
    max-width: 58%;
  }

  .active-mode-label {
    max-width: 74px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .model-select {
    max-width: clamp(68px, calc(100vw - 258px), 112px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quick-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin-top: -12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .quick-actions::-webkit-scrollbar { display: none; }

  .source-controls {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    margin: -24px 0 -22px;
    overflow-x: auto;
  }

  .source-controls button {
    flex: 0 0 auto;
  }

  .draft-status {
    margin: -28px 0;
  }

  .model-menu {
    max-height: 36svh;
  }

  .toolkit-menu {
    width: min(296px, calc(100vw - 20px));
  }

  .hero-links {
    justify-content: flex-start;
    gap: 8px;
    margin-top: -18px;
    font-size: 13px;
  }

  .hero-links a {
    min-height: 30px;
    padding: 6px 9px;
  }

  .quick-chip {
    min-height: 34px;
    padding: 8px 11px;
    font-size: 13px;
  }

  .product-content {
    padding: 54px 16px 86px;
  }

  .product-content h2 {
    font-size: 23px;
  }

  .product-content p,
  .product-content li {
    font-size: 15px;
  }

  .story-intro {
    margin-bottom: 28px;
  }

  .story-intro h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  .story-intro p {
    font-size: 16px;
  }

  .story-pillars {
    grid-template-columns: 1fr;
    margin: 28px 0 44px;
  }

  .story-pillars article,
  .story-pillars article + article {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid #dfe5ee;
  }

  .story-pillars article:last-child {
    border-bottom: 0;
  }

  .story-chapters {
    padding-left: 18px;
  }

  .story-chapters::before {
    left: 5px;
  }

  .story-chapter {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 40px 0;
  }

  .story-chapter::before {
    top: 47px;
    left: -18px;
  }

  .story-chapter:first-child::before {
    top: 5px;
  }

  .story-chapter:nth-child(even) .story-copy,
  .story-copy {
    order: 1;
  }

  .story-chapter:nth-child(even) .story-figure,
  .story-figure {
    order: 2;
  }

  .story-copy h3 {
    font-size: 24px;
  }

  .story-copy p {
    max-width: none;
  }

  .story-visual {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
  }

  .story-visual::before {
    background:
      linear-gradient(180deg, rgba(7, 15, 29, 0.72), rgba(7, 15, 29, 0.1) 50%, rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 80% 18%, rgba(96, 165, 250, 0.14), transparent 36%);
  }

  .story-visual::after {
    right: 10%;
    bottom: 20%;
    left: 10%;
  }

  .visual-label {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 10px 11px;
    border-radius: 11px;
  }

  .visual-label span,
  .visual-callout span,
  .visual-result span {
    margin-bottom: 3px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .visual-label strong {
    font-size: 13px;
  }

  .visual-label small {
    margin-top: 4px;
    font-size: 10px;
  }

  .visual-callout {
    max-width: 135px;
    padding: 7px 8px;
    border-radius: 0 9px 9px 0;
  }

  .visual-callout strong,
  .visual-result strong {
    font-size: 10px;
  }

  .visual-callout::before {
    width: 20px;
  }

  .visual-result {
    right: 12px;
    bottom: 10px;
    max-width: calc(100% - 24px);
    padding: 9px 10px;
    border-radius: 11px;
  }

  .story-figure-files .visual-result,
  .story-figure-review .visual-result {
    left: 12px;
  }

  .visual-format-grid,
  .visual-checklist {
    right: 12px;
    top: 46%;
    width: calc(100% - 24px);
    max-width: 260px;
    gap: 5px;
  }

  .visual-format-grid span,
  .visual-checklist span,
  .visual-flow span {
    min-height: 26px;
    padding: 5px 8px;
    font-size: 10px;
  }

  .visual-flow {
    right: 12px;
    top: 48%;
    gap: 5px;
  }

  .visual-flow i {
    width: 14px;
  }

  .story-figure-context .callout-a,
  .story-figure-research .callout-a {
    top: 47%;
    right: 12px;
  }

  .story-figure-context .callout-b,
  .story-figure-research .callout-b {
    display: none;
  }

  .story-figure-boundary .callout-a {
    top: 49%;
    left: 12px;
  }

  .story-figure-boundary .callout-b {
    display: none;
  }

  .workspace-film {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 48px;
    padding: 18px;
    border-radius: 8px;
  }

  .workspace-film h2 {
    font-size: 24px;
  }

  .story-resources a {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .model-library {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .model-library-links {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-inline: 16px;
    padding-bottom: 98px;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-right: 132px;
  }

  .site-footer nav {
    justify-content: flex-start;
    gap: 10px 16px;
  }

  .message-list {
    min-height: calc(100svh - 80px);
    gap: 24px;
    padding-bottom: 24px;
  }

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

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

  .message-avatar,
  .message.assistant .message-avatar img {
    width: 30px;
    height: 30px;
  }

  .message.user .message-bubble {
    max-width: 86%;
  }

  .message-text {
    font-size: 15px;
  }

  .generation-lifecycle {
    max-width: 100%;
  }

  .artifact-head {
    display: grid;
  }

  .artifact-head em {
    justify-self: start;
  }

  .artifact-actions button {
    flex: 1 1 calc(50% - 6px);
  }

  .capability-row {
    align-items: start;
  }

  .settings-form label {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-form select {
    width: 100%;
  }

  .memory-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .memory-source-chip {
    max-width: 100%;
  }

  .dialog-frame {
    padding: 18px;
  }

  .dialog-content {
    padding-right: 22px;
  }

  .toast {
    left: 50%;
    max-width: calc(100vw - 32px);
  }
}

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