/* Agent demonstration of the Studio, ported from the Unisson agent model (section.sec, .sec-head, .kicker, h2.h,
   .lead, .demo, .convo.glow, .convo-bar, .ctrl, .progress, .thread, .typing). Colours through the --pack-* tokens
   only; the font stacks are the model's own. Motion only when allowed: the progress bar (300 ms; the model ran 500), the typing dots. */
:host {
  display: block;
  min-inline-size: 0;
  max-inline-size: 100%;
  color: var(--pack-ink);
  font:
    16px / 1.6 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-feature-settings: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
:host([hidden]) {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
h2,
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--pack-focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[part="section"] {
  padding-block: 84px 0;
}
[part="container"] {
  inline-size: min(1200px, 100% - 32px);
  margin-inline: auto;
}
[part="head"] {
  margin-block-end: 34px;
}
[part="eyebrow"] {
  font:
    700 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pack-link);
}
[part="heading"] {
  margin-block-start: 10px;
  font:
    800 clamp(30px, 4.4vw, 48px) / 1.1 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  letter-spacing: -0.035em;
}
[part="lead"] {
  margin-block-start: 14px;
  max-inline-size: 64ch;
  color: var(--pack-mut);
  font-size: 17px;
}
[part="demo"] {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 22px;
  align-items: start;
}
/* .convo.glow: panel, hairline border, shadow, and the gradient ring of a masked pseudo-element. */
[part="conversation"] {
  position: relative;
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  border-radius: 18px;
  background: var(--pack-panel);
  border: 1px solid var(--pack-line);
  box-shadow: var(--pack-shadow);
}
[part="conversation"]::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--pack-c1), transparent 35%, transparent 65%, var(--pack-c2));
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(var(--pack-ink) 0 0) content-box,
    linear-gradient(var(--pack-ink) 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(var(--pack-ink) 0 0) content-box exclude,
    linear-gradient(var(--pack-ink) 0 0);
}
[part="bar"] {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-block-end: 1px solid var(--pack-line);
}
[part="title"] {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-end: auto;
  font:
    700 13px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
[part="title"] i {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--pack-c3);
  box-shadow: 0 0 10px var(--pack-c3);
}
/* The base sheet's button size, border, fill and hover give way to the model's .ctrl. */
.ctrl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 40px;
  padding: 0 12px;
  border: 1px solid var(--pack-line2);
  border-radius: 10px;
  background: var(--pack-panel2);
  color: var(--pack-ink);
  white-space: nowrap;
  cursor: pointer;
  font:
    600 13px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
.ctrl:not(:disabled):is(:hover, :active) {
  background: var(--pack-panel2);
  border-color: var(--pack-c1);
}
.ctrl.main,
.ctrl.main:not(:disabled):is(:hover, :active) {
  color: var(--pack-btnink);
  border-color: transparent;
  background: linear-gradient(120deg, var(--pack-btn1), var(--pack-btn2));
  box-shadow: 0 0 18px -4px var(--pack-a2);
}
[part="progress"] {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-block-end: 1px solid var(--pack-line);
  color: var(--pack-mut);
  font:
    600 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
[part="track"] {
  flex: 1;
  block-size: 6px;
  border-radius: 99px;
  background: var(--pack-panel2);
  box-shadow: 0 0 0 1px var(--pack-line) inset;
  overflow: hidden;
}
[part="track"] i {
  display: block;
  block-size: 100%;
  inline-size: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pack-c1), var(--pack-c2), var(--pack-c3));
  box-shadow: 0 0 12px var(--pack-a1);
}
[part="thread"] {
  list-style: none;
  margin: 0;
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-block-size: min(760px, 78vh);
  overflow: auto;
}
[part="typing"] {
  display: grid;
  grid-template-columns: 34px auto;
  gap: 12px;
  align-items: center;
}
.av {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  color: var(--pack-btnink);
  background: linear-gradient(135deg, var(--pack-btn1), var(--pack-btn2));
  font:
    800 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
.dots {
  display: inline-flex;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 4px 14px 14px 14px;
  border: 1px solid var(--pack-line);
  background: var(--pack-panel2);
}
.dots i {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--pack-mut);
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: no-preference) {
  [part="thread"] {
    scroll-behavior: smooth;
  }
  [part="track"] i {
    transition: inline-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dots i {
    animation: blink 1.1s infinite ease-in-out;
  }
  .dots i:nth-child(2) {
    animation-delay: 0.15s;
  }
  .dots i:nth-child(3) {
    animation-delay: 0.3s;
  }
}
@media (max-width: 980px) {
  [part="demo"] {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  [part="section"] {
    padding-block-start: 64px;
  }
  [part="title"] {
    inline-size: 100%;
  }
  .ctrl {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 8px;
  }
  [part="thread"] {
    padding: 14px 10px 18px;
    max-block-size: none;
  }
}
@media (forced-colors: active) {
  [part="conversation"] {
    border-color: CanvasText;
  }
  [part="conversation"]::after {
    display: none;
  }
  .ctrl {
    border: 1px solid ButtonText;
  }
  [part="track"] i {
    forced-color-adjust: none;
    background: Highlight;
  }
}
