.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;
}
#assistant-panel {
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf9fc;
  overflow: hidden;
  color: #282333;
}
.assistant-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: white;
  flex-shrink: 0;
}
.assistant-header > div {
  flex: 1;
  min-width: 0;
}
.assistant-header h3 {
  font-size: 16px;
  margin: 0 0 3px;
  line-height: 1.3;
}
.assistant-header p {
  margin: 0;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.assistant-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--highlight);
  font-size: 23px;
}
#reset-assistant {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 3px;
  white-space: nowrap;
  font-size: 11px;
}
#reset-assistant:hover {
  color: var(--accent);
}
.assistant-log {
  position: relative;
  padding: 22px 18px;
  margin: 0;
  min-height: 100px;
  max-height: 580px;
  scrollbar-width: thin;
  scrollbar-color: #d6cfe2 transparent;
}
.assistant-welcome {
  padding: 18px 4px 20px;
  max-width: 420px;
  margin: auto;
}
.assistant-welcome-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #f0ecf7;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 30px;
  margin-bottom: 24px;
}
.assistant-kicker {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.assistant-welcome h4 {
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 9px 0 14px;
  font-weight: 600;
}
.assistant-welcome > p:not(.assistant-kicker) {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 24px;
}
.assistant-starters {
  display: grid;
  gap: 8px;
}
.assistant-starters button {
  background: white;
  border: 1px solid #e4dfeb;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #3f3556;
  font-size: 12px;
}
.assistant-starters button:hover {
  border-color: var(--accent);
  background: #f4f0fa;
}
.assistant-starters button > span:last-child {
  color: #8b789f;
}
.assistant-turn {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.assistant-author {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--muted);
}
.assistant-author strong {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.assistant-avatar {
  font-size: 14px;
  color: var(--accent);
}
.assistant-message-body p {
  font-size: 13px;
  line-height: 1.75;
  margin: 0 0 10px;
  white-space: normal;
}
.assistant-message-body p:last-child {
  margin-bottom: 0;
}
.assistant-message-body code {
  background: #ece8f1;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 12px;
}
.assistant-user {
  margin-left: 28px;
}
.assistant-user .assistant-author {
  justify-content: flex-end;
}
.assistant-user .assistant-message-body {
  background: var(--accent);
  color: white;
  padding: 13px 16px;
  border-radius: 14px 14px 4px 14px;
}
.assistant-user code {
  background: #ffffff20;
  color: inherit;
}
.assistant-proposal {
  border: 1px solid #dcd5e7;
  border-radius: 12px;
  margin-top: 16px;
  background: white;
  overflow: hidden;
}
.proposal-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 13px 14px;
  background: #f3eff8;
}
.proposal-heading > strong {
  font-size: 12px;
}
.proposal-status {
  font-size: 9px;
  color: #69557f;
  background: #e9e1f3;
  border-radius: 20px;
  padding: 4px 7px;
}
.is-applied .proposal-status {
  background: #dfefe8;
  color: #216349;
}
.is-stale .proposal-status {
  background: #f7edda;
  color: #76531c;
}
.proposal-review {
  margin: 0;
  padding: 0 14px;
  font-size: 12px;
}
.proposal-review summary {
  padding: 13px 0;
  font-weight: 500;
  cursor: pointer;
}
.proposal-review summary > span {
  float: right;
  font-size: 10px;
  color: var(--muted);
}
.proposal-change {
  padding: 0 0 14px;
  border: 0;
}
.proposal-change > strong {
  display: block;
  font-size: 11px;
  margin: 2px 0 8px;
}
.proposal-comparison {
  display: grid;
  gap: 8px;
}
.proposal-comparison > div {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 6px;
}
.proposal-before {
  background: #f8f4f3;
  border-left: 2px solid #d4bcb5;
}
.proposal-after {
  background: #f0f7f3;
  border-left: 2px solid #83b298;
}
.proposal-change span {
  display: block;
  margin: 0 0 5px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #716b76;
}
.proposal-change pre {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.65;
  padding: 0;
  background: transparent;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 220px;
  overflow: auto;
}
.proposal-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.proposal-footer button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.proposal-footer p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin: 9px 0 0;
  white-space: normal;
}
.is-applied .proposal-footer p {
  margin: 0;
  color: #216349;
}
.assistant-compose-area {
  padding: 12px 16px 10px;
  flex-shrink: 0;
  background: #faf9fc;
}
.assistant-context-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0 2px 9px;
  color: #796c8b;
  font-size: 10px;
}
#assistant-context {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
#clear-assistant-selection {
  border: 0;
  background: transparent;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
#assistant-form {
  padding: 10px 12px 8px;
  border: 1px solid #d8d0e3;
  border-radius: 14px;
  background: white;
  box-shadow: 0 3px 12px #33254505;
}
#assistant-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #b5a2ce22;
}
#assistant-message {
  display: block;
  border: 0;
  outline: 0;
  box-shadow: none;
  padding: 3px 0;
  min-height: 52px;
  max-height: 160px;
  margin: 0;
  border-radius: 0;
  resize: none;
  font-size: 13px;
  line-height: 1.65;
  background: transparent;
}
#assistant-message::placeholder {
  color: #92889f;
}
.assistant-composer-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
#assistant-composer-hint {
  flex: 1;
  color: #94899e;
  font-size: 9px;
  line-height: 1.5;
}
#assistant-composer-hint > span {
  white-space: nowrap;
}
#assistant-count {
  font-size: 9px;
  color: var(--muted);
}
#assistant-send {
  margin-left: auto;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 9px;
  font-size: 20px;
  display: grid;
  place-items: center;
}
#assistant-send:disabled {
  opacity: 0.35;
  cursor: default;
}
.assistant-draft-note {
  color: #91869b;
  font-size: 9px;
  text-align: center;
  line-height: 1.5;
  margin: 8px 0 0;
}
.assistant-draft-note span {
  margin-right: 3px;
}
.assistant-thinking {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 0 16px;
}
.thinking-dots {
  display: flex;
  gap: 3px;
}
.thinking-dots i {
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: chat-pulse 1.2s ease-in-out infinite;
}
.thinking-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.thinking-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chat-pulse {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .thinking-dots i {
    animation: none;
  }
}
.assistant-error {
  margin: 0 16px 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dfc7bc;
  background: #fff8f2;
  font-size: 11px;
  flex-shrink: 0;
  max-height: 160px;
  overflow: auto;
}
.assistant-error p {
  line-height: 1.5;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.assistant-error button {
  margin-top: 5px;
  font-size: 11px;
  padding: 6px 9px;
}
.chat-focus .inspector {
  padding: 0;
  height: calc(100dvh - 170px);
  max-height: none;
  min-height: 400px;
}
.assistant-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px;
}
.attachment-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.attachment-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}
.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip button {
  padding: 2px 6px;
  flex-shrink: 0;
}
.attachment-note {
  margin: 7px 12px;
  font-size: 11px;
  color: var(--muted);
}
.assistant-attached-names {
  font-size: 11px;
  opacity: 0.8;
}
#assistant-panel.attachment-drop-target {
  outline: 3px dashed var(--accent);
  outline-offset: -3px;
}
#attach-assistant {
  padding: 5px 7px;
  font-size: 11px;
  white-space: nowrap;
}
@container (max-width: 410px) {
  #assistant-composer-hint {
    display: none;
  }
}
.chat-focus #assistant-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
.chat-focus .assistant-log {
  flex: 1;
  min-height: 80px;
  max-height: none;
}
@container (min-width: 560px) {
  .proposal-comparison {
    grid-template-columns: 1fr 1fr;
  }
}
@container (max-width: 340px) {
  #reset-assistant span {
    display: none;
  }
  #reset-assistant {
    font-size: 18px;
  }
  #assistant-composer-hint > span {
    display: none;
  }
  .assistant-header,
  .assistant-log {
    padding: 16px 12px;
  }
  .assistant-compose-area {
    padding: 10px;
  }
  .assistant-welcome h4 {
    font-size: 24px;
  }
}
@media (max-width: 760px) {
  .assistant-resize-hint {
    display: none;
  }
  .chat-focus .inspector {
    height: 720px;
    height: min(780px, 90dvh);
    min-height: 540px;
  }
}
.proposal-page {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.proposal-page h5 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
}
.proposal-page h5 span {
  font-weight: 400;
  color: var(--muted);
}
.proposal-pick {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 2px 0 8px;
  cursor: pointer;
}
.proposal-pick > strong {
  font-size: 11px;
}
.proposal-change:has(.proposal-pick input:not(:checked)) .proposal-comparison {
  opacity: 0.45;
}
.proposal-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 12px;
}
