@import url('../styles.css');
body {
  margin: 0;
  background: #0b1019;
  font-family: var(--font);
  color: #edf3fb;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.demo-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  min-height: 0;
  overflow-y: auto;
  padding: 30px 20px 20px;
  background: #0c121d;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  border-color: #222e41;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: #edf3fb;
  text-decoration: none;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.6px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #cceaff;
  color: #122130;
  font-size: 27px;
  font-weight: 700;
}
.brand-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.4px;
  font-weight: 400;
  color: #6d829e;
  margin-top: 3px;
}
.new-chat {
  margin: 32px 0 25px;
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid #d3d9cf;
  background: #111e2e;
  border-radius: 9px;
  padding: 12px 14px;
  color: #d9e6f5;
  text-align: left;
  font-size: 12px;
  border-color: #34455e;
}
.new-chat span {
  font-size: 21px;
  line-height: 15px;
}
.rail-label {
  font-size: 10px;
  color: #6e829c;
  letter-spacing: 1px;
  margin: 0 0 12px 8px;
}
.scenario {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8ca0bb;
  text-align: left;
  font-size: 12px;
  margin-bottom: 6px;
}
.scenario > span:first-child {
  font-size: 22px;
}
.scenario small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: #6b829e;
}
.scenario.selected {
  background: #1a2b40;
  color: #d8eeff;
}
.rail-note {
  margin-top: auto;
  padding: 16px 10px;
  font-size: 11px;
  color: #9db8d2;
}
.rail-note strong {
  font-size: 11px;
  margin-left: 5px;
  font-weight: 550;
}
.rail-note p {
  color: #7088a4;
  font-size: 10px;
  line-height: 1.9;
  margin-bottom: 0;
}
.rail-link {
  font-size: 11px;
  text-decoration: none;
  color: #849dba;
  padding: 12px 8px;
  display: flex;
  justify-content: space-between;
}
.rail-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  font-size: 10px;
  margin-top: 12px;
  border-color: #27354b;
  color: #adc2dc;
}
.rail-bottom small {
  display: block;
  color: #67819e;
  margin-top: 5px;
  font-size: 9px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #1c3148;
  font-size: 10px;
  color: #9bc5e7;
}
.conversation {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #0e1521;
}
.chat-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 32px 22px;
  border-bottom: 1px solid #e9ece5;
  border-color: #243046;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #6c8eb2;
  font-weight: 600;
}
.chat-header h1 {
  font-size: 17px;
  font-weight: 550;
  margin: 6px 0 0;
  letter-spacing: 0.2px;
  color: #e1edfb;
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.mode-badge {
  font-size: 10px;
  background: #18334a;
  color: #8fc9ee;
  padding: 6px 9px;
  border-radius: 20px;
}
.outline-button {
  background: #15283c;
  border: 1px solid #dce2d7;
  border-radius: 6px;
  font-size: 11px;
  padding: 8px 11px;
  color: #badcff;
  border-color: #365575;
}
.outline-button span {
  padding-left: 8px;
}
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3a536f transparent;
  padding: 0 40px;
}
.welcome {
  max-width: 600px;
  margin: 65px auto 40px;
}
.welcome-icon {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border-radius: 14px;
  background: #1d3a54;
  color: #acdfff;
  font-size: 34px;
  font-weight: 650;
}
.welcome .eyebrow {
  margin: 26px 0 14px;
}
.welcome h2 {
  font-weight: 600;
  font-size: clamp(31px, 3vw, 44px);
  line-height: 1.45;
  letter-spacing: -1.6px;
  margin: 0 0 18px;
  color: #f0f5fc;
}
.welcome > p:not(.eyebrow) {
  font-size: 13px;
  color: #8ca5c0;
  line-height: 2;
}
.starter-heading {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #b6cce2;
  font-size: 12px;
}
.starter-heading small {
  display: block;
  margin-top: 5px;
  color: #8ca5c0;
  font-size: 10px;
}
.starter-controls {
  display: flex;
  gap: 8px;
}
.starter-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid #2b405a;
  border-radius: 8px;
  background: #131f30;
  color: #badcff;
  font-size: 17px;
}
.starter-controls button:hover:not(:disabled) {
  border-color: #6695bf;
}
.starter-controls button:disabled {
  cursor: default;
  opacity: 0.35;
}
.starter-grid {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #3a536f transparent;
}
.starter-grid:focus-visible,
.starter-grid button:focus-visible,
.starter-controls button:focus-visible {
  outline: 2px solid #8cc7f4;
  outline-offset: -2px;
}
.starter-grid button {
  flex: 0 0 clamp(220px, 44%, 270px);
  scroll-snap-align: start;
  text-align: left;
  padding: 17px;
  border: 1px solid #e1e6db;
  border-radius: 10px;
  background: #131f30;
  color: #d3e4f7;
  font-size: 12px;
  box-shadow: 0 2px 2px #1b302103;
  transition:
    border-color 0.2s,
    transform 0.2s;
  border-color: #2b405a;
}
.starter-grid button:hover {
  transform: translateY(-2px);
  border-color: #6695bf;
}
.starter-grid button > span {
  display: block;
  font-size: 19px;
  margin-bottom: 17px;
  color: #8cc7f4;
}
.starter-grid small {
  display: block;
  color: #6e8dac;
  font-size: 10px;
  margin-top: 8px;
}
.messages {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 25px;
}
.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0;
}
.message-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  font-size: 13px;
  color: #c5d8ef;
}
.message.user .message-content {
  padding: 12px 16px;
  border: 1px solid #e7eadd;
  border-radius: 0 12px 12px 12px;
  background: #1b2c41;
  border-color: #304967;
  color: #dcecff;
}
.message-result {
  margin-top: 15px;
  display: grid;
  gap: 8px;
}
.result-card {
  padding: 14px 16px;
  border: 1px solid #e0e6da;
  border-radius: 10px;
  background: #13243a;
  border-color: #2c4461;
}
.result-card h4 {
  font-size: 13px;
  margin: 0 0 8px;
  color: #cee6ff;
}
.result-card p {
  margin: 0;
  font-size: 11px;
  color: #89a4c4;
}
.result-card .result-badge {
  float: right;
  font-size: 10px;
  border-radius: 12px;
  padding: 3px 7px;
  background: #1e3e57;
  color: #a1d6ff;
}
.message.error .message-content {
  color: #f2a18f;
}
.composer-wrap {
  flex-shrink: 0;
  padding: 18px 40px 14px;
}
.context-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 700px;
  margin: 0 auto 11px;
  font-size: 10px;
  color: #7493b7;
}
.context-bar b {
  font-weight: 500;
}
.context-bar label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}
.context-bar label[hidden] {
  display: none;
}
.context-bar input {
  accent-color: #80caff;
}
.context-bar select {
  border: 0;
  background: #14243a;
  color: #abd3fb;
  font-size: 10px;
}
.sample-label {
  margin-left: auto;
  color: #6885a6;
}
.composer {
  background: #111e30;
  padding: 15px 15px 9px;
  border: 1px solid #dce3d5;
  border-radius: 12px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 9px 35px #0002;
  border-color: #344e6d;
}
.composer:focus-within {
  border-color: #80bcf0;
}
.composer textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #d4e8ff;
}
.composer textarea::placeholder {
  color: #5f80a5;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #527397;
  font-size: 9px;
}
.composer-footer button {
  border: 0;
  background: #b5e0ff;
  color: #122436;
  border-radius: 8px;
  width: 31px;
  height: 31px;
  font-size: 20px;
}
.composer-note {
  text-align: center;
  font-size: 10px;
  color: #56789c;
  margin: 11px 0 0;
}
.status-dot {
  display: inline-block;
  background: #8bcfff;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  vertical-align: middle;
}
dialog {
  width: min(470px, calc(100vw - 48px));
  border: 1px solid #dfe5d7;
  border-radius: 16px;
  padding: 28px;
  color: #d8e7fa;
  box-shadow: 0 25px 100px #10241433;
  background: #111d2d;
  border-color: #3b5675;
}
dialog::backdrop {
  background: #030810aa;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.dialog-heading h2 {
  font-size: 23px;
  font-weight: 500;
  margin: 8px 0 14px;
  color: #ecf4ff;
}
.icon-button {
  border: 0;
  background: transparent;
  color: #8ea6c2;
  font-size: 25px;
}
.dialog-heading .eyebrow {
  margin: 0;
}
dialog p {
  font-size: 11px;
  color: #91a9c6;
  line-height: 1.9;
}
dialog fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
dialog label {
  display: block;
  font-size: 11px;
  color: #9bb8d9;
  margin: 15px 0;
}
dialog input {
  display: block;
  margin-top: 8px;
  border: 1px solid #d9e2d1;
  background: #0b1524;
  border-radius: 7px;
  box-sizing: border-box;
  padding: 11px;
  width: 100%;
  color: #d7eaff;
  font-size: 11px;
  border-color: #334d6c;
}
dialog code {
  display: block;
  padding: 15px;
  border-radius: 8px;
  background: #080e19;
  color: #9ed6ff;
  font-size: 11px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}
.dialog-actions a {
  color: #8fc2ee;
  font-size: 11px;
}
.primary-button {
  background: #bfdef8;
  color: #102135;
  border: 0;
  border-radius: 8px;
  padding: 11px 19px;
  font-size: 11px;
}
.form-error {
  color: #f3b09e;
}
.field-hint {
  font-size: 10px;
}
@media (min-width: 1600px) {
  .demo-shell {
    grid-template-columns: 255px minmax(0, 1fr);
  }
  .welcome {
    margin-top: 105px;
  }
  .welcome h2 {
    font-size: 49px;
  }
  .chat-scroll {
    padding: 0 70px;
  }
}
@media (max-width: 1180px) {
  .demo-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 14px;
  }
  .brand {
    font-size: 14px;
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .chat-header {
    padding: 22px;
  }
  .chat-header .eyebrow {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .chat-scroll {
    padding: 0 24px;
  }
  .composer-wrap {
    padding: 18px 22px 12px;
  }
  .mode-badge {
    font-size: 8px;
  }
  .welcome h2 {
    font-size: 34px;
  }
}
@media (max-width: 940px) {
  .demo-shell {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 12px 16px;
    align-items: center;
  }
  .brand > span:last-child,
  .rail-label,
  .scenario > span:last-child,
  .rail-note,
  .rail-link,
  .rail-bottom,
  .new-chat {
    display: none;
  }
  .scenario {
    margin-top: 25px;
    padding: 13px;
  }
  .chat-header {
    gap: 10px;
  }
  .mode-badge {
    display: none;
  }
  .welcome {
    margin-top: 38px;
  }
  .welcome h2 {
    font-size: 35px;
  }
  .welcome > p:not(.eyebrow) {
    font-size: 11px;
  }
}
@media (max-width: 700px) {
  .demo-shell {
    grid-template-columns: 1fr;
    height: 100dvh;
  }
  .sidebar {
    display: none;
  }
  .chat-header {
    padding: 19px 20px;
  }
  .chat-header .eyebrow {
    display: block;
    font-size: 7px;
  }
  .chat-header h1 {
    font-size: 14px;
  }
  .chat-scroll {
    padding: 0 22px;
  }
  .welcome {
    margin-top: 35px;
  }
  .welcome h2 {
    font-size: 39px;
  }
  .starter-grid {
    gap: 9px;
  }
  .starter-grid button {
    flex-basis: 82%;
    padding: 14px 11px;
    font-size: 11px;
  }
  .starter-grid small {
    font-size: 9px;
    line-height: 1.7;
  }
  .composer-wrap {
    padding: 15px 18px;
  }
  .composer-note {
    font-size: 9px;
    line-height: 1.8;
  }
  .composer-footer > span {
    font-size: 8px;
  }
  .welcome .eyebrow {
    font-size: 8px;
  }
  .message-content {
    font-size: 12px;
  }
  .context-bar {
    flex-wrap: wrap;
    gap: 9px;
  }
  .welcome > p:not(.eyebrow) {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.message-content.markdown {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.markdown > :first-child {
  margin-top: 0;
}
.markdown > :last-child {
  margin-bottom: 0;
}
.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote,
.markdown pre,
.markdown-table {
  margin: 0 0 1em;
}
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  line-height: 1.45;
  margin: 1.4em 0 0.6em;
  color: #dcecff;
}
.markdown h1 {
  font-size: 1.5em;
}
.markdown h2 {
  font-size: 1.3em;
}
.markdown h3 {
  font-size: 1.15em;
}
.markdown ul,
.markdown ol {
  padding-left: 1.6em;
}
.markdown li + li {
  margin-top: 0.35em;
}
.markdown a {
  color: #9cd4ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.markdown blockquote {
  border-left: 3px solid #618bb0;
  padding: 0.25em 1em;
  color: #9fb7cc;
}
.markdown code {
  font-family: var(--mono);
  background: #091321;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
.markdown pre {
  background: #091321;
  border: 1px solid #2b4057;
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
}
.markdown pre code {
  padding: 0;
  background: none;
}
.markdown-table {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #2b4057;
  border-radius: 8px;
}
.markdown table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9em;
}
.markdown th,
.markdown td {
  padding: 9px 12px;
  border: 1px solid #2b4057;
  text-align: left;
  min-width: 90px;
}
.markdown th {
  background: #182c40;
  color: #dcecff;
}
.markdown hr {
  border: 0;
  border-top: 1px solid #2b4057;
  margin: 1.3em 0;
}
.message > div:last-child {
  min-width: 0;
}

/* A quiet conversation-first layout; execution details open on demand. */
.quiet-demo .demo-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}
.quiet-demo .sidebar {
  display: flex;
  padding: 24px 14px;
  align-items: center;
}
.quiet-demo .brand > span:not(.brand-mark),
.quiet-demo .rail-label,
.quiet-demo .rail-note,
.quiet-demo .rail-link,
.quiet-demo .rail-bottom,
.quiet-demo .brand-sub {
  display: none;
}
.quiet-demo .new-chat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0;
  width: 42px;
  height: 58px;
  padding: 6px;
  justify-content: center;
  margin: 24px 0 16px;
}
.quiet-demo .new-chat .new-chat-icon {
  font-size: 22px;
  line-height: 1;
}
.quiet-demo .new-chat .new-chat-label {
  font-size: 10px;
  line-height: 1.5;
}
.quiet-demo .scenario {
  width: 42px;
  padding: 12px;
  justify-content: center;
}
.quiet-demo .scenario > span + span {
  display: none;
}
.quiet-demo .chat-header {
  padding: 20px 32px;
  min-height: 78px;
}
.quiet-demo .chat-header .eyebrow,
.quiet-demo .welcome .eyebrow {
  display: none;
}
.quiet-demo .chat-header h1 {
  font-size: 19px;
}
.quiet-demo .chat-scroll {
  padding: 28px max(28px, calc((100% - 820px) / 2));
}
.quiet-demo .composer-wrap {
  width: 100%;
  max-width: 876px;
  margin: 0 auto;
  padding: 12px 28px 22px;
  position: relative;
}
.quiet-demo .welcome {
  margin: 0 auto 20px;
  padding-top: 0;
}
#welcome-orb {
  margin: 0 auto 4px;
}
.quiet-demo .welcome h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.5;
}
.quiet-demo .welcome > p {
  margin-top: 10px;
}
.quiet-demo .message.user .message-content {
  padding: 13px 17px;
}
.quiet-demo .message-content {
  font-size: 14px;
  line-height: 1.85;
}
.quiet-demo .context-bar {
  font-size: 11px;
  gap: 12px;
  margin-bottom: 9px;
}
.quiet-demo .context-bar > span:first-child {
  display: none;
}
.quiet-demo .composer textarea {
  min-height: 58px;
}
.quiet-demo .composer-footer {
  padding-top: 4px;
}
.quiet-demo .composer-footer > span {
  opacity: 0.65;
  font-size: 10px;
}
.quiet-demo .outline-button {
  font-size: 11px;
  padding: 8px 11px;
}
.quiet-demo .mode-badge {
  font-size: 10px;
}
.agent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 12px;
  color: #a8bed4;
  margin-bottom: 8px;
}
.agent-status[data-phase='idle'],
.agent-status[data-phase='done'] {
  opacity: 0.65;
}
.agent-status[data-phase='error'] {
  color: #f1b5a8;
}
@media (max-width: 1050px) {
  .quiet-demo .mode-badge {
    display: none;
  }
}
@media (max-width: 600px) {
  .quiet-demo .demo-shell {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .quiet-demo .sidebar {
    display: flex;
    padding: 20px 6px;
  }
  .quiet-demo .new-chat,
  .quiet-demo .scenario {
    width: 38px;
  }
  .quiet-demo .scenario {
    padding: 10px;
  }
  .quiet-demo .chat-header {
    padding: 16px;
  }
  .quiet-demo .header-actions {
    gap: 6px;
  }
  .quiet-demo .chat-scroll {
    padding: 24px 16px;
  }
  .quiet-demo .composer-wrap {
    padding: 10px 16px 16px;
  }
  .quiet-demo .welcome {
    padding-top: 0;
  }
  .quiet-demo .welcome h2 {
    font-size: 25px;
  }
}

/* Chat layout: a centered reading column, right-aligned user bubbles, no avatars. */
.quiet-demo #messages {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}
.quiet-demo .message {
  display: block;
  width: 100%;
  margin: 0 0 30px;
}
.quiet-demo .message.assistant > div,
.quiet-demo .message.error > div {
  width: 100%;
  text-align: left;
}
.quiet-demo .message.user {
  display: flex;
  justify-content: flex-end;
}
.quiet-demo .message.user > div {
  width: fit-content;
  max-width: 85%;
}
.quiet-demo .message.user .message-content {
  border-radius: 18px 18px 4px 18px;
}
.quiet-demo .message.assistant .message-content {
  background: transparent;
  border: 0;
  padding: 0;
}

.execution-group,
.tool-inline {
  color: #8298ae;
  font-size: 11px;
  line-height: 20px;
}
.execution-group {
  margin: 2px 0 16px;
}
.tool-inline {
  margin: 2px 0;
}
.execution-group > summary,
.tool-inline > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}
.execution-group > summary::-webkit-details-marker,
.tool-inline > summary::-webkit-details-marker {
  display: none;
}
.tool-inline-icon {
  border: 1px solid #65788c;
  border-radius: 3px;
  width: 14px;
  height: 14px;
  font: 10px/12px var(--mono);
  text-align: center;
  flex: 0 0 auto;
}
.tool-inline-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.execution-group[open] > summary .tool-inline-chevron,
.tool-inline[open] > summary .tool-inline-chevron {
  transform: rotate(90deg);
}
.execution-label,
.tool-inline-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.execution-count {
  flex: 0 0 auto;
  color: #70859a;
  font-size: 10px;
}
.execution-steps {
  margin: 5px 0 0 6px;
  padding-left: 14px;
  border-left: 1px solid #25384b;
}
.execution-group > summary:hover,
.tool-inline > summary:hover {
  color: #b6c9db;
}
.execution-group > summary:focus-visible,
.tool-inline > summary:focus-visible {
  outline: 1px solid #8dbfe3;
  outline-offset: 3px;
  border-radius: 3px;
}
.tool-inline[data-state='running'] .tool-inline-label {
  color: #c0d4e7;
}
.tool-inline[data-state='error'] .tool-inline-label {
  color: #d4a99a;
}
.tool-inline-detail {
  background: #0b1624;
  border-left: 2px solid #2b4057;
  padding: 8px 14px;
  margin: 8px 0 0 24px;
  max-height: 320px;
  overflow: auto;
}
.tool-inline-detail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.7 var(--mono);
  margin: 8px 0;
}

#live-actions.composer-actions {
  display: contents;
}
#live-actions.composer-actions[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .tool-inline-chevron {
    transition: none;
  }
}

.history-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a8bfd7;
  font-size: 12px;
  white-space: nowrap;
}
.history-trigger[hidden] {
  display: none;
}
.history-trigger:hover {
  background: #172638;
  border-color: #2b4058;
  color: #e1edfb;
}
.history-trigger svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#history-panel {
  position: fixed;
  inset: 72px 24px auto auto;
  margin: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid #2b4058;
  border-radius: 16px;
  background: #111c2b;
  color: #d3e4f7;
  box-shadow: 0 20px 64px #0008;
  font-family: var(--font);
}
.history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.history-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.history-heading p {
  margin: 7px 0 18px;
  color: #7f99b3;
  font-size: 11px;
}
.history-close {
  border: 0;
  background: transparent;
  color: #8ca5c0;
  font-size: 23px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.history-close:hover {
  background: #203148;
}
.history-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: #0d1622;
  border: 1px solid #253950;
  border-radius: 9px;
  color: #8ca5c0;
}
.history-search:focus-within {
  border-color: #6b9ac3;
}
.history-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0;
  background: transparent;
  color: #d3e4f7;
  font-size: 12px;
}
.history-search input::placeholder {
  color: #6f8aa5;
}
.history-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a536f transparent;
}
.history-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #b9cee3;
  text-align: left;
  width: 100%;
}
.history-item:hover {
  background: #1a2a3e;
}
.history-item.is-current {
  background: #1b3045;
  border-color: #2b4963;
}
.history-item-content {
  min-width: 0;
  flex: 1;
}
.history-item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.6;
}
.history-item-date {
  display: block;
  margin-top: 5px;
  color: #7995b0;
  font-size: 10px;
}
.history-badge {
  flex-shrink: 0;
  font-size: 10px;
  color: #d8b897;
  background: #352f2a;
  padding: 3px 6px;
  border-radius: 5px;
}
.history-badge.running {
  color: #a2d8dd;
  background: #203940;
}
.history-empty {
  text-align: center;
  padding: 30px 8px;
  color: #8ca5c0;
  font-size: 12px;
}
.history-empty strong {
  font-weight: 500;
  color: #b3c7da;
}
.history-empty p {
  margin: 9px 0 0;
  font-size: 11px;
}
#history-feedback {
  margin: 8px 0 0;
  color: #f1b5a8;
  font-size: 11px;
}
#history-feedback:empty {
  display: none;
}
#history-panel button:focus-visible {
  outline: 2px solid #8cc7f4;
  outline-offset: -2px;
}
#agent-fields .clear-key {
  display: flex;
  align-items: center;
  gap: 8px;
}
#clear-key {
  width: auto;
}
@media (max-width: 700px) {
  .quiet-demo .chat-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .quiet-demo .header-actions {
    flex-wrap: wrap;
  }
  #history-panel {
    inset: 72px 12px auto auto;
  }
  .history-trigger {
    padding: 7px;
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  #history-panel {
    max-width: calc(100vw - 76px);
    padding: 16px;
  }
}

.quick-phrases {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}
.quick-phrases-list {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 0;
}
.quick-phrases-list button {
  flex-shrink: 0;
  height: 30px;
  line-height: 18px;
  padding: 5px 9px;
  border: 1px solid #263c53;
  border-radius: 16px;
  background: transparent;
  color: #9db9d3;
  font-size: 11px;
  white-space: nowrap;
}
.quick-phrases-list button:hover {
  color: #d3e4f7;
  background: #172a3d;
  border-color: #4c7091;
}
.quick-phrases-list:focus-visible,
.quick-phrases-list button:focus-visible {
  outline: 2px solid #8cc7f4;
  outline-offset: -2px;
}
#history-panel {
  overflow-x: hidden;
}
.starter-grid,
.history-list,
#history-panel,
.quick-phrases-list {
  scrollbar-width: none;
}
.starter-grid::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
#history-panel::-webkit-scrollbar,
.quick-phrases-list::-webkit-scrollbar {
  display: none;
}

.shortcut-arrow {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #263c53;
  border-radius: 7px;
  background: transparent;
  color: #9db9d3;
  font-size: 14px;
}
.shortcut-arrow:disabled {
  cursor: default;
  opacity: 0.3;
}
.shortcut-arrow:hover:not(:disabled) {
  background: #172a3d;
  color: #d3e4f7;
}
.shortcut-arrow:focus-visible {
  outline: 2px solid #8cc7f4;
  outline-offset: 2px;
}
