@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #10120f;
  --ink-soft: #151814;
  --sidebar: #0c0e0c;
  --surface: #1b1e1a;
  --surface-raised: #222620;
  --surface-muted: #171a16;
  --line: rgba(231, 236, 224, 0.11);
  --line-strong: rgba(224, 174, 106, 0.44);
  --text: #f0f2ec;
  --muted: #9ca397;
  --faint: #8e9689;
  --accent: #ed8a68;
  --accent-bright: #f3b06f;
  --accent-10: rgba(237, 138, 104, 0.1);
  --accent-18: rgba(237, 138, 104, 0.18);
  --success: #86c99a;
  --danger: #e88a7f;
  --radius: 14px;
  --control-radius: 10px;
  --display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --editorial: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
}

body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

::selection {
  color: #17130d;
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #17130d;
  background: var(--accent);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

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

.assistant-shell {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  overflow: hidden;
  background: var(--ink);
}

.assistant-sidebar {
  position: relative;
  z-index: 70;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 20px;
  padding: 18px 15px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(237, 138, 104, 0.035), transparent 22%),
    var(--sidebar);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.18);
}

.sidebar-brand {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-brand > a {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.sidebar-brand__mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #17130d;
  background: var(--accent);
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.sidebar-brand small {
  margin-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.sidebar-close,
.sidebar-open {
  display: none;
}

.new-chat {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.new-chat:hover {
  background: var(--surface-raised);
  border-color: rgba(224, 174, 106, 0.3);
  transform: translateY(-1px);
}

.new-chat > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.new-chat strong {
  font-size: 13px;
  font-weight: 550;
}

.sidebar-section {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-raised) transparent;
}

.sidebar-section h2 {
  margin: 3px 9px 9px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 550;
}

.sidebar-prompts {
  display: grid;
  gap: 2px;
}

.sidebar-prompts button {
  min-height: 40px;
  padding: 8px 9px;
  overflow: hidden;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.sidebar-prompts button:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.sidebar-destinations {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-destinations a {
  min-height: 55px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  color: var(--muted);
  border-radius: 9px;
  text-decoration: none;
}

.sidebar-destinations a:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.destination-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-10);
  border: 1px solid var(--accent-18);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.sidebar-destinations strong,
.sidebar-destinations small {
  display: block;
}

.sidebar-destinations strong {
  color: inherit;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-destinations small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-destinations a > span:last-child {
  color: var(--faint);
  font-size: 12px;
}

.sidebar-footer {
  padding: 13px 9px 2px;
  border-top: 1px solid var(--line);
}

.service-state {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.service-state > span {
  width: 7px;
  height: 7px;
  background: var(--faint);
  border-radius: 999px;
}

.service-state[data-state="ready"] > span {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(134, 201, 154, 0.08);
}

.service-state[data-state="unavailable"] > span {
  background: var(--danger);
}

.service-state p,
.service-state strong,
.service-state small {
  display: block;
  margin: 0;
}

.service-state strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.service-state small {
  margin-top: 1px;
  color: var(--faint);
  font-size: 10px;
}

.sidebar-footer > a {
  display: inline-block;
  margin-top: 12px;
  color: var(--faint);
  font-size: 10px;
  text-decoration: none;
}

.sidebar-footer > a:hover {
  color: var(--text);
}

.provider-note {
  margin: 11px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-scrim {
  display: none;
}

.assistant-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 30%, rgba(237, 138, 104, 0.055), transparent 28%),
    var(--ink);
}

.assistant-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 64px 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(16, 18, 15, 0.98) 0%, rgba(16, 18, 15, 0.84) 44%, rgba(16, 18, 15, 0.58) 100%),
    url("terminal-backdrop-v2.webp") 62% center / cover no-repeat;
  opacity: 0.42;
}

.assistant-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(16, 18, 15, 0.76);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.012);
  backdrop-filter: blur(14px);
}

.assistant-header__title strong,
.assistant-header__title span {
  display: block;
}

.assistant-header__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-header__title {
  min-width: 0;
}

.assistant-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 26%;
  background: rgba(11, 13, 11, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(240, 242, 236, 0.08),
    0 0 0 1px rgba(237, 138, 104, 0.13),
    0 8px 22px rgba(0, 0, 0, 0.22);
}

aivn-claw[state="error"] {
  color: #ef6a62;
}

aivn-claw[state="offline"],
aivn-claw[state="interrupted"] {
  color: var(--faint);
}

aivn-claw [data-avatar-part="blobatar"] {
  transform-box: view-box;
  transform-origin: center;
}

.assistant-avatar svg,
.message__avatar aivn-claw svg {
  width: 100%;
  height: 100%;
  display: block;
}

.assistant-avatar__fallback {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.assistant-avatar--hero .assistant-avatar__fallback {
  font-size: 17px;
}

aivn-claw:defined > .assistant-avatar__fallback {
  display: none;
}

.assistant-avatar--header {
  width: 34px;
  height: 34px;
}

.assistant-header__title strong {
  font-size: 14px;
  font-weight: 620;
}

.assistant-header__title span {
  margin-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.console-shortcut {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.console-shortcut:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.workflow-shortcut {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #17130d;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.workflow-shortcut:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

.conversation-stage {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-raised) transparent;
}

.conversation-empty {
  width: min(1040px, calc(100% - 64px));
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 38px 0 56px;
}

.conversation-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.conversation-identity__copy {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.assistant-avatar--hero {
  width: 72px;
  height: 72px;
}

.conversation-eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avatar-showcase {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(16, 18, 15, 0.64);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.avatar-showcase:hover,
.avatar-showcase[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--accent-10);
}

.avatar-showcase[hidden] {
  display: none;
}

.conversation-empty .conversation-headline {
  max-width: 920px;
  margin: 0;
  font-size: clamp(46px, 5.4vw, 78px);
  font-family: var(--editorial);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.conversation-intro {
  max-width: 610px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.5;
}

.prompt-field {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
  margin-top: 46px;
}

.prompt-field button,
.prompt-field a {
  min-height: 78px;
  padding: 16px 17px;
  color: var(--muted);
  background: rgba(27, 30, 26, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.prompt-field .prompt-primary {
  background:
    linear-gradient(135deg, rgba(237, 138, 104, 0.13), rgba(27, 30, 26, 0.84) 60%);
  border-color: rgba(237, 138, 104, 0.26);
}

.prompt-field button:nth-child(2),
.prompt-field button:nth-child(3),
.prompt-field a:nth-child(2),
.prompt-field a:nth-child(3) {
  grid-column: auto;
}

.prompt-field button:hover,
.prompt-field a:hover {
  color: var(--text);
  background: var(--surface-raised);
  border-color: rgba(224, 174, 106, 0.28);
  transform: translateY(-2px);
}

.prompt-field strong,
.prompt-field span {
  display: block;
}

.prompt-field strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.prompt-field span {
  margin-top: 5px;
  color: var(--faint);
  font-size: 11px;
}

.conversation-log {
  width: min(820px, calc(100% - 48px));
  display: none;
  margin: 0 auto;
  padding: 36px 0 70px;
}

html[data-chat-state="active"] .conversation-empty {
  display: none;
}

html[data-chat-state="active"] .conversation-log {
  display: grid;
  gap: 34px;
}

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

.message__avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #17130d;
  background: var(--accent);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
}

.message__avatar aivn-claw {
  width: 100%;
  height: 100%;
  display: block;
  color: var(--accent);
  background: rgba(11, 13, 11, 0.9);
}

.message--assistant .message__avatar {
  background: rgba(11, 13, 11, 0.9);
  border: 1px solid rgba(190, 111, 58, 0.2);
}

.message--user .message__avatar {
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

.message__body {
  min-width: 0;
  padding-top: 4px;
}

.message__body > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.message__content {
  color: #e4e8df;
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.message--user .message__content {
  color: var(--text);
}

.message__content p {
  margin: 0 0 14px;
}

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

.message__content h3,
.message__content h4,
.message__content h5,
.message__content h6 {
  margin: 20px 0 8px;
  color: var(--text);
  font-family: var(--display);
  font-size: 1em;
  line-height: 1.35;
}

.message__content h3:first-child,
.message__content h4:first-child,
.message__content h5:first-child,
.message__content h6:first-child {
  margin-top: 0;
}

.message__content ul,
.message__content ol {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.message__content li {
  margin: 5px 0;
  padding-left: 3px;
}

.message__content li::marker {
  color: var(--accent-bright);
}

.message__content blockquote {
  margin: 14px 0;
  padding: 2px 0 2px 14px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
}

.message__content blockquote p {
  margin-bottom: 8px;
}

.message__content hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.markdown-table-scroll {
  max-width: 100%;
  margin: 14px 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(11, 13, 11, 0.58);
  overscroll-behavior-x: contain;
}

.markdown-table-scroll:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.message__content table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88em;
  line-height: 1.5;
}

.message__content th,
.message__content td {
  padding: 10px 12px;
  overflow-wrap: anywhere;
  vertical-align: top;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.message__content th:last-child,
.message__content td:last-child {
  border-right: 0;
}

.message__content tbody tr:last-child td {
  border-bottom: 0;
}

.message__content th {
  color: var(--text);
  background: rgba(237, 138, 104, 0.09);
  font-family: var(--mono);
  font-size: 0.82em;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.message__content th[data-align="center"],
.message__content td[data-align="center"] {
  text-align: center;
}

.message__content th[data-align="right"],
.message__content td[data-align="right"] {
  text-align: right;
}

@media (max-width: 560px) {
  .message__content table {
    min-width: 360px;
    font-size: 0.82em;
  }

  .message__content th,
  .message__content td {
    padding: 9px 10px;
  }
}

.message__content a {
  color: var(--accent-bright);
  text-decoration-color: color-mix(in srgb, var(--accent-bright) 55%, transparent);
  text-underline-offset: 3px;
}

.message__content a:hover {
  text-decoration-color: currentColor;
}

.message__content a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.message__content pre {
  margin: 14px 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: #0b0d0b;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.message__content code {
  padding: 1px 4px;
  color: var(--accent-bright);
  background: var(--accent-10);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.9em;
}

.message__content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

.message--pending .message__content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.thinking-caption {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
}

.thinking-dot {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 999px;
  animation: thinking 1.15s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
  animation-delay: 120ms;
}

.thinking-dot:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes thinking {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.message--error .message__content {
  color: #efaaa2;
}

.message__status {
  margin: 10px 0 0;
  color: #efc078;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}

.message__retry {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 0 13px;
  color: var(--text);
  background: var(--accent-10);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.message__retry:hover {
  background: var(--accent-18);
}

.composer-dock {
  position: relative;
  z-index: 30;
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 18px;
  background: var(--ink);
}

.retention-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 38px;
  margin: 0 8px 7px;
  color: var(--muted);
  cursor: pointer;
}

.retention-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.retention-choice strong,
.retention-choice small {
  display: block;
}

.retention-choice strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 620;
}

.retention-choice small {
  margin-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.scroll-latest {
  position: absolute;
  z-index: 35;
  right: max(24px, calc((100% - 860px) / 2));
  bottom: 112px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.scroll-latest[hidden] {
  display: none;
}

.scroll-latest:hover {
  background: #2b2d27;
}

.composer {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 10px;
  padding: 8px 8px 8px 17px;
  background: rgba(31, 35, 29, 0.96);
  border: 1px solid rgba(231, 236, 224, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
}

.composer:focus-within {
  border-color: rgba(224, 174, 106, 0.58);
  box-shadow: 0 0 0 3px rgba(224, 174, 106, 0.08), 0 18px 55px rgba(0, 0, 0, 0.24);
}

.composer textarea {
  width: 100%;
  max-height: 190px;
  min-height: 40px;
  padding: 9px 0 7px;
  resize: none;
  overflow-y: auto;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  line-height: 1.45;
}

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

.composer button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #17130d;
  background: var(--accent);
  border-radius: 9px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.composer button:hover:not(:disabled) {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.composer button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.composer-note {
  margin: 8px 10px 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 1180px) {
  .conversation-empty {
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: clamp(48px, 5vw, 82px);
    padding-block: 48px 58px;
  }

  .conversation-identity,
  .conversation-empty .conversation-headline,
  .conversation-intro {
    grid-column: 1;
  }

  .conversation-identity {
    grid-row: 1;
  }

  .conversation-empty .conversation-headline {
    grid-row: 2;
    font-size: clamp(52px, 4.8vw, 76px);
  }

  .conversation-intro {
    grid-row: 3;
    max-width: 590px;
  }

  .prompt-field {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
    padding: 8px;
    background: rgba(11, 13, 11, 0.5);
    border: 1px solid rgba(231, 236, 224, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
  }

  .prompt-field button,
  .prompt-field a {
    min-height: 60px;
    padding: 13px 14px;
    background: rgba(27, 30, 26, 0.72);
  }

  .prompt-field .prompt-primary {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 19px;
  }

  .prompt-field .prompt-primary strong {
    max-width: 280px;
    font-family: var(--editorial);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.08;
  }

  .prompt-field button:not(.prompt-primary) span,
  .prompt-field a:not(.prompt-primary) span {
    display: none;
  }
}

@media (max-width: 980px) {
  .assistant-shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }

  .assistant-sidebar {
    padding-inline: 12px;
  }

  .conversation-empty {
    width: min(760px, calc(100% - 48px));
  }

  .prompt-field {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .assistant-shell {
    display: block;
  }

  .assistant-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(318px, calc(100vw - 48px));
    transform: translateX(-104%);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 24px 0 64px rgba(0, 0, 0, 0.48);
  }

  body[data-sidebar="open"] .assistant-sidebar {
    transform: translateX(0);
  }

  .sidebar-close,
  .sidebar-open {
    display: grid;
    place-items: center;
    background: transparent;
    cursor: pointer;
  }

  .sidebar-close {
    width: 44px;
    height: 44px;
    color: var(--muted);
    font-size: 24px;
  }

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

  body[data-sidebar="open"] .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .assistant-main {
    height: 100dvh;
    grid-template-rows: 58px minmax(0, 1fr) auto;
  }

  .assistant-main::before {
    display: none;
  }

  .assistant-header {
    padding: 0 14px;
    background: rgba(16, 18, 15, 0.88);
    border-bottom-color: var(--line);
    backdrop-filter: blur(12px);
  }

  .sidebar-open {
    width: 44px;
    height: 44px;
    align-content: center;
    gap: 5px;
  }

  .sidebar-open span {
    width: 19px;
    height: 1px;
    background: var(--muted);
  }

  .assistant-header__title {
    margin-right: auto;
  }

  .assistant-header__identity {
    margin-right: auto;
  }

  .assistant-avatar--header {
    width: 30px;
    height: 30px;
  }

  .console-shortcut {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    justify-content: center;
    font-size: 0;
  }

  .workflow-shortcut {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    justify-content: center;
    font-size: 0;
  }

  .workflow-shortcut::before {
    content: "@";
    font-family: var(--mono);
    font-size: 15px;
  }

  .console-shortcut span {
    font-size: 16px;
  }

  .conversation-empty {
    width: calc(100% - 32px);
    justify-content: flex-start;
    padding: clamp(48px, 10vh, 88px) 0 34px;
  }

  .conversation-empty .conversation-headline {
    font-size: clamp(42px, 13vw, 68px);
    line-height: 0.96;
  }

  .conversation-identity {
    gap: 12px;
  }

  .assistant-avatar--hero {
    width: 48px;
    height: 48px;
  }

  .conversation-intro {
    margin-top: 20px;
    font-size: 15px;
  }

  .prompt-field {
    gap: 7px;
    margin-top: 30px;
  }

  .prompt-field button,
  .prompt-field a {
    min-height: 68px;
    padding: 13px 14px;
  }

  .prompt-field button:nth-child(n+4),
  .prompt-field a:nth-child(n+4) {
    display: none;
  }

  .conversation-log {
    width: calc(100% - 28px);
    padding: 24px 0 44px;
  }

  html[data-chat-state="active"] .conversation-log {
    gap: 28px;
  }

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

  .message__avatar {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 9px;
  }

  .message__content {
    font-size: 14px;
    line-height: 1.68;
  }

  .composer-dock {
    width: calc(100% - 24px);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .scroll-latest {
    right: 14px;
    bottom: 104px;
    max-width: calc(100% - 28px);
    min-height: 44px;
  }

  .sidebar-prompts button {
    min-height: 44px;
  }

  .composer textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .composer button {
    width: 44px;
    height: 44px;
  }

  .retention-choice {
    min-height: 44px;
  }

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

@media (max-width: 440px) {
  .assistant-header__title span {
    display: none;
  }
}

@media (max-width: 440px) {
  .console-shortcut {
    width: 44px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    color: transparent;
    white-space: nowrap;
  }

  .console-shortcut span {
    display: none;
  }

  .console-shortcut::after {
    content: ">_";
    color: var(--accent-bright);
    font-family: var(--mono);
    font-size: 11px;
  }

  .conversation-identity {
    margin-bottom: 14px;
  }

  .conversation-eyebrow {
    font-size: 9px;
  }

  .prompt-field button:nth-child(n+3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-showcase {
    display: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .new-chat:hover,
  .prompt-field button:hover,
  .composer button:hover:not(:disabled) {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(240, 242, 236, 0.28);
    --muted: #c2c8bd;
    --faint: #a7afa1;
  }
}
