:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #27272a;
  background: #f6f6f4;
  font-synthesis: none;
  --red: #c62430;
  --red-hover: #a71b25;
  --muted: #6d6d73;
  --line: #e7e7e3;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-underline-offset: 3px; }
button, a, summary, input, textarea, [tabindex] { outline-offset: 4px; }
:focus-visible { outline: 3px solid #a51c28; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 12px 18px; background: #fff; border: 2px solid var(--red); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 78px; border-bottom: 1px solid var(--line); background: #fff; padding: 16px 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.identity, .header-actions { display: flex; align-items: center; gap: 20px; }
.brand { font-size: 19px; font-weight: 850; letter-spacing: .035em; white-space: nowrap; text-decoration: none; }
.brand:hover { color: var(--red); }
.identity-divider { height: 24px; width: 1px; background: #dcdcd9; }
.product-name { color: #626266; font-size: 14px; }
.prototype-label { color: #737377; font-size: 12px; }
.button { border: none; display: inline-flex; align-items: center; justify-content: center; gap: 11px; font-size: 13px; font-weight: 650; border-radius: 9px; min-height: 42px; padding: 10px 15px; transition: background-color .15s ease; }
.button-quiet { background: #f5f5f3; color: #3d3d41; border: 1px solid var(--line); }
.button-quiet:hover { background: #ebebe8; }
.button-quiet span { font-size: 21px; font-weight: 400; line-height: 1; }
.button-primary { background: var(--red); color: #fff; min-height: 44px; }
.button-primary:hover:not(:disabled) { background: var(--red-hover); }
#submit-icon { font-size: 21px; line-height: 1; }
.workspace { max-width: 1000px; margin: 0 auto; padding: 25px 28px; }
.conversation-panel { display: flex; flex-direction: column; height: calc(100dvh - 128px); min-height: 590px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 24px #1b1b2004; }
.panel-topline { padding: 22px 27px; border-bottom: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 13px; align-items: center; justify-content: space-between; flex-shrink: 0; }
.panel-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.widget-mark { display: none; }
.widget-controls { display: none; }
h1 { font-size: 17px; line-height: 1.35; letter-spacing: -.025em; font-weight: 650; margin: 0; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 600; color: #65656b; border: 1px solid var(--line); border-radius: 20px; padding: 7px 10px; background: #fafaf9; }
.status-dot { height: 6px; width: 6px; background: #9c9c9c; border-radius: 50%; }
.mode-pill[data-state="pending"] .status-dot { background: #ac7b2a; }
.mode-pill[data-state="generative"] .status-dot { background: #3e8258; }
.mode-pill[data-state="error"] .status-dot { background: var(--red); }
.mode-notice { flex-shrink: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px; margin: 17px 24px 0; border-radius: 9px; background: #faf7f0; border: 1px solid #ede4d2; color: #6d592f; font-size: 11px; line-height: 1.65; }
.mode-notice strong { font-size: 11px; font-weight: 650; }
.mode-notice p { margin: 2px 0 0; }
.notice-icon { border: 1px solid currentColor; border-radius: 50%; flex: 0 0 15px; height: 15px; text-align: center; font-size: 10px; line-height: 13px; margin-top: 2px; font-weight: 700; }
.conversation { flex: 1; min-height: 180px; overflow-y: auto; padding: 30px 42px; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-bottom: 24px; }
.welcome { padding: 35px 0 15px; max-width: 620px; margin: 0 auto; text-align: center; }
.welcome-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border-radius: 50%; margin-bottom: 23px; overflow: hidden; }
.welcome-mark img,
.widget-mark img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  border: 0;
}
.welcome h2 { font-size: clamp(26px, 3vw, 33px); font-weight: 650; letter-spacing: -.04em; line-height: 1.25; margin: 0 0 13px; }
.welcome > p { max-width: 430px; color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0 auto; }
.suggestions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin: 27px 0 0; }
.suggestion { display: inline-flex; align-items: center; justify-content: space-between; gap: 17px; color: #515156; background: #fff; border: 1px solid #e4e4e2; border-radius: 9px; padding: 11px 13px; font-size: 11px; line-height: 1.5; text-align: left; min-height: 42px; }
.suggestion:hover { border-color: #c9a5aa; background: #fdf9f9; }
.suggestion span { color: #8d8d91; font-size: 15px; }
.composer { flex-shrink: 0; margin: 0 24px 22px; border: 1px solid #dcdcd9; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px #22222203; }
.page-context { border-bottom: 1px solid #eeedeb; padding: 0 16px; }
.page-context summary { display: flex; list-style: none; align-items: center; gap: 8px; color: #77777c; padding: 10px 0; font-size: 10px; cursor: pointer; }
.page-context summary::-webkit-details-marker { display: none; }
.page-context summary::after { content: "+"; margin-left: auto; font-size: 16px; line-height: 1; color: #929297; }
.page-context[open] summary::after { content: "−"; }
.context-indicator { height: 6px; width: 6px; border: 1px solid #a8a8ad; border-radius: 2px; flex-shrink: 0; }
.page-context.has-context .context-indicator { background: var(--red); border-color: var(--red); }
.context-fields { padding: 1px 0 13px; }
.context-fields label { display: block; font-size: 11px; font-weight: 600; margin: 0 0 7px; }
.context-fields input { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #dcdcd9; border-radius: 7px; background: #fafaf9; font-size: 12px; color: #333; }
.context-fields input[aria-invalid="true"] { border-color: var(--red); }
.field-help, .field-error { font-size: 10px; line-height: 1.6; margin: 6px 0 0; }
.field-help { color: #818186; }
.field-error { color: #a51c28; }
.question-field { display: flex; align-items: end; gap: 12px; padding: 13px 13px 10px 16px; }
textarea { min-height: 60px; max-height: 180px; flex: 1; width: 100%; min-width: 0; resize: vertical; padding: 2px 0; border: none; background: transparent; font-size: 14px; color: #252529; line-height: 1.75; }
textarea:focus-visible { outline: none; }
.question-field:focus-within { outline: 2px solid #c6243070; outline-offset: -2px; border-radius: 5px; }
textarea::placeholder { color: #98989c; }
.composer-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 0 16px 11px; color: #8b8b90; font-size: 9px; line-height: 1.7; }
.message { margin: 0 0 25px; animation: arrive .16s ease-out; }
.message:last-child { margin-bottom: 0; }
.message-heading { font-size: 11px; font-weight: 650; color: #7b7b80; margin: 0 0 8px; }
.message-user { display: flex; flex-direction: column; align-items: flex-end; }
.user-question { max-width: 90%; margin: 0; padding: 12px 16px; background: #f2f2f0; border: 1px solid #e9e9e6; border-radius: 13px 13px 3px 13px; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-text { white-space: pre-wrap; font-size: 15px; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
.answer-sources { margin-top: 10px; color: #78787e; font-size: 11px; line-height: 1.7; }
.answer-sources summary { display: list-item; width: fit-content; cursor: pointer; }
.source-links { margin: 7px 0 0; padding-left: 18px; }
.source-links li { padding: 2px 0; overflow-wrap: anywhere; }
.source-links a:hover { color: var(--red); }
.message-error { border-left: 3px solid var(--red); padding-left: 14px; }
.message-loading { color: #77777d; font-size: 12px; display: flex; align-items: center; gap: 9px; min-height: 24px; }
.loading-indicator { width: 12px; height: 12px; display: inline-block; border: 2px solid #dededb; border-top-color: #9b9ba0; border-radius: 50%; animation: turn .9s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes arrive { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 700px) {
  .site-header { min-height: 70px; padding: 14px 18px; gap: 14px; }
  .brand { font-size: 17px; }
  .identity { gap: 13px; }
  .product-name { font-size: 12px; }
  .prototype-label { display: none; }
  .button-quiet { font-size: 11px; padding: 8px 11px; }
  .workspace { padding: 15px; }
  .conversation-panel { height: calc(100dvh - 100px); min-height: 570px; border-radius: 12px; }
  .panel-topline { padding: 18px 20px; }
  .conversation { padding: 26px 24px; }
  .welcome { padding-top: 23px; }
  .welcome > p { font-size: 13px; }
  .suggestions { gap: 8px; }
  .composer { margin: 0 16px 16px; }
  .mode-notice { margin: 14px 16px 0; }
}
@media (max-width: 450px) {
  .site-header { padding: 12px 14px; }
  .identity-divider, .product-name { display: none; }
  .button-quiet { min-height: 37px; gap: 6px; }
  .workspace { padding: 10px; }
  .conversation-panel { height: calc(100dvh - 90px); min-height: 550px; }
  .panel-topline { padding: 16px; gap: 9px; }
  h1 { font-size: 16px; }
  .mode-pill { font-size: 9px; padding: 6px 8px; }
  .mode-notice { margin: 12px 12px 0; padding: 10px 12px; }
  .mode-notice strong, .mode-notice p { font-size: 10px; }
  .conversation { padding: 23px 17px; }
  .welcome { padding: 10px 0; }
  .welcome-mark { width: 36px; height: 36px; border-radius: 50%; margin-bottom: 19px; }
  .welcome h2 { font-size: 27px; }
  .suggestions { flex-direction: column; margin-top: 22px; }
  .suggestion { font-size: 11px; }
  .composer { margin: 0 11px 12px; }
  .page-context { padding: 0 12px; }
  .question-field { gap: 7px; padding-left: 12px; padding-right: 9px; }
  textarea { font-size: 16px; min-height: 58px; }
  .button-primary { min-height: 40px; padding: 9px 11px; font-size: 11px; gap: 8px; }
  .composer-footer { font-size: 9px; padding-left: 12px; padding-right: 12px; }
  .composer-footer > span:first-child { display: none; }
  .user-question { max-width: 96%; }
  .answer-text { font-size: 14px; }
}
body.is-embedded { min-width: 260px; height: 100dvh; overflow: hidden; background: #fff; }
.is-embedded .site-header { display: none; }
.is-embedded .workspace { width: 100%; max-width: none; height: 100%; margin: 0; padding: 0; }
.is-embedded .conversation-panel { width: 100%; height: 100%; min-height: 0; max-height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.is-embedded .panel-topline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 10px 13px 12px 16px; }
.is-embedded .panel-identity h1 { font-size: 16px; }
.is-embedded .widget-mark {
  display: inline-flex !important;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
}
.is-embedded .widget-mark img {
  width: 29px;
  height: 29px;
}
.is-embedded .widget-controls { display: flex; gap: 1px; }
.widget-control { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #626268; font-size: 25px; line-height: 1; }
.widget-control:hover { background: #f3f3f1; color: #222; }
.is-embedded .mode-pill { grid-column: 1 / -1; justify-self: start; border: 0; border-radius: 0; background: none; padding: 0; font-size: 10px; margin-left: 39px; }
.is-embedded .mode-notice { margin: 10px 13px 0; padding: 9px 11px; gap: 8px; line-height: 1.5; }
.is-embedded .mode-notice strong, .is-embedded .mode-notice p { font-size: 11px; }
.is-embedded .conversation { min-height: 0; padding: 21px 18px; scroll-padding-bottom: 18px; }
.is-embedded .welcome { max-width: 380px; padding: 9px 0 5px; text-align: left; }
.is-embedded .welcome-mark { display: none; }
.is-embedded .welcome h2 { font-size: 24px; line-height: 1.25; margin-bottom: 11px; }
.is-embedded .welcome > p { margin: 0; max-width: none; font-size: 13px; line-height: 1.65; }
.is-embedded .suggestions { flex-direction: column; gap: 7px; margin-top: 20px; }
.is-embedded .suggestion { width: 100%; min-height: 42px; padding: 10px 12px; font-size: 12px; }
.is-embedded .composer { margin: 0 12px 12px; }
.is-embedded .page-context { display: none; }
.is-embedded .question-field { gap: 8px; padding: 10px 9px 8px 12px; }
.is-embedded textarea { min-height: 50px; max-height: 105px; font-size: 16px; line-height: 1.5; resize: none; }
.is-embedded .button-primary { min-width: 42px; min-height: 42px; padding: 9px 11px; }
.is-embedded #submit-label { display: none; }
.is-embedded .composer-footer { padding: 0 12px 8px; font-size: 9px; }
.is-embedded .composer-footer > span:first-child { display: none; }
.is-embedded .message { margin-bottom: 22px; }
.is-embedded .user-question { max-width: 95%; padding: 10px 13px; font-size: 14px; line-height: 1.65; }
.is-embedded .answer-text { font-size: 14px; line-height: 1.7; }
.is-embedded .skip-link { left: 8px; max-width: calc(100% - 16px); font-size: 12px; }
@media (max-height: 560px) {
  .is-embedded .conversation { padding: 14px 18px; }
  .is-embedded .welcome { padding: 4px 0; }
  .is-embedded .welcome h2 { font-size: 22px; margin-bottom: 8px; }
  .is-embedded .welcome > p { font-size: 12px; line-height: 1.5; }
  .is-embedded .suggestions { margin-top: 12px; }
  .is-embedded .suggestion { min-height: 38px; padding: 8px 12px; }
  .is-embedded .suggestion:nth-child(2) { display: none; }
  .is-embedded .mode-notice strong { display: none; }
}
@media (max-height: 430px) {
  .is-embedded .welcome > p { display: none; }
  .is-embedded .welcome h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
