:root {
  color-scheme: light;
  --ink: #102238;
  --muted: #637386;
  --line: #dce5ed;
  --line-strong: #b8c8d8;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --canvas: #edf3f8;
  --blue: #1769e0;
  --blue-dark: #0e4fae;
  --blue-soft: #eaf3ff;
  --green: #137453;
  --green-soft: #e8f7f0;
  --amber: #9a5a00;
  --amber-soft: #fff5df;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 20px 55px rgb(31 65 96 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgb(23 105 224 / 13%), transparent 35%),
    var(--canvas);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button {
  min-height: 44px;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(23 105 224 / 24%);
  outline-offset: 2px;
}

.site-header,
.support-shell,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 22px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 15px;
  box-shadow: 0 10px 24px rgb(23 105 224 / 24%);
  font-size: 25px;
  font-weight: 850;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(27px, 4vw, 39px);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.eyebrow,
.section-kicker {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle,
.thread-label,
.live-status,
.input-help,
.details-intro,
.feedback-region p,
footer {
  color: var(--muted);
}

.subtitle {
  margin-bottom: 0;
  line-height: 1.55;
}

.secondary-button,
.primary-button,
.quick-question,
.feedback-button {
  border-radius: 10px;
  font-weight: 760;
}

.secondary-button {
  padding: 9px 16px;
  color: var(--blue-dark);
  background: rgb(255 255 255 / 72%);
  border: 1px solid #a9bfd7;
}

.secondary-button:hover:not(:disabled) {
  background: #fff;
  border-color: var(--blue);
}

.support-shell {
  display: grid;
  grid-template-columns: minmax(330px, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 27px;
  background: var(--surface);
  border: 1px solid rgb(190 206 220 / 82%);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.question-panel {
  position: sticky;
  top: 18px;
}

.section-heading,
.result-heading,
.subsection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading,
.result-heading {
  margin-bottom: 22px;
}

.thread-label {
  margin: 4px 0 0;
  font-size: 12px;
  white-space: nowrap;
}

.history-panel {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(248 251 255 / 88%);
}

.history-panel summary {
  display: flex;
  min-height: 44px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  gap: 12px;
}

.history-policy {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.history-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.history-list {
  display: grid;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  gap: 8px;
}

.history-item {
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #d8e3ef;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
  gap: 3px;
}

.history-item:hover,
.history-item:focus-visible {
  border-color: var(--blue);
}

.history-question {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time,
.history-empty {
  color: var(--muted);
  font-size: 11px;
}

.history-empty { padding: 8px 2px; }

.history-clear {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd8e6;
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.history-clear:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.field-label,
label {
  display: block;
  margin: 15px 0 7px;
  font-size: 13px;
  font-weight: 760;
}

.quick-question-region {
  margin-bottom: 17px;
}

.quick-question-region .field-label {
  margin-top: 0;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-question {
  padding: 8px 12px;
  color: #31506c;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 13px;
}

.quick-question:hover:not(:disabled) {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #a6c6f0;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select {
  min-height: 44px;
  padding: 9px 11px;
}

textarea {
  min-height: 128px;
  padding: 12px 13px;
  line-height: 1.65;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(23 105 224 / 10%);
}

.input-help {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.optional-details,
.processing-details {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: clip;
}

.optional-details summary,
.processing-details summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  color: #27445f;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 780;
  list-style: none;
}

.optional-details summary::-webkit-details-marker,
.processing-details summary::-webkit-details-marker {
  display: none;
}

.optional-details summary::after,
.processing-details summary::after {
  content: "+";
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
}

.optional-details[open] summary::after,
.processing-details[open] summary::after {
  content: "−";
}

.summary-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.optional-details-body,
.processing-body {
  padding: 5px 15px 16px;
}

.details-intro {
  margin: 11px 0 4px;
  font-size: 12px;
  line-height: 1.55;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.full-width {
  width: 100%;
}

.field-group.is-missing label {
  color: var(--amber);
}

.field-group.is-missing input,
.field-group.is-missing select {
  border-color: #d69832;
  background: #fffdf8;
}

.form-actions {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.form-error {
  min-height: 20px;
  margin-bottom: 0;
  color: var(--red);
  font-size: 13px;
}

.primary-button {
  min-width: 128px;
  padding: 10px 18px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 8px 18px rgb(23 105 224 / 18%);
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-dark);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.badge,
.trust-note,
.source-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 780;
}

.badge {
  min-height: 28px;
  padding: 5px 9px;
  color: #0d5b40;
  background: var(--green-soft);
}

.badge-neutral {
  color: #476074;
  background: #edf2f6;
}

.live-status {
  min-height: 20px;
  margin-bottom: 13px;
  font-size: 12px;
}

.answer-card {
  padding: 20px;
  background: #f8fbfe;
  border: 1px solid #dce8f2;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
}

.answer-card h3 {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-text {
  min-height: 126px;
  margin-bottom: 17px;
  color: #1d3549;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.next-action {
  margin-bottom: 0;
  padding-top: 13px;
  color: #526a7d;
  border-top: 1px solid #dce8f2;
  font-size: 13px;
  line-height: 1.6;
}

.answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.answer-action {
  padding: 8px 12px;
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid #aec7e2;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 740;
}

.answer-action:hover {
  background: var(--blue-soft);
  border-color: #83afe4;
}

.feedback-region {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  margin-top: 17px;
  padding: 15px 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.feedback-region[hidden],
.processing-details[hidden] {
  display: none;
}

.feedback-region h3,
.feedback-region p {
  margin-bottom: 0;
}

.feedback-region p {
  margin-top: 3px;
  font-size: 12px;
}

.feedback-actions {
  display: flex;
  gap: 8px;
}

.feedback-button {
  padding: 8px 12px;
  color: #345069;
  background: #fff;
  border: 1px solid var(--line-strong);
}

.feedback-button:hover:not(:disabled),
.feedback-button.is-selected {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #91b9eb;
}

.feedback-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--green);
  font-size: 12px;
}

.sources-section {
  margin-top: 21px;
}

.subsection-heading {
  align-items: center;
  margin-bottom: 10px;
}

.subsection-heading h3 {
  margin-bottom: 0;
}

.trust-note {
  padding: 4px 8px;
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  min-width: 0;
  padding: 10px 11px;
  color: #344f65;
  background: var(--surface-soft);
  border-radius: 9px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.source-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-excerpt {
  flex-basis: 100%;
  color: var(--blue-dark);
}

.source-excerpt p {
  margin: 8px 0 0;
  line-height: 1.65;
  color: #344f65;
  white-space: pre-wrap;
}

.source-item a {
  min-width: 0;
  color: var(--blue-dark);
  font-weight: 680;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.source-category {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: #526a7d;
  background: #e9eff4;
}

.empty-item {
  color: #7a8792 !important;
  font-weight: 400 !important;
}

.processing-details {
  margin-top: 17px;
}

.result-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 17px;
}

.result-metadata div {
  min-width: 0;
  padding: 10px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.result-metadata dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.result-metadata dd {
  margin: 5px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

body[data-state="needs_information"] .answer-card {
  background: #fffbf1;
  border-color: #efdbaf;
  border-left-color: var(--amber);
}

body[data-state="refused"] .answer-card,
body[data-state="human_handoff"] .answer-card,
body[data-state="error"] .answer-card {
  background: var(--red-soft);
  border-color: #efc9c4;
  border-left-color: var(--red);
}

body[data-state="loading"] .answer-card {
  opacity: 0.72;
}

body[data-state="idle"] .answer-card,
body[data-state="idle"] .sources-section {
  display: none;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 20px 0 34px;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 860px) {
  .site-header,
  .support-shell,
  footer {
    width: min(100% - 24px, 680px);
  }

  .site-header {
    align-items: flex-start;
    padding-top: 22px;
  }

  .support-shell {
    grid-template-columns: 1fr;
  }

  .question-panel {
    position: static;
  }
}

@media (max-width: 540px) {
  .site-header {
    display: grid;
    gap: 16px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 21px;
  }

  .secondary-button,
  .primary-button {
    width: 100%;
  }

  .panel {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .section-heading,
  .result-heading {
    display: grid;
  }

  .badges {
    justify-content: flex-start;
  }

  .thread-label {
    white-space: normal;
  }

  .environment-grid,
  .result-metadata {
    grid-template-columns: 1fr;
  }

  .summary-hint {
    display: none;
  }

  .form-actions {
    display: grid;
  }

  .feedback-region {
    grid-template-columns: 1fr;
  }

  .feedback-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .answer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .feedback-status {
    grid-column: 1;
  }

  .source-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Right-side assistant shell. The existing component styles above remain the
   source of truth for form controls, answers, citations and diagnostics. */
.visually-hidden {
  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;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f4f7fb;
}

.host-surface {
  min-height: 100vh;
  color: #24364a;
  background:
    linear-gradient(135deg, rgb(232 241 255 / 78%), rgb(250 252 255 / 92%) 48%, #fff),
    #f4f7fb;
}

.host-header {
  display: flex;
  min-height: 68px;
  padding: 0 36px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgb(255 255 255 / 88%);
  border-bottom: 1px solid #e3eaf2;
}

.host-brand,
.host-nav {
  display: flex;
  align-items: center;
}

.host-brand {
  gap: 11px;
  font-size: 14px;
  font-weight: 820;
}

.host-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #3188f5, #1155bf);
  border-radius: 10px;
  font-size: 17px;
  font-weight: 850;
}

.host-nav {
  gap: 28px;
  color: #718096;
  font-size: 13px;
}

.host-hero,
.host-cards {
  width: min(1040px, calc(100% - 64px));
  margin-inline: auto;
}

.host-hero {
  padding: 76px 0 48px;
}

.host-hero p {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.host-hero h2 {
  max-width: 650px;
  margin-bottom: 18px;
  font-size: clamp(34px, 6vw, 58px);
}

.host-hero > span {
  display: block;
  max-width: 690px;
  color: #627187;
  line-height: 1.8;
}

.host-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.host-cards article {
  display: grid;
  min-height: 150px;
  padding: 22px;
  align-content: start;
  gap: 10px;
  background: rgb(255 255 255 / 76%);
  border: 1px solid #e0e8f1;
  border-radius: 16px;
}

.host-cards span {
  color: #748297;
  font-size: 13px;
  line-height: 1.65;
}

.assistant-drawer {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(520px, calc(100vw - 28px));
  min-width: min(430px, 100vw);
  flex-direction: column;
  color: var(--ink);
  background: #fff;
  border-left: 1px solid #dce5ed;
  box-shadow: -20px 0 58px rgb(28 55 88 / 18%);
  transform: translateX(0);
  transition: transform 220ms ease, visibility 220ms ease, box-shadow 220ms ease;
}

body[data-drawer-open="false"] .assistant-drawer {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  transform: translateX(calc(100% + 28px));
}

.drawer-header {
  display: flex;
  min-height: 72px;
  padding: 0 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.drawer-brand,
.drawer-tools {
  display: flex;
  align-items: center;
}

.drawer-brand {
  min-width: 0;
  gap: 11px;
}

.drawer-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 19px;
}

.drawer-brand .eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

.drawer-brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.drawer-tools {
  gap: 4px;
}

.drawer-header .secondary-button {
  width: auto;
  min-height: 38px;
  padding: 7px 11px;
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  color: #43566b;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.drawer-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.drawer-main {
  min-height: 0;
  padding: 22px 22px 30px;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.assistant-intro {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.intro-copy {
  margin-bottom: 13px;
  color: #566a7f;
  font-size: 13px;
  line-height: 1.7;
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.capability-chip {
  display: inline-flex;
  min-height: 28px;
  padding: 6px 10px;
  align-items: center;
  color: #607286;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
}

.capability-chip.is-primary {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.assistant-intro .thread-label {
  margin-top: 12px;
  white-space: normal;
}

.drawer-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-section:last-child {
  border-bottom: 0;
}

.question-panel {
  position: static;
}

.compact-heading {
  margin-bottom: 14px;
}

.compact-heading h2,
.result-heading h2 {
  font-size: 19px;
}

.quick-question-region {
  margin-bottom: 16px;
}

.quick-questions {
  display: grid;
  gap: 9px;
}

.quick-question {
  display: flex;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #263b51;
  background: #fff;
  border-color: #dbe4ed;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.quick-question span:last-child {
  color: #8090a2;
  font-size: 21px;
  font-weight: 500;
}

.history-panel {
  margin: 0 0 12px;
}

.optional-details,
.processing-details {
  margin-top: 12px;
}

.environment-grid {
  grid-template-columns: 1fr 1fr;
}

.result-panel {
  scroll-margin-top: 18px;
}

body[data-state="idle"] .result-panel {
  display: none;
}

.result-heading {
  margin-bottom: 12px;
}

.live-status {
  line-height: 1.5;
}

.answer-card {
  padding: 17px;
}

.answer-text {
  min-height: 0;
  line-height: 1.72;
}

.feedback-region {
  grid-template-columns: 1fr;
}

.feedback-status {
  grid-column: 1;
}

.sources-section {
  margin-top: 18px;
}

.result-metadata {
  grid-template-columns: 1fr;
}

.drawer-composer {
  padding: 14px 16px 12px;
  flex: 0 0 auto;
  background: rgb(255 255 255 / 98%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 32px rgb(31 65 96 / 6%);
}

.drawer-composer textarea {
  min-height: 74px;
  max-height: 150px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.55;
}

.drawer-composer .input-help {
  margin-top: 6px;
  font-size: 11px;
}

.composer-actions {
  display: flex;
  margin-top: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sensitive-information-note {
  margin: 0;
  color: #7a6b56;
  font-size: 10px;
  line-height: 1.5;
}

.drawer-composer .primary-button {
  min-width: 106px;
  min-height: 44px;
  flex: 0 0 auto;
}

.drawer-composer .form-error {
  min-height: 0;
  margin-top: 7px;
}

.drawer-composer .form-error:empty {
  display: none;
}

.local-history-note {
  margin: 7px 0 0;
  color: #8794a3;
  font-size: 10px;
  line-height: 1.4;
}

.drawer-open-button {
  position: fixed;
  z-index: 19;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  min-height: 48px;
  padding: 11px 16px;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgb(23 105 224 / 28%);
  font-weight: 780;
}

.drawer-open-button:hover {
  background: var(--blue-dark);
}

.drawer-open-button[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .host-header {
    padding-inline: 18px;
  }

  .host-nav {
    display: none;
  }

  .host-hero,
  .host-cards {
    width: min(100% - 36px, 520px);
  }

  .host-hero {
    padding-top: 46px;
  }

  .host-cards {
    grid-template-columns: 1fr;
  }

  .assistant-drawer {
    width: 100vw;
    min-width: 0;
    border-left: 0;
  }

  .drawer-header {
    min-height: 66px;
    padding-inline: 14px;
  }

  .drawer-main {
    padding: 18px 16px 24px;
    scrollbar-gutter: auto;
  }

  .drawer-tools {
    gap: 1px;
  }

  .drawer-header .secondary-button {
    min-height: 38px;
    padding-inline: 9px;
  }

  .drawer-composer {
    padding: 12px;
  }

  .composer-actions {
    align-items: flex-end;
  }

  .environment-grid {
    grid-template-columns: 1fr;
  }

  .result-heading {
    display: grid;
  }

  .badges {
    justify-content: flex-start;
  }

  .drawer-open-button {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 430px) {
  .drawer-brand .eyebrow {
    display: none;
  }

  .drawer-brand h1 {
    font-size: 16px;
  }

  .drawer-brand .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .drawer-header .secondary-button {
    font-size: 11px;
  }

  .composer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .answer-actions,
  .feedback-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.drawer-header .secondary-button {
  min-height: 44px;
}

/* Product support visual refresh. Keep the existing drawer and form contracts. */
:root {
  --ink: #182c39;
  --muted: #586d7a;
  --line: #e0e8e9;
  --line-strong: #bfced2;
  --surface-soft: #f5f8f8;
  --canvas: #f2f6f6;
  --blue: #14766f;
  --blue-dark: #0b5b55;
  --blue-soft: #e8f4f1;
}
body { background: var(--canvas); font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif; }
.host-surface { padding-right: min(580px, 48vw); background: #f2f6f6; }
body[data-drawer-open="false"] .host-surface { padding-right: 0; }
.host-header { padding: 0 40px; min-height: 88px; background: transparent; border-bottom: 0; }
.host-brand { color: var(--ink); font-weight: 650; }
.host-brand-mark, .drawer-brand .brand-mark { background: #183d48; box-shadow: none; border-radius: 12px; }
.host-nav { display: none; }
.host-hero, .host-cards { width: calc(100% - 96px); max-width: 660px; }
.host-hero { padding: clamp(40px, 10vh, 110px) 0 44px; }
.host-hero .host-overline { color: #42716f; font-size: 13px; letter-spacing: 0; font-weight: 600; }
.host-hero h2 { margin: 22px 0; color: #183d48; font-size: clamp(32px, 3.4vw, 52px); font-weight: 650; line-height: 1.4; letter-spacing: -.04em; }
.host-hero > span { max-width: 370px; font-size: 14px; color: var(--muted); line-height: 1.9; }
.host-cards { grid-template-columns: 1fr; gap: 0; }
.host-cards article { min-height: auto; padding: 20px 0; border: 0; border-top: 1px solid #d7e2e2; border-radius: 0; background: transparent; gap: 6px; }
.host-cards strong { font-size: 14px; font-weight: 600; }
.host-cards span { font-size: 12px; color: var(--muted); }
.assistant-drawer { width: min(580px, 48vw); min-width: 430px; height: 100dvh; border-left: 1px solid var(--line); box-shadow: -12px 0 48px rgb(24 61 72 / 4%); }
.drawer-header { min-height: 88px; padding: 0 28px; }
.drawer-brand .brand-mark { width: 42px; height: 42px; font-size: 20px; }
.drawer-brand .eyebrow { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-bottom: 4px; }
.drawer-brand h1 { font-weight: 650; font-size: 17px; }
.drawer-tools { gap: 8px; }
.drawer-header .secondary-button { border: 1px solid var(--line); border-radius: 8px; color: #395661; font-weight: 500; padding-inline: 14px; }
.icon-button { min-height: 44px; width: 44px; }
.drawer-main { padding: 32px 28px 24px; background: #fff; }
.assistant-intro { border: 0; padding-bottom: 12px; }
.welcome-title { font-size: clamp(21px, 2vw, 25px); font-weight: 600; letter-spacing: -.03em; margin-bottom: 12px; line-height: 1.5; }
.intro-copy { font-size: 13px; line-height: 1.9; color: var(--muted); margin-bottom: 18px; }
.capability-row { gap: 8px; }
.capability-chip { padding: 5px 9px; min-height: 26px; font-weight: 500; border-radius: 5px; background: #f3f6f6; color: #526873; }
.capability-chip.is-primary { color: #0b5b55; }
.assistant-intro .thread-label:empty { display: none; }
.drawer-section { padding-top: 20px; border: 0; }
.compact-heading { margin-bottom: 14px; }
.compact-heading h2 { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.quick-questions { grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-question { min-height: 76px; align-items: center; padding: 14px; gap: 8px; font-size: 13px; font-weight: 500; border: 1px solid #dde7e7; border-radius: 10px; background: #f9fbfb; line-height: 1.7; }
.quick-question:hover:not(:disabled) { background: #edf7f4; border-color: #84b8ad; color: var(--blue-dark); }
.quick-question span:last-child { color: #59847b; font-size: 20px; }
.history-panel, .optional-details { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; margin-bottom: 0; margin-top: 4px; }
.history-panel summary, .optional-details summary { min-height: 48px; padding: 13px 0; color: #526873; font-size: 12px; font-weight: 500; }
.history-policy { color: var(--muted); font-size: 10px; }
.optional-details-body, .history-body { padding: 0 0 16px; }
.result-heading h2 { font-size: 17px; font-weight: 600; }
.badge { font-weight: 500; }
.answer-card { padding: 20px; background: #f4f9f7; border: 1px solid #dcebe6; border-left: 3px solid var(--blue); box-shadow: none; }
.answer-card h3 { color: #37665f; letter-spacing: 0; font-weight: 600; }
.answer-text { color: var(--ink); font-size: 14px; line-height: 1.9; }
.answer-action { font-weight: 500; border-color: #bed6cf; }
.drawer-composer { padding: 18px 24px 16px; box-shadow: 0 -8px 24px rgb(24 61 72 / 3%); background: #fcfdfd; }
.drawer-composer textarea { border: 1px solid #bfd1d0; border-radius: 12px; background: #fff; min-height: 88px; padding: 14px; font-size: 13px; }
.drawer-composer textarea:focus { border-color: var(--blue); outline-color: #8ac5b6; }
.drawer-composer .primary-button { min-width: 104px; border-radius: 8px; box-shadow: none; font-weight: 600; }
.sensitive-information-note { color: #61737a; }
.local-history-note { color: #61737a; }
.drawer-open-button { box-shadow: 0 8px 24px rgb(20 118 111 / 16%); }
@media (min-width: 1600px) { .host-surface { padding-right: 640px; } .assistant-drawer { width: 640px; } .drawer-main { padding: 40px; } .drawer-composer { padding-inline: 40px; } }
@media (max-width: 1000px) and (min-width: 721px) { .host-surface { padding-right: 430px; } .assistant-drawer { width: 430px; } .host-hero, .host-cards { width: calc(100% - 48px); } .host-header { padding-inline: 24px; } }
@media (max-width: 720px) {
  .host-surface { padding-right: 0; }
  .assistant-drawer { width: 100%; min-width: 0; }
  .drawer-header { padding-inline: 18px; min-height: 76px; }
  .drawer-main { padding: 26px 20px 20px; }
  .drawer-composer { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
  .drawer-brand .eyebrow { display: block; font-size: 10px; }
  .drawer-header .secondary-button { min-height: 44px; font-size: 12px; padding-inline: 10px; }
  .quick-question { min-height: 72px; padding: 10px 12px; }
  .composer-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .drawer-composer .primary-button { width: auto; min-width: 96px; }
  .sensitive-information-note { font-size: 10px; }
}
@media (max-width: 360px) {
  .drawer-main { padding-inline: 16px; }
  .drawer-header { padding-inline: 12px; gap: 8px; }
  .drawer-brand { gap: 8px; }
  .drawer-tools { gap: 0; }
  .history-panel summary { flex-wrap: wrap; gap: 6px; }
}

.assistant-embedded .host-surface {
  display: none;
}

.assistant-embedded .assistant-drawer {
  width: 100%;
  min-width: 0;
  border: 0;
  box-shadow: none;
}
