#ha2-launch,
#hottt-agent-v2,
#hottt-agent-v2 * {
  box-sizing: border-box;
}

#ha2-launch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 13000;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 42px;

  border: 1px solid #111318;
  border-radius: 999px;

  padding: 7px 14px 7px 7px;

  background: #111318;
  color: #fff;

  font:
    800 11px/1
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  letter-spacing: .08em;

  cursor: pointer;
}

#ha2-launch > span {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  border-radius: 50%;

  background: #0b42d8;
  color: #fff;
}

#hottt-agent-v2 {
  --ha2-ink: #111318;
  --ha2-muted: #72757e;
  --ha2-line: #dcdde1;
  --ha2-soft: #f5f5f3;
  --ha2-blue: #0b42d8;
  --ha2-pink: #ff2f93;
  --ha2-green: #31c98b;
  --ha2-orange: #ff9a2f;

  position: fixed;
  inset: 12px;
  z-index: 12990;

  display: none;
  grid-template-rows: auto auto 1fr;

  overflow: hidden;

  border: 1px solid var(--ha2-ink);
  border-radius: 18px;

  background: #fff;
  color: var(--ha2-ink);

  box-shadow:
    0 22px 80px rgba(0,0,0,.20);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  color-scheme: light;
}

#hottt-agent-v2.open {
  display: grid;
}

.ha2-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;

  min-height: 72px;

  padding: 10px 18px;

  border-bottom: 1px solid var(--ha2-line);

  background: #fff;
}

.ha2-brand {
  display: grid;
  gap: 1px;
}

.ha2-brand small,
.ha2-side-section > small,
.ha2-next > small,
.ha2-welcome > small {
  color: var(--ha2-blue);

  font-size: 9px;
  font-weight: 900;

  letter-spacing: .12em;
}

.ha2-brand strong {
  font-size: 20px;
  line-height: 1.05;
}

.ha2-brand > span {
  color: var(--ha2-muted);

  font-size: 11px;
}

.ha2-live-status {
  display: flex;
  align-items: center;
  gap: 7px;

  color: var(--ha2-muted);

  font-size: 10px;
  font-weight: 700;
}

.ha2-live-status .dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--ha2-green);
}

#ha2-close {
  width: 38px;
  height: 38px;

  border: 1px solid var(--ha2-line);
  border-radius: 50%;

  background: #fff;
  color: var(--ha2-ink);

  font-size: 21px;

  cursor: pointer;
}

.ha2-contextbar {
  display: grid;
  grid-template-columns:
    1.25fr
    .8fr
    1fr
    .75fr
    .75fr
    .9fr;
  gap: 0;

  border-bottom: 1px solid var(--ha2-line);

  background: #fff;
}

.ha2-contextbar label {
  display: grid;
  gap: 5px;

  min-width: 0;

  padding: 9px 12px;

  border-right: 1px solid var(--ha2-line);

  color: var(--ha2-muted);

  font-size: 8px;
  font-weight: 900;

  letter-spacing: .1em;
}

.ha2-contextbar label:last-child {
  border-right: 0;
}

.ha2-contextbar input,
.ha2-contextbar select {
  width: 100%;
  min-width: 0;

  border: 0;

  padding: 0;

  background: transparent;
  color: var(--ha2-ink);

  font: 700 11px/1.3 inherit;

  outline: 0;
}

.ha2-body {
  display: grid;
  grid-template-columns: 280px 1fr;

  min-height: 0;
}

.ha2-sidebar {
  overflow-y: auto;

  border-right: 1px solid var(--ha2-line);

  background: #fafaf8;
}

.ha2-side-section {
  position: relative;

  display: grid;
  gap: 9px;

  padding: 16px;

  border-bottom: 1px solid var(--ha2-line);
}

.ha2-side-section p {
  margin: 0;

  color: var(--ha2-muted);

  font-size: 10px;
  line-height: 1.45;
}

.ha2-selected-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  width: 100%;

  border: 1px solid var(--ha2-ink);
  border-radius: 10px;

  padding: 10px;

  background: #fff;
  color: var(--ha2-ink);

  text-align: left;

  cursor: pointer;
}

.ha2-selected-model > span {
  display: grid;
  gap: 2px;

  min-width: 0;
}

.ha2-selected-model strong {
  overflow: hidden;

  font-size: 11px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.ha2-selected-model span span {
  color: var(--ha2-muted);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: .05em;
}

.ha2-model-popover {
  position: absolute;
  z-index: 10;

  top: 82px;
  left: 12px;

  width: min(
    560px,
    calc(100vw - 60px)
  );

  max-height: 64vh;

  display: none;

  overflow: hidden;

  border: 1px solid var(--ha2-ink);
  border-radius: 14px;

  background: #fff;

  box-shadow:
    0 24px 60px rgba(0,0,0,.18);
}

.ha2-model-popover.open {
  display: grid;
  grid-template-rows: auto 1fr;
}

.ha2-model-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;

  padding: 10px;

  border-bottom: 1px solid var(--ha2-line);
}

.ha2-model-tools input {
  width: 100%;

  border: 1px solid var(--ha2-line);
  border-radius: 8px;

  padding: 10px;

  background: #fff;
  color: var(--ha2-ink);

  outline: 0;
}

.ha2-inline-check {
  display: flex;
  align-items: center;
  gap: 5px;

  font-size: 9px;
  font-weight: 800;
}

.ha2-model-list {
  overflow: auto;
}

.ha2-model-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;

  width: 100%;

  border: 0;
  border-bottom: 1px solid #ececef;

  padding: 10px 12px;

  background: #fff;
  color: var(--ha2-ink);

  text-align: left;

  cursor: pointer;
}

.ha2-model-option:hover,
.ha2-model-option.selected {
  background: #f0f4ff;
}

.ha2-model-option-copy,
.ha2-model-option > div {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.ha2-model-option strong {
  overflow: hidden;

  font-size: 11px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.ha2-model-option small {
  overflow: hidden;

  color: var(--ha2-muted);

  font-size: 9px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.ha2-badge {
  display: inline-flex;
  align-items: center;

  margin: 1px 2px 1px 0;

  min-height: 19px;

  border: 1px solid #bfc1c8;
  border-radius: 999px;

  padding: 2px 6px;

  background: #fff;
  color: #4f525b;

  font-size: 7px;
  font-weight: 900;

  letter-spacing: .055em;
}

.ha2-badge.free {
  border-color: #2ca477;

  background: #e8f8f1;
  color: #096344;
}

.ha2-badge.paid {
  border-color: #dd8a26;

  background: #fff6e9;
  color: #8a4e07;
}

.ha2-badge.tools,
.ha2-badge.accent {
  border-color: #7895ef;

  background: #edf2ff;
  color: #0b42d8;
}

.ha2-switch {
  display: grid;
  grid-template-columns: auto 28px 1fr;
  align-items: center;
  gap: 7px;

  color: var(--ha2-ink);

  font-size: 10px;
  font-weight: 750;
}

.ha2-switch input {
  position: absolute;

  opacity: 0;
  pointer-events: none;
}

.ha2-switch span {
  position: relative;

  width: 28px;
  height: 16px;

  border: 1px solid #aeb0b6;
  border-radius: 99px;

  background: #ddd;
}

.ha2-switch span::after {
  content: "";

  position: absolute;

  top: 2px;
  left: 2px;

  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: #fff;

  transition: transform .15s ease;
}

.ha2-switch input:checked + span {
  border-color: var(--ha2-blue);

  background: var(--ha2-blue);
}

.ha2-switch input:checked + span::after {
  transform: translateX(12px);
}

.ha2-secondary,
.ha2-quick {
  width: 100%;

  border: 1px solid var(--ha2-line);
  border-radius: 8px;

  padding: 9px 10px;

  background: #fff;
  color: var(--ha2-ink);

  font-size: 9px;
  font-weight: 800;

  text-align: left;

  cursor: pointer;
}

.ha2-quick:hover,
.ha2-secondary:hover {
  border-color: var(--ha2-ink);
}

.ha2-imported {
  display: grid;
  gap: 6px;
}

.ha2-imported article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;

  padding: 7px 0;
}

.ha2-imported article > div {
  display: grid;
  gap: 2px;
}

.ha2-imported strong {
  font-size: 9px;
}

.ha2-imported small {
  color: var(--ha2-muted);

  font-size: 8px;
}

.ha2-main {
  display: grid;
  grid-template-rows: 1fr auto auto;

  min-width: 0;
  min-height: 0;

  background: #fff;
}

.ha2-thread {
  overflow-y: auto;

  padding:
    clamp(18px, 3vw, 42px)
    clamp(16px, 5vw, 76px);
}

.ha2-welcome {
  max-width: 780px;

  margin: 8vh auto 0;
}

.ha2-welcome h2 {
  max-width: 700px;

  margin: 9px 0 12px;

  font-size:
    clamp(28px, 4vw, 50px);

  line-height: .98;
  letter-spacing: -.045em;
}

.ha2-welcome p {
  max-width: 690px;

  margin: 0;

  color: #60636b;

  font-size: 13px;
  line-height: 1.6;
}

.ha2-message {
  max-width: 900px;

  margin:
    0 auto 18px;
}

.ha2-message.user {
  display: grid;
  gap: 6px;

  padding: 14px 16px;

  border-left: 4px solid var(--ha2-blue);

  background: #f4f6ff;
}

.ha2-message.user small {
  color: var(--ha2-blue);

  font-size: 8px;
  font-weight: 900;

  letter-spacing: .1em;
}

.ha2-message.user div {
  font-size: 13px;
  line-height: 1.45;
}

.ha2-message.assistant {
  padding: 20px 0 4px;
}

.ha2-answer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 16px;

  padding-bottom: 10px;

  border-bottom: 1px solid var(--ha2-line);
}

.ha2-answer-head > div:first-child {
  display: grid;
  gap: 2px;
}

.ha2-answer-head small {
  color: var(--ha2-blue);

  font-size: 8px;
  font-weight: 900;

  letter-spacing: .1em;
}

.ha2-answer-head strong {
  font-size: 11px;
}

.ha2-answer {
  font-size: 14px;
  line-height: 1.62;
}

.ha2-result-section {
  margin-top: 18px;

  padding: 12px 14px;

  border-left: 3px solid #111318;

  background: #fafaf8;
}

.ha2-result-section.verified {
  border-color: var(--ha2-green);
}

.ha2-result-section.calculated {
  border-color: var(--ha2-blue);
}

.ha2-result-section.hypothesis {
  border-color: var(--ha2-orange);
}

.ha2-result-section.recommendation {
  border-color: var(--ha2-pink);
}

.ha2-result-section.not-verified {
  border-color: #777;
}

.ha2-result-section h4 {
  margin: 0 0 7px;

  font-size: 10px;
  text-transform: uppercase;

  letter-spacing: .08em;
}

.ha2-result-section ul {
  margin: 0;

  padding-left: 17px;
}

.ha2-result-section li {
  margin: 4px 0;

  font-size: 11px;
  line-height: 1.5;
}

.ha2-data-block {
  margin-top: 20px;

  border: 1px solid var(--ha2-line);
}

.ha2-block-title {
  padding: 9px 11px;

  border-bottom: 1px solid var(--ha2-line);

  font-size: 10px;
  font-weight: 900;

  letter-spacing: .04em;
}

.ha2-table-scroll {
  overflow-x: auto;
}

.ha2-table-scroll table {
  width: 100%;

  border-collapse: collapse;

  font-size: 10px;
}

.ha2-table-scroll th,
.ha2-table-scroll td {
  padding: 8px 10px;

  border-right: 1px solid #ececef;
  border-bottom: 1px solid #ececef;

  text-align: left;
  white-space: nowrap;
}

.ha2-table-scroll th {
  background: #fafaf8;

  font-size: 8px;
  font-weight: 900;

  letter-spacing: .06em;
}

.ha2-chart {
  display: block;

  width: 100%;
  height: auto;

  padding: 10px;

  color: var(--ha2-blue);
}

.ha2-chart rect {
  fill: currentColor;
}

.ha2-chart line {
  stroke: #b8bac1;
}

.ha2-chart text {
  fill: #666;

  font-size: 9px;
}

.ha2-evidence {
  margin-top: 16px;

  border-top: 1px solid var(--ha2-line);

  padding-top: 10px;

  color: var(--ha2-muted);

  font-size: 9px;
}

.ha2-evidence summary {
  cursor: pointer;

  font-weight: 800;
}

.ha2-evidence article {
  display: grid;
  grid-template-columns:
    150px
    minmax(0, 1fr)
    auto;
  gap: 8px;

  margin-top: 7px;

  padding: 6px 0;

  border-bottom: 1px solid #eee;
}

.ha2-evidence code {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.ha2-next {
  margin-top: 20px;

  padding-top: 14px;

  border-top: 1px solid var(--ha2-line);
}

.ha2-suggestion-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 7px;

  margin-top: 8px;
}

.ha2-suggestion-grid button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  min-height: 43px;

  border: 1px solid var(--ha2-line);
  border-radius: 8px;

  padding: 8px 10px;

  background: #fff;
  color: var(--ha2-ink);

  font-size: 9px;
  font-weight: 800;

  text-align: left;

  cursor: pointer;
}

.ha2-suggestion-grid button:hover {
  border-color: var(--ha2-blue);

  color: var(--ha2-blue);
}

.ha2-thinking {
  display: none;

  margin: 0 24px;

  padding: 7px 12px;

  color: var(--ha2-muted);

  font-size: 9px;
  font-weight: 700;
}

.ha2-thinking.visible {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ha2-thinking span {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--ha2-pink);

  animation:
    ha2-pulse 1s infinite alternate;
}

@keyframes ha2-pulse {
  to {
    opacity: .2;
  }
}

.ha2-composer {
  margin:
    8px
    clamp(16px, 5vw, 76px)
    20px;

  border: 1px solid var(--ha2-ink);
  border-radius: 14px;

  background: #fff;

  box-shadow:
    0 7px 24px rgba(0,0,0,.06);
}

.ha2-composer textarea {
  width: 100%;
  min-height: 78px;
  max-height: 190px;

  border: 0;

  padding: 13px 14px 4px;

  resize: vertical;

  background: #fff;
  color: var(--ha2-ink);

  font:
    13px/1.45
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  outline: 0;
}

.ha2-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 8px 9px 9px;
}

#ha2-send {
  min-width: 78px;
  min-height: 36px;

  border: 0;
  border-radius: 9px;

  background: var(--ha2-blue);
  color: #fff;

  font-size: 10px;
  font-weight: 900;

  cursor: pointer;
}

#ha2-send:disabled {
  opacity: .55;
}

.ha2-notice,
.ha2-paid-confirm {
  max-width: 900px;

  margin: 0 auto 14px;

  padding: 12px;

  border: 1px solid var(--ha2-line);
  border-left: 4px solid var(--ha2-orange);

  background: #fffaf1;

  font-size: 10px;
  line-height: 1.45;
}

.ha2-notice.error {
  border-left-color: #c62b3e;

  background: #fff5f6;
}

.ha2-paid-confirm {
  display: grid;
  gap: 8px;
}

.ha2-paid-confirm > div {
  display: flex;
  gap: 7px;
}

.ha2-paid-confirm button {
  border: 1px solid var(--ha2-ink);
  border-radius: 7px;

  padding: 8px 10px;

  background: #fff;
  color: var(--ha2-ink);

  font-size: 9px;
  font-weight: 800;

  cursor: pointer;
}

@media (max-width: 900px) {
  #hottt-agent-v2 {
    inset: 0;

    border: 0;
    border-radius: 0;
  }

  .ha2-header {
    grid-template-columns:
      1fr auto;
  }

  .ha2-live-status {
    display: none;
  }

  .ha2-contextbar {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    max-height: 150px;

    overflow-y: auto;
  }

  .ha2-contextbar label {
    border-bottom:
      1px solid var(--ha2-line);
  }

  .ha2-body {
    grid-template-columns: 1fr;
  }

  .ha2-sidebar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 230px;

    max-height: 150px;

    overflow-x: auto;
    overflow-y: hidden;

    border-right: 0;
    border-bottom:
      1px solid var(--ha2-line);
  }

  .ha2-side-section {
    border-right:
      1px solid var(--ha2-line);
    border-bottom: 0;
  }

  .ha2-model-popover {
    position: fixed;

    top: 90px;
    left: 10px;
    right: 10px;

    width: auto;
  }

  .ha2-thread {
    padding: 18px 14px;
  }

  .ha2-welcome {
    margin-top: 2vh;
  }

  .ha2-welcome h2 {
    font-size: 30px;
  }

  .ha2-composer {
    margin: 6px 10px 10px;
  }

  .ha2-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .ha2-answer-head {
    display: grid;
  }
}
