.ai-summary {
  height: calc(100dvh - 60px);
  min-height: 395px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f5f5fa;
}
.ai-preview,
.ai-scroll {
  overflow: auto;
  min-height: 0;
}
.ai-preview {
  padding: 30px 6%;
  border-right: 1px solid #cdccd6;
}
.ai-preview figure {
  margin: 4px auto 18px;
  background: white;
  box-shadow: 0 1px 5px #0002;
  max-width: 850px;
}
.ai-preview img {
  display: block;
  width: 100%;
  min-height: 60px;
}
.ai-preview img:not([src]) {
  min-height: 56vh;
  visibility: hidden;
}
.ai-chat {
  background: white;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ai-chat > header {
  padding: 16px 24px;
  border-bottom: 1px solid #e0dfea;
  font-size: 22px;
  font-weight: 600;
}
.ai-chat > header strong {
  font-size: 13px;
  color: white;
  background: #7351e4;
  border-radius: 5px;
  padding: 4px;
  vertical-align: middle;
}
.ai-scroll {
  padding: 20px 28px;
  flex: 1;
}
.ai-points li {
  margin: 0.65em 0;
  line-height: 1.55;
}
.ai-conversation h2 {
  font-size: 23px;
}
.ai-source-page {
  border: 0;
  background: transparent;
  color: #63539a;
  font: inherit;
  font-size: 0.8em;
  text-decoration: underline;
}
.ai-suggest {
  padding: 12px;
  background: #f5f3fc;
  border-radius: 6px;
}
.ai-suggest summary {
  cursor: pointer;
  margin-bottom: 8px;
}
.ai-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #ac9ce4;
  border-radius: 4px;
  padding: 8px;
  margin-top: 5px;
  background: white;
  line-height: 1.4;
}
.ai-actions,
.ai-length-labels {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-actions button,
.ai-turn > button:last-child,
.ai-length-labels button {
  border: 0;
  background: none;
  color: #544d63;
  padding: 7px 3px;
}
.ai-actions {
  margin: 14px 0;
}
.ai-turn {
  border-top: 1px solid #e1dfeb;
  padding: 14px 0;
}
.ai-turn p {
  white-space: pre-line;
}
.ai-compose {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-top: 1px solid #ddd;
}
.ai-compose textarea {
  flex: 1;
  min-width: 0;
  border-radius: 22px;
  border: 1px solid #957bd6;
  padding: 12px 17px;
  font: inherit;
  resize: vertical;
}
.ai-compose button {
  border: 0;
  border-radius: 50%;
  background: #704ad8;
  color: white;
  width: 42px;
  height: 42px;
  font-size: 22px;
}
.ai-compose button:disabled {
  opacity: 0.45;
}
.ai-status {
  color: #66518b;
  font-size: 14px;
  margin: 8px 0;
}
.ai-settings {
  min-width: min(360px, 65vw);
}
.ai-settings input[type="range"] {
  width: 100%;
  accent-color: #7653dc;
}
.ai-settings h3,
.ai-translation h3 {
  font-size: 16px;
  margin: 18px 0 9px;
}
.ai-length-labels {
  justify-content: space-between;
}
.ai-length-labels [aria-pressed="true"] {
  color: #6543cf;
  font-weight: 600;
}
.ai-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0;
  cursor: pointer;
}
.ai-choice input {
  accent-color: #7653dc;
  margin-top: 4px;
}
.ai-choice small {
  display: block;
  font-size: 0.85em;
  color: #656472;
  margin-top: 4px;
}
.ai-settings > .primary {
  width: 100%;
  margin-top: 16px;
}
.ai-translation .pdf-files {
  padding-top: 65px;
}
.ai-picker {
  position: relative;
  margin-top: 12px;
}
.ai-picker label {
  display: block;
  margin-bottom: 6px;
}
.ai-picker input {
  width: 100%;
  padding: 10px;
  border: 1px solid #bcbcc8;
  border-radius: 5px;
  font: inherit;
}
.ai-pick-menu {
  position: absolute;
  background: #fff;
  border: 1px solid #cfcdda;
  z-index: 5;
  top: 100%;
  width: 100%;
  max-height: 235px;
  overflow: auto;
  box-shadow: 0 4px 12px #2222;
}
.ai-pick-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: white;
  text-align: left;
}
.ai-pick-menu button:is(:focus, :hover),
.ai-pick-menu [aria-selected="true"] {
  background: #f0edfa;
}
.ai-flip {
  display: block;
  border: 1px solid #d2cede;
  background: white;
  margin: 10px 0 0 auto;
  padding: 4px 10px;
  border-radius: 6px;
}
.ai-summary [hidden],
.ai-translation [hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .ai-summary {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .ai-preview {
    height: 34dvh;
    min-height: 180px;
    padding: 15px 12%;
  }
  .ai-chat {
    min-height: 40vh;
  }
  .ai-scroll {
    max-height: 52vh;
    padding: 16px;
  }
  .ai-compose {
    padding: 12px;
  }
}
