.ai-studio {
  --ai-action: var(--action, #263548);
  container-type: inline-size;
  color: var(--ink, #1f2937);
  min-width: 0;
  margin: 0 auto;
  max-width: 1280px;
}
.ai-studio button,
.ai-studio textarea {
  font: inherit;
}
.ai-studio button {
  cursor: pointer;
}
.ai-studio button:disabled {
  cursor: default;
}
.ai-studio .icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.ai-studio button:focus-visible,
.ai-studio textarea:focus-visible,
.ai-studio summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ai-action) 55%, transparent);
  outline-offset: 4px;
}
.ai-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--line, #e6e8ed);
  margin-bottom: 22px;
}
.ai-studio-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ai-brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface, #fff);
  color: var(--ai-action);
  box-shadow: 0 2px 7px #15203506;
  flex: none;
}
.ai-studio-brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
  line-height: 1.3;
  font-weight: 700;
}
.ai-studio-brand p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted, #667085);
  overflow-wrap: anywhere;
}
.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.ai-tool-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px !important;
  white-space: nowrap;
}
.ai-tool-button:hover,
.ai-tool-button[aria-expanded='true'] {
  background: var(--surface, #fff);
  border-color: var(--line);
  color: var(--ink);
}
.ai-tool-button .icon {
  width: 17px;
  height: 17px;
}
.ai-new-chat {
  border-color: var(--line);
  background: var(--surface, #fff);
  color: var(--ink);
}
.ai-studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.ai-studio-body.is-history-open {
  grid-template-columns: 232px minmax(0, 1fr);
}
.ai-history[hidden] {
  display: none;
}
.ai-history {
  align-self: start;
  border: 1px solid var(--line);
  background: var(--surface, #fff);
  border-radius: 16px;
  padding: 16px 12px;
  min-width: 0;
  max-height: calc(100dvh - 210px);
  overflow: auto;
}
.ai-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 6px;
}
.ai-history-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}
.ai-history-heading .ai-tool-button {
  padding: 5px;
  min-height: 28px;
}
.ai-history-caption,
.ai-history-empty {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  padding: 0 6px;
  margin: 6px 0 14px;
}
.ai-history-empty {
  padding: 24px 12px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  margin: 12px 4px;
}
.ai-history nav {
  display: grid;
  gap: 4px;
}
.ai-history-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 11px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 12px !important;
  line-height: 1.5;
}
.ai-history-item .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--muted);
}
.ai-history-item span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.ai-history-item:hover,
.ai-history-item[aria-current='page'] {
  background: var(--bg, #f7f8fa);
  border-color: var(--line);
}
.ai-history-refresh {
  display: flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  margin-top: 12px;
  padding: 15px 6px 0;
  color: var(--muted);
  font-size: 11px !important;
}
.ai-history-refresh .icon {
  width: 15px;
  height: 15px;
}
.ai-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100dvh - 250px);
}
.ai-service-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.ai-service-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--ai-action);
}
.ai-service-note p {
  margin: 0;
}
.ai-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, #b45309 25%, var(--line));
  background: color-mix(in srgb, #fef3c7 28%, var(--surface));
  color: var(--ink);
  border-radius: 12px;
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.6;
}
.ai-error > .icon {
  width: 18px;
  height: 18px;
  color: #9a560b;
  flex: none;
  margin-top: 2px;
}
.ai-error p {
  margin: 0 0 6px;
}
.ai-chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ai-welcome {
  text-align: center;
  padding: 38px 10px 24px;
  max-width: 720px;
  margin: auto;
  width: 100%;
  box-sizing: border-box;
}
.ai-welcome-mark {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 20px;
  border: 1px solid color-mix(in srgb, var(--ai-action) 10%, var(--line));
  border-radius: 22px;
  background: linear-gradient(
    145deg,
    var(--surface, #fff),
    color-mix(in srgb, var(--accent-light, #e7d5b6) 22%, var(--surface, #fff))
  );
  box-shadow:
    0 8px 32px #17212d08,
    inset 0 1px 0 #ffffff80;
  color: var(--ai-action);
  transform: rotate(-5deg);
}
.ai-welcome-mark .icon {
  width: 29px;
  height: 29px;
  transform: rotate(5deg);
}
.ai-kicker {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 650;
}
.ai-welcome h2 {
  margin: 0;
  font-size: clamp(28px, 4.5cqi, 42px);
  letter-spacing: -0.055em;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink);
}
.ai-welcome-intro {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 14px 0 30px;
}
.ai-welcome-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 17px 0 0;
}
.ai-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}
.ai-prompt-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 38px 18px 16px;
  background: var(--surface, #fff);
  color: var(--ink);
  box-shadow: 0 2px 4px #14213002;
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
  min-width: 0;
}
.ai-prompt-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ai-action) 32%, var(--line));
  box-shadow: 0 6px 18px #14213007;
  transform: translateY(-2px);
}
.ai-prompt-icon {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg, #f7f8fa);
  color: var(--ai-action);
}
.ai-prompt-icon .icon {
  width: 18px;
  height: 18px;
}
.ai-prompt-card strong {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.ai-prompt-card > span:not([class]) {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.ai-prompt-arrow {
  position: absolute;
  right: 13px;
  top: 22px;
  color: var(--muted);
  opacity: 0.55;
}
.ai-prompt-arrow .icon {
  width: 14px;
  height: 14px;
}
.ai-prompt-card:disabled {
  opacity: 0.55;
}
.ai-thread {
  overflow: auto;
  scrollbar-gutter: stable;
  max-height: calc(100dvh - 360px);
  min-height: 220px;
  padding: 20px 6px 18px;
}
.ai-turn {
  display: flow-root;
  margin-bottom: 28px;
}
.ai-turn:last-child {
  margin-bottom: 0;
}
.ai-message {
  min-width: 0;
}
.ai-message-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: 14px;
}
.ai-message-label {
  display: block;
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 7px;
  line-height: 1.3;
}
.ai-message-user {
  margin: 0 0 24px auto;
  max-width: 82%;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--ai-action) 5%, var(--line));
  background: color-mix(in srgb, var(--accent-light, #e7d5b6) 13%, var(--surface, #fff));
  border-radius: 18px 18px 5px 18px;
  padding: 13px 18px;
}
.ai-message-assistant {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-right: 28px;
}
.ai-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ai-action);
}
.ai-avatar .icon {
  width: 16px;
  height: 16px;
}
.ai-message-body {
  min-width: 0;
  padding-top: 2px;
  flex: 1;
}
.ai-message-body .ai-message-label {
  margin: 5px 0 12px;
}
.ai-request-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding: 14px 0;
  margin: 0;
}
.ai-chat-content > .ai-loading {
  justify-content: center;
  padding: 60px 0;
}
.ai-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ai-action);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ai-action) 8%, transparent);
  animation: ai-pulse 1.6s ease-in-out infinite;
}
.ai-inline-button {
  border: 0;
  background: none;
  color: var(--ai-action);
  font-size: 12px !important;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ai-composer-wrap {
  position: sticky;
  bottom: 8px;
  margin-top: 16px;
  padding-top: 8px;
  background: var(--bg, #f7f8fa);
  border-radius: 20px 20px 0 0;
  z-index: 2;
}
.ai-composer {
  background: var(--surface, #fff);
  border: 1px solid color-mix(in srgb, var(--ai-action) 14%, var(--line));
  border-radius: 20px;
  padding: 16px 17px 12px;
  box-shadow:
    0 8px 28px #14213008,
    0 1px 2px #14213005;
}
.ai-composer:focus-within {
  border-color: color-mix(in srgb, var(--ai-action) 48%, var(--line));
  box-shadow:
    0 8px 28px #14213009,
    0 0 0 3px color-mix(in srgb, var(--ai-action) 4%, transparent);
}
.ai-composer textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 64px;
  min-height: 64px;
  max-height: 216px;
  resize: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  box-shadow: none !important;
  outline: none !important;
}
.ai-composer textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.ai-composer textarea:disabled {
  opacity: 0.7;
}
.ai-composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.ai-composer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}
.ai-composer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  background: var(--bg, #f7f8fa);
  white-space: nowrap;
}
.ai-composer-chip .icon {
  width: 13px;
  height: 13px;
}
.ai-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: var(--ai-action);
  color: #fff;
  flex: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.ai-send .icon {
  width: 19px;
  height: 19px;
  transform: rotate(-90deg);
}
.ai-send:hover:not(:disabled) {
  transform: translateY(-1px);
}
.ai-send:disabled {
  background: var(--line, #e6e8ed);
  color: var(--muted, #667085);
  box-shadow: none;
}
.ai-composer-hint {
  margin: 9px 6px 0;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.ai-disclaimer {
  margin: 7px auto 0;
  max-width: 720px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.ai-disclaimer summary {
  cursor: pointer;
  list-style: none;
}
.ai-disclaimer summary::-webkit-details-marker {
  display: none;
}
.ai-disclaimer summary::after {
  content: ' ⌄';
  margin-left: 3px;
}
.ai-disclaimer[open] summary::after {
  content: ' ⌃';
}
.ai-disclaimer p {
  margin: 8px 6px 0;
  overflow-wrap: anywhere;
}
.ai-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.ai-access-note {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  line-height: 1.7;
}
@keyframes ai-pulse {
  50% {
    opacity: 0.35;
  }
}
.ai-composer:focus-within {
  outline: 2px solid color-mix(in srgb, var(--ai-action) 28%, transparent);
  outline-offset: 3px;
}
.ai-prompt-card strong {
  font-size: 13px;
}
.ai-prompt-card > span:not([class]) {
  font-size: 12px;
}
.ai-welcome-intro {
  font-size: 15px;
}
@container (max-width:850px) {
  .ai-studio-body.is-history-open {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-history {
    max-height: 240px;
  }
  .ai-studio-brand p span {
    display: none;
  }
  .ai-welcome {
    padding-top: 30px;
  }
  .ai-chat {
    min-height: calc(100dvh - 240px);
  }
}
@container (max-width:520px) {
  .ai-studio-header {
    align-items: flex-start;
    gap: 10px;
  }
  .ai-studio-brand h1 {
    font-size: 18px;
  }
  .ai-studio-brand p {
    max-width: 185px;
    font-size: 11px;
  }
  .ai-brand-icon {
    width: 36px;
    height: 36px;
  }
  .ai-header-actions {
    gap: 2px;
  }
  .ai-header-actions .ai-tool-button {
    padding: 8px;
  }
  .ai-header-actions .ai-tool-button span {
    display: none;
  }
  .ai-new-chat::after {
    content: none;
  }
  .ai-prompt-grid {
    gap: 9px;
  }
  .ai-prompt-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px 12px;
    min-height: 128px;
  }
  .ai-prompt-card strong {
    font-size: 13px;
  }
  .ai-prompt-card > span:not([class]) {
    font-size: 12px;
  }
  .ai-prompt-arrow {
    top: 20px;
    right: 12px;
  }
  .ai-welcome {
    padding: 25px 0 16px;
  }
  .ai-welcome-intro {
    font-size: 13px;
    margin-bottom: 24px;
  }
  .ai-welcome-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }
  .ai-message-user {
    max-width: 88%;
    padding: 12px 14px;
  }
  .ai-message-copy {
    font-size: 13px;
  }
  .ai-message-assistant {
    margin-right: 0;
    gap: 9px;
  }
  .ai-composer {
    padding: 14px 13px 11px;
    border-radius: 16px;
  }
  .ai-composer textarea {
    font-size: 16px;
  }
  .ai-composer-meta {
    gap: 8px;
    font-size: 9px;
  }
  .ai-composer-chip {
    padding: 4px 6px;
  }
  .ai-composer-hint,
  .ai-disclaimer {
    font-size: 9px;
  }
  .ai-thread {
    max-height: calc(100dvh - 330px);
  }
}
@media (max-width: 800px) {
  .ai-studio-body.is-history-open {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-history {
    max-height: 240px;
  }
}
.ai-composer-wrap {
  position: relative;
  bottom: auto;
}
.ai-welcome {
  padding-top: 24px;
}
.ai-welcome-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 15px;
  border-radius: 19px;
}
.ai-welcome-intro {
  margin: 12px 0 24px;
}
@media (max-height: 820px) {
  .ai-studio-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .ai-chat {
    min-height: 0;
  }
  .ai-service-note {
    padding: 9px 12px;
    margin-bottom: 7px;
  }
  .ai-welcome {
    padding: 12px 4px 10px;
  }
  .ai-welcome-mark {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    border-radius: 14px;
  }
  .ai-welcome-mark .icon {
    width: 23px;
    height: 23px;
  }
  .ai-kicker,
  .ai-welcome-intro,
  .ai-welcome-hint {
    display: none;
  }
  .ai-welcome h2 {
    font-size: 30px;
    margin-bottom: 20px;
  }
  .ai-prompt-card {
    padding-top: 14px;
    padding-bottom: 14px;
    min-height: 0;
  }
  .ai-composer-wrap {
    margin-top: 12px;
    padding-top: 0;
  }
  .ai-composer {
    padding: 12px 14px 10px;
  }
  .ai-composer textarea {
    height: 48px;
    min-height: 48px;
  }
  .ai-composer-tools {
    margin-top: 3px;
  }
  .ai-composer-hint {
    margin-top: 6px;
  }
  .ai-disclaimer {
    margin-top: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai-loading-dot {
    animation: none;
  }
  .ai-studio button {
    transition: none;
  }
  .ai-prompt-card:hover:not(:disabled) {
    transform: none;
  }
}
.ai-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.ai-mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
}
.ai-mode-switch button[aria-pressed='true'] {
  background: var(--ai-action);
  border-color: var(--ai-action);
  color: #fff;
}
.ai-mode-switch .icon {
  width: 14px;
  height: 14px;
}
.ai-mode-switch button:last-child {
  margin-left: auto;
}
.ai-demo-task-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.ai-demo-task-note button {
  border: 0;
  background: transparent;
  color: var(--ai-action);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex: none;
}
.ai-task-card {
  margin: 20px 28px 0 41px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--ai-action) 22%, var(--line));
  border-radius: 16px;
  background: var(--surface, #fff);
  box-shadow: 0 6px 20px #14213005;
  min-width: 0;
}
.ai-task-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ai-task-card-heading > .icon {
  width: 20px;
  height: 20px;
  color: var(--ai-action);
  margin-top: 2px;
}
.ai-task-card-heading strong {
  font-size: 14px;
  font-weight: 650;
}
.ai-task-card-heading p {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.ai-task-badge {
  margin-left: auto;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 9px;
}
.ai-task-missing {
  margin: 16px 0 0;
  border-left: 3px solid #cc983b;
  padding: 8px 12px;
  background: color-mix(in srgb, #fff7e5 35%, var(--surface));
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.ai-task-missing strong {
  color: var(--ink);
  font-weight: 600;
}
.ai-task-missing ul {
  padding-left: 16px;
  margin: 5px 0 0;
}
.ai-task-form {
  margin-top: 18px;
}
.ai-task-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 14px;
}
.ai-task-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.ai-task-form input:not([type='checkbox']),
.ai-task-form textarea,
.ai-task-form select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 40px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg, #f7f8fa);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
}
.ai-task-form textarea {
  resize: vertical;
  line-height: 1.65;
}
.ai-task-form input:focus-visible,
.ai-task-form select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ai-action) 40%, transparent);
  outline-offset: 2px;
}
.ai-task-field-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
}
.ai-task-field-hint {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.6;
}
.ai-task-owner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.ai-task-owner .icon {
  width: 14px;
  height: 14px;
}
.ai-task-form .ai-task-review {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
}
.ai-task-review input {
  flex: none;
  margin: 3px 0 0;
  accent-color: var(--ai-action);
}
.ai-task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.ai-task-card-footer > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.ai-task-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--ai-action);
  color: white;
  padding: 11px 14px;
  font-size: 11px !important;
  white-space: nowrap;
}
.ai-task-primary .icon {
  width: 14px;
  height: 14px;
}
.ai-task-primary:disabled {
  opacity: 0.45;
}
.ai-task-form-error {
  font-size: 11px;
  color: #9a560b;
  line-height: 1.6;
  margin: 12px 0 0;
}
.ai-task-saved {
  border-color: color-mix(in srgb, #39816a 35%, var(--line));
}
.ai-task-saved .ai-task-card-heading > .icon {
  color: #39816a;
}
.ai-task-saved > p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 14px 0;
}
@container (max-width:520px) {
  .ai-task-card {
    margin: 16px 0 0;
    padding: 15px;
  }
  .ai-task-badge {
    display: none;
  }
  .ai-task-field-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-task-form input:not([type='checkbox']),
  .ai-task-form textarea,
  .ai-task-form select {
    font-size: 16px;
  }
  .ai-task-card-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .ai-task-card-footer > span {
    text-align: center;
  }
  .ai-demo-task-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .ai-mode-switch button:last-child {
    margin-left: 0;
  }
  .ai-mode-switch button {
    font-size: 10px;
  }
}
.ai-email-chooser {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  margin: 8px 0 12px;
  border: 1px solid var(--ai-line, #e4e7eb);
  border-radius: 16px;
  background: #f8fafb;
}
.ai-email-chooser label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  min-width: 0;
}
.ai-email-chooser input,
.ai-email-chooser select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #dce2e7;
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
  color: #172a36;
  font: inherit;
}
.ai-email-chooser p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #64748b;
}
.ai-email-search {
  display: flex;
  gap: 8px;
  align-items: end;
}
.ai-email-search label {
  flex: 1;
}
.ai-email-search button {
  min-height: 37px;
}
.ai-email-recipient {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8ed;
  border-radius: 12px;
  background: #f7f9fb;
  margin: 12px 0 16px;
}
.ai-email-recipient > svg {
  width: 20px;
  height: 20px;
  color: #64748b;
  flex-shrink: 0;
}
.ai-email-recipient > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ai-email-recipient span {
  font-size: 12px;
  color: #64748b;
  overflow-wrap: anywhere;
}
.ai-email-recipient strong {
  font-size: 14px;
  color: #233342;
  overflow-wrap: anywhere;
}
.ai-email-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.8;
  color: #384957;
  padding: 14px 0;
}
.ai-email-subject {
  display: block;
  overflow-wrap: anywhere;
}
.ai-email-card .ai-task-form textarea {
  min-height: 170px;
}
.ai-email-card .ai-task-primary {
  white-space: normal;
}
.ai-mode-switch {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .ai-email-chooser {
    padding: 12px;
  }
  .ai-email-search {
    align-items: stretch;
  }
  .ai-email-search button {
    align-self: end;
  }
  .ai-email-card .ai-task-card-heading {
    flex-wrap: wrap;
  }
  .ai-email-card .ai-task-badge {
    margin-left: 0;
  }
}
.ai-email-chooser {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 14px;
}
.ai-email-chooser > p {
  grid-column: 1/-1;
}
.ai-email-search {
  min-width: 0;
}
.ai-email-chooser input,
.ai-email-chooser select {
  min-height: 40px;
}
.ai-email-recipient {
  background: var(--bg, #f7f9fb);
  border-color: var(--line, #e2e8ed);
}
@container (max-width:600px) {
  .ai-email-chooser {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-email-chooser input,
  .ai-email-chooser select {
    font-size: 16px;
  }
  .ai-email-search button {
    font-size: 12px !important;
  }
}
.ai-email-welcome {
  padding: 16px 0 14px;
}
.ai-email-welcome h2 {
  font-size: clamp(24px, 3.5cqi, 32px);
}
.ai-email-welcome > p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 6px;
}

/* Saved company actions share the assistant form and review styles. */
.ai-workspace .ai-task-card-heading {
  flex-wrap: wrap;
  align-items: center;
}
.ai-workspace .ai-task-card-heading strong {
  flex: 1;
  min-width: 180px;
}
.ai-workspace-intro {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}
.ai-workspace-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.ai-workspace-search .ai-tool-button {
  min-height: 40px;
}
.ai-workspace button {
  cursor: pointer;
}
.ai-workspace button:disabled {
  cursor: default;
  opacity: 0.45;
}
.ai-workspace .ai-task-primary {
  min-height: 42px;
  white-space: normal;
  line-height: 1.5;
}
.ai-workspace .ai-task-primary:not(:disabled):hover {
  filter: brightness(1.1);
}
.ai-workspace button:focus-visible,
.ai-workspace textarea:focus-visible,
.ai-workspace input[type='checkbox']:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ai-action) 50%, transparent);
  outline-offset: 3px;
}
.ai-workspace-records {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.ai-workspace-records:empty {
  display: none;
}
.ai-workspace-record {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #fff);
}
.ai-workspace-record-title {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ai-workspace-record > p {
  margin: 12px 0;
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.ai-workspace-record > .ai-workspace-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.65;
}
.ai-workspace-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.ai-workspace-metrics > div {
  padding: 12px;
  min-width: 0;
  background: var(--bg, #f7f8fa);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.ai-workspace-metrics dt {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.ai-workspace-metrics dd {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.ai-workspace .ai-task-review {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg, #f7f8fa);
  font-size: 11px;
  line-height: 1.7;
}
.ai-workspace .ai-task-review span {
  min-width: 0;
}
.ai-workspace .ai-task-review input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
@container (max-width:520px) {
  .ai-workspace .ai-task-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-workspace .ai-task-badge {
    display: inline-block;
    margin-left: 0;
    white-space: normal;
    line-height: 1.5;
  }
  .ai-workspace-search {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .ai-workspace-search .ai-tool-button,
  .ai-workspace .ai-task-primary {
    min-height: 44px;
  }
  .ai-workspace-record {
    padding: 14px;
  }
  .ai-workspace-metrics {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .ai-workspace-metrics > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .ai-workspace-metrics dt {
    max-width: 48%;
  }
  .ai-workspace-metrics dd {
    margin: 0;
    text-align: right;
    max-width: 56%;
  }
  .ai-workspace .ai-task-review {
    font-size: 12px;
  }
}
