@font-face {
  font-family: "Chengwu Sans";
  src: url("/assets/Poppins-Regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Chengwu Sans";
  src: url("/assets/Poppins-SemiBold.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}

:root {
  color: #eef6ff;
  background: var(--site-background);
  font-family: "Chengwu Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 48% -10%, var(--site-glow-blue), transparent 36rem),
    var(--site-background);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(77, 130, 188, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 130, 188, 0.1) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

button,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid #5dd5c8;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workbench-header {
  min-height: 82px;
  padding: 12px clamp(20px, 3.2vw, 52px);
  border-bottom: 1px solid rgba(119, 159, 205, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(3, 10, 24, 0.86);
  backdrop-filter: blur(18px);
}

.workbench-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.workbench-brand img {
  display: block;
  width: auto;
  height: clamp(45px, calc(1.56252vw + 30px), 60px);
}

.workbench-brand > span {
  display: grid;
  gap: 3px;
}

.workbench-brand strong {
  font-size: 14px;
  font-weight: 400;
}

.workbench-brand small {
  color: rgba(184, 205, 226, 0.48);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.workbench-header__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(210, 228, 242, 0.64);
  font-size: 11px;
}

.prototype-badge {
  padding: 7px 10px;
  border: 1px solid rgba(78, 211, 199, 0.34);
  border-radius: 999px;
  color: #64d2c7;
  background: rgba(31, 132, 130, 0.1);
  letter-spacing: 0.08em;
}

.workbench-layout {
  width: min(1600px, calc(100vw - 40px));
  min-height: calc(100vh - 112px);
  margin: 20px auto 30px;
  display: grid;
  grid-template-columns: 280px minmax(480px, 1fr) 260px;
  gap: 14px;
}

.agent-sidebar,
.conversation-panel,
.task-context {
  min-width: 0;
  border: 1px solid rgba(109, 154, 201, 0.22);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(8, 26, 48, 0.9), rgba(3, 13, 30, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.agent-sidebar,
.task-context {
  padding: 24px 18px;
}

.sidebar-heading,
.task-context > header {
  padding: 0 8px 18px;
}

.sidebar-heading p,
.task-context header p,
.conversation-heading p {
  margin: 0 0 8px;
  color: #58cbc1;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.sidebar-heading h2,
.task-context h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 400;
}

.agent-list {
  display: grid;
  gap: 7px;
}

.agent-option {
  min-height: 68px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 11px;
  color: rgba(225, 238, 249, 0.66);
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.agent-option__icon {
  position: relative;
  width: 42px;
  aspect-ratio: 1;
  padding: 10px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0%, 97% 35%, 79% 92%, 21% 92%, 3% 35%);
  background: linear-gradient(145deg, rgba(83, 204, 222, 0.75), rgba(100, 92, 235, 0.78));
}

.agent-option__icon::before {
  position: absolute;
  inset: 2px;
  content: "";
  clip-path: inherit;
  background: #071a34;
}

.agent-option__icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.agent-option > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agent-option strong {
  font-size: 12px;
  font-weight: 400;
}

.agent-option small {
  overflow: hidden;
  color: rgba(185, 207, 225, 0.4);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-option.is-active {
  border-color: rgba(82, 206, 197, 0.38);
  color: #fff;
  background: linear-gradient(100deg, rgba(25, 125, 132, 0.2), rgba(44, 78, 164, 0.18));
}

.sidebar-note {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(111, 160, 201, 0.18);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  color: rgba(195, 216, 232, 0.45);
  background: rgba(1, 10, 23, 0.36);
}

.sidebar-note > span {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(89, 205, 197, 0.44);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #55c8bf;
  font-size: 10px;
}

.sidebar-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.65;
}

.conversation-panel {
  min-height: 700px;
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto auto;
  overflow: hidden;
}

.conversation-heading {
  min-height: 92px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(110, 157, 200, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.conversation-heading h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
}

.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(201, 228, 227, 0.62);
  font-size: 10px;
  white-space: nowrap;
}

.agent-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ad2c5;
  box-shadow: 0 0 12px rgba(90, 210, 197, 0.78);
}

.conversation {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.system-note {
  align-self: center;
  max-width: 90%;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(189, 210, 227, 0.43);
  background: rgba(106, 145, 183, 0.08);
  font-size: 9px;
  text-align: center;
}

.system-note span {
  margin-right: 6px;
  color: rgba(92, 204, 195, 0.72);
}

.message {
  max-width: min(680px, 88%);
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 11px;
}

.message--user {
  align-self: flex-end;
  grid-template-columns: 1fr 34px;
}

.message--user .message__avatar {
  grid-column: 2;
  grid-row: 1;
}

.message--user > div {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(135deg, rgba(28, 111, 143, 0.38), rgba(60, 76, 172, 0.34));
}

.message__avatar {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(83, 205, 195, 0.42);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #6dd8ce;
  background: rgba(12, 47, 67, 0.8);
  font-size: 9px;
}

.message > div {
  padding: 15px 17px;
  border: 1px solid rgba(112, 160, 204, 0.18);
  border-radius: 5px 15px 15px;
  background: rgba(8, 25, 48, 0.78);
}

.message strong {
  color: rgba(107, 215, 205, 0.8);
  font-size: 10px;
  font-weight: 400;
}

.message p {
  margin: 8px 0 0;
  color: rgba(225, 237, 247, 0.72);
  font-size: 13px;
  line-height: 1.8;
}

.suggestion-list {
  padding: 0 26px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-list button {
  padding: 8px 12px;
  border: 1px solid rgba(97, 173, 203, 0.2);
  border-radius: 999px;
  color: rgba(204, 225, 239, 0.56);
  background: rgba(6, 23, 43, 0.72);
  font-size: 10px;
  cursor: pointer;
}

.task-composer {
  margin: 0 20px 20px;
  border: 1px solid rgba(90, 192, 190, 0.28);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(2, 13, 29, 0.74);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.task-composer textarea {
  width: 100%;
  min-height: 92px;
  padding: 16px 17px;
  border: 0;
  resize: vertical;
  color: #eef7ff;
  background: transparent;
  line-height: 1.7;
}

.task-composer textarea::placeholder {
  color: rgba(183, 207, 225, 0.34);
}

.composer-footer {
  padding: 9px 10px 10px 16px;
  border-top: 1px solid rgba(109, 158, 198, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.composer-footer > span {
  color: rgba(184, 207, 225, 0.35);
  font-size: 9px;
}

.composer-footer > div {
  display: flex;
  gap: 8px;
}

.composer-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(103, 183, 201, 0.22);
  border-radius: 9px;
  color: rgba(215, 235, 245, 0.68);
  background: rgba(8, 31, 52, 0.76);
  font-size: 10px;
  cursor: pointer;
}

.composer-button--send {
  border-color: rgba(79, 205, 193, 0.42);
  color: #fff;
  background: linear-gradient(115deg, #168b86, #355fc8);
}

.task-context ol {
  margin: 4px 0 0;
  padding: 0 8px;
  list-style: none;
}

.task-context li {
  position: relative;
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  color: rgba(196, 218, 233, 0.42);
}

.task-context li:not(:last-child)::after {
  position: absolute;
  top: 31px;
  bottom: 4px;
  left: 15px;
  width: 1px;
  content: "";
  background: rgba(101, 164, 193, 0.18);
}

.task-context li > span {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(104, 164, 193, 0.24);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8px;
}

.task-context li > div {
  display: grid;
  align-content: start;
  gap: 5px;
}

.task-context li strong {
  font-size: 12px;
  font-weight: 400;
}

.task-context li small {
  font-size: 9px;
}

.task-context li.is-active {
  color: rgba(226, 241, 247, 0.82);
}

.task-context li.is-active > span {
  border-color: rgba(86, 211, 201, 0.52);
  color: #6ad8ce;
  box-shadow: 0 0 16px rgba(65, 186, 180, 0.14);
}

.integration-card {
  margin: 6px 8px 0;
  padding: 16px;
  border: 1px solid rgba(106, 158, 198, 0.2);
  border-radius: 13px;
  background: rgba(4, 18, 37, 0.62);
}

.integration-card span {
  color: rgba(92, 203, 194, 0.7);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.integration-card p {
  margin: 10px 0 0;
  color: rgba(194, 216, 232, 0.44);
  font-size: 10px;
  line-height: 1.8;
}

.return-link {
  margin: 20px 8px 0;
  display: inline-block;
  color: rgba(101, 207, 199, 0.72);
  font-size: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .agent-option:hover,
  .suggestion-list button:hover,
  .composer-button:hover {
    border-color: rgba(84, 207, 197, 0.42);
    color: #fff;
  }

  .agent-option:hover {
    transform: translateX(3px);
  }
}

@media (max-width: 1180px) {
  .workbench-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .task-context {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 180px 1fr 240px;
    align-items: center;
    gap: 20px;
  }

  .task-context ol {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .task-context li {
    min-height: 0;
  }

  .task-context li::after {
    display: none;
  }
}

@media (max-width: 820px) {
  .workbench-header__meta .prototype-badge {
    display: none;
  }

  .workbench-layout {
    width: min(100% - 24px, 760px);
    grid-template-columns: 1fr;
  }

  .agent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-option:last-child {
    grid-column: 1 / -1;
  }

  .conversation-panel {
    min-height: 650px;
  }

  .task-context {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workbench-header {
    min-height: 72px;
    padding-inline: 14px;
  }

  .workbench-brand img {
    width: auto;
    height: clamp(38px, 9.66vw, 52px);
  }

  .workbench-brand > span,
  .workbench-header__meta {
    display: none;
  }

  .agent-sidebar,
  .task-context {
    padding: 20px 14px;
  }

  .agent-list {
    grid-template-columns: 1fr;
  }

  .agent-option:last-child {
    grid-column: auto;
  }

  .conversation-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .conversation,
  .suggestion-list {
    padding-right: 16px;
    padding-left: 16px;
  }

  .message {
    max-width: 96%;
  }

  .task-composer {
    margin-inline: 10px;
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .composer-footer > div {
    justify-content: flex-end;
  }
}

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