:root {
  --bg: #f7f8fa;
  --paper: #fff;
  --ink: #181a23;
  --muted: #69707f;
  --line: #e4e7ed;
  --soft: #f1f3f6;
  --accent: #5147d8;
  --accent2: #3e36bc;
  --tint: #efedff;
  --green: #147a58;
  --red: #b84648;
  --radius: 12px;
  --shadow: 0 10px 30px #2020300d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Inter",
    "Segoe UI",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
svg {
  display: block;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -1.05px;
  line-height: 1.2;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 14px;
  font-weight: 650;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 11px;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fbfbfc;
  border-right: 1px solid var(--line);
  padding: 21px 13px 14px;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 23px;
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1e1b36;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 0 0 1px #ffffff22;
}
.mark svg {
  width: 23px;
  height: 23px;
}
.brand strong {
  font-size: 22px;
  letter-spacing: -1.1px;
  line-height: 1;
}
.brand strong span {
  color: var(--accent);
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.7px;
  margin-top: 2px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  margin-bottom: 25px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tint);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
.workspace b {
  font-size: 12px;
  display: block;
}
.workspace small {
  font-size: 10px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.nav-label {
  padding: 0 10px;
  color: #9399a5;
  font-size: 10px;
  letter-spacing: 1.1px;
  font-weight: 650;
  margin: 14px 0 7px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 13px;
  color: #535b69;
  position: relative;
}
.nav button:hover {
  background: #eff1f5;
}
.nav button.active {
  background: #eae8fc;
  color: #453ac7;
  font-weight: 650;
}
.nav button.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.nav button .count {
  margin-left: auto;
  font-size: 10px;
  color: #737889;
}
.side-bottom {
  margin-top: auto;
}
.demo-note {
  border: 1px solid #e4e2f2;
  background: #f3f2fb;
  border-radius: 9px;
  padding: 12px;
  margin: 12px 0;
}
.demo-note b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #5147b4;
}
.demo-note p {
  font-size: 11px;
  color: #76738a;
  margin-top: 5px;
  line-height: 1.5;
}
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 5px 2px;
  border-top: 1px solid var(--line);
}
.profile .avatar {
  background: #e7ebed;
  color: #45515b;
  border-radius: 50%;
  font-size: 11px;
  width: 30px;
  height: 30px;
}
.profile b {
  font-size: 12px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 27px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 6;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.crumb b {
  color: var(--ink);
}
.top-actions,
.row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 550;
  background: white;
  color: #606879;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b93a2;
  display: inline-block;
  flex: none;
}
.dot.green {
  background: #2cad83;
}
.dot.amber {
  background: #d49b36;
}
.pill.green {
  background: #edf9f3;
  border-color: #d7eee4;
  color: #167353;
}
.pill.purple {
  background: #f3f1ff;
  border-color: #e5e0fa;
  color: #6254cc;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid #dfe2e8;
  border-radius: 7px;
  background: white;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.15s,
    border 0.15s,
    transform 0.15s;
}
.btn:hover {
  background: #f4f4f8;
  border-color: #c6c7d7;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 5px #5147d824;
}
.btn.primary:hover {
  background: var(--accent2);
}
.btn.icon {
  padding: 8px;
  min-width: 33px;
}
.btn.danger {
  color: var(--red);
}
.btn.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.mobile-menu {
  display: none;
}
.content {
  padding: 27px 28px 30px;
  max-width: 1600px;
  margin: auto;
}
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.pagehead p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.eyebrow {
  font-size: 10px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.seg {
  display: inline-flex;
  background: #eff1f5;
  border: 1px solid #e9ebef;
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
}
.seg button {
  background: none;
  border: 0;
  border-radius: 5px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.seg button.active {
  background: white;
  box-shadow: 0 1px 3px #25263a12;
  color: var(--ink);
  font-weight: 600;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 2px 4px #1f293705;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  min-height: 58px;
}
.panel-head h2 {
  font-size: 13px;
  letter-spacing: 0;
}
.panel-body {
  padding: 19px;
}
.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 17px;
  align-items: stretch;
}
.play-grid > .panel {
  height: calc(100dvh - 199px);
  min-height: 580px;
  display: flex;
  flex-direction: column;
}
.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-title .avatar {
  background: #22213b;
  color: #fff;
  width: 35px;
  height: 35px;
}
.chat-title b {
  font-size: 13px;
  display: block;
}
.chat-title small {
  font-size: 11px;
}
.chat-area {
  overflow: auto;
  flex: 1;
  padding: 22px 22px 14px;
  scrollbar-width: thin;
  scrollbar-color: #dfe1e8 transparent;
}
.chat-day {
  text-align: center;
  color: #9a9fa9;
  font-size: 10px;
  margin: 0 0 20px;
}
.message {
  display: flex;
  gap: 9px;
  margin: 0 0 17px;
  align-items: flex-start;
}
.message.me {
  justify-content: flex-end;
}
.message .avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 11px;
  background: #eeedfb;
}
.message .bubble-wrap {
  max-width: 92%;
  min-width: 0;
}
.message .msgname {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 4px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.bubble {
  background: #f5f6f9;
  border: 1px solid #eceef2;
  padding: 11px 13px;
  border-radius: 3px 12px 12px 12px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.me .bubble {
  background: #eeedff;
  border-color: #e6e3ff;
  color: #2e285f;
  border-radius: 12px 3px 12px 12px;
}
.me .msgname {
  justify-content: flex-end;
}
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2e5ed;
  border-radius: 6px;
  background: white;
  color: #656c7d;
  padding: 4px 7px;
  font-size: 10px;
  margin-top: 7px;
  text-align: left;
}
.source-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.slots button {
  background: white;
  border: 1px solid #dedcf0;
  color: #4e43c8;
  border-radius: 7px;
  font-size: 11px;
  padding: 7px 10px;
}
.slots button:hover {
  background: var(--tint);
}
.suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 17px 11px;
}
.suggestions button {
  background: white;
  color: #636b7c;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10px;
}
.suggestions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.composer-wrap {
  border-top: 1px solid var(--line);
  padding: 13px 15px 10px;
}
.composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  border: 1px solid #d9dce5;
  border-radius: 9px;
  padding: 8px;
  background: white;
}
.composer:focus-within {
  border-color: #a19aed;
  box-shadow: 0 0 0 3px #5147d80c;
}
.composer textarea {
  border: 0;
  outline: none;
  resize: none;
  min-height: 37px;
  max-height: 100px;
  width: 100%;
  padding: 8px 5px;
  line-height: 1.4;
  font-size: 12px;
}
.composer .btn {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
}
.composer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #9298a4;
  margin-top: 8px;
  gap: 8px;
}
.trace-intro {
  padding: 15px 17px 11px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
}
.trace-intro .trace-stat {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 9px;
}
.trace-stat > div {
  min-width: 0;
}
.trace-stat strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trace-stat small {
  font-size: 10px;
}
.trace-list {
  flex: 1;
  overflow: auto;
  padding: 17px;
  scrollbar-width: thin;
}
.trace-item {
  position: relative;
  padding: 0 0 15px 31px;
}
.trace-item:before {
  content: "";
  position: absolute;
  left: 11px;
  top: 25px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.trace-item:last-child:before {
  display: none;
}
.trace-icon {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #f0f0fc;
  color: #6962bc;
  border: 1px solid #e5e4f4;
}
.trace-icon.good {
  background: #edf8f3;
  color: var(--green);
  border-color: #dcefe6;
}
.trace-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  min-height: 24px;
}
.trace-detail {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.codebox {
  background: #f6f7fa;
  border: 1px solid #e8eaf0;
  border-radius: 7px;
  padding: 9px;
  margin-top: 8px;
  color: #626b82;
  font:
    10px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.trace-footer {
  border-top: 1px solid var(--line);
  padding: 12px 17px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.trace-picker {
  width: 100%;
  margin-top: 7px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
}
.field .hint {
  font-size: 11px;
  color: var(--muted);
}
input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  border: 1px solid #dfe2e9;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 9px 11px;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #a39af04d;
  border-color: #9c93ec;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 16px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.info-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  background: white;
}
.info-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.6;
}
.info-card .avatar {
  margin-bottom: 12px;
}
.info-card strong.metric {
  display: block;
  font-size: 25px;
  letter-spacing: -0.8px;
}
.subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 13px;
}
.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #f3f2fd;
  border: 1px solid #e6e3f7;
  border-radius: 8px;
  padding: 12px;
  color: #605990;
  font-size: 12px;
}
.notice svg {
  margin-top: 2px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
th {
  font-weight: 550;
  color: #7c8492;
  background: #f8f9fb;
  font-size: 11px;
  white-space: nowrap;
}
td,
th {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td b {
  display: block;
  font-size: 12px;
}
td small {
  font-size: 10px;
}
.table-action {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.search {
  max-width: 260px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.toggle {
  width: 35px;
  height: 20px;
  border: 0;
  background: #cbd0d9;
  border-radius: 20px;
  position: relative;
  flex: none;
}
.toggle:after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  box-shadow: 0 1px 2px #0002;
  transition: transform 0.15s;
}
.toggle.on {
  background: var(--accent);
}
.toggle.on:after {
  transform: translateX(15px);
}
.toolrow {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}
.toolrow:last-child {
  border: 0;
}
.toolrow p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.toolrow code {
  font-size: 10px;
  color: #7b74bf;
}
.empty {
  padding: 35px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 17px;
  border-top: 1px solid var(--line);
}
.modal-back {
  position: fixed;
  inset: 0;
  background: #20233663;
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  width: min(510px, 100%);
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 70px #1113;
  background: white;
  border-radius: 13px;
  border: 1px solid #e0e3eb;
}
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 70;
  background: #24243b;
  color: white;
  border-radius: 9px;
  padding: 12px 16px;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 44px);
}
.hidden {
  display: none !important;
}
.status-pass {
  color: var(--green);
  font-weight: 600;
}
.status-fail {
  color: var(--red);
  font-weight: 600;
}
.activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 15px;
}
.activity-list button {
  border: 0;
  background: none;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.activity-list button:hover,
.activity-list button.active {
  background: #f2f0ff;
}
.activity-list b {
  font-size: 12px;
  display: block;
}
.activity-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-chat {
  max-height: 540px;
  overflow: auto;
  padding: 16px;
}
.mobile-overlay {
  display: none;
}
.agent-hero {
  display: flex;
  align-items: center;
  gap: 13px;
}
.agent-hero .avatar {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: #211f37;
  color: white;
}
.agent-hero p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  margin: 12px 0;
  color: var(--muted);
}
.checkline svg {
  color: var(--green);
}
.text-link {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.lightline {
  height: 1px;
  background: var(--line);
  margin: 17px 0;
}
.mono {
  font:
    11px/1.5 ui-monospace,
    monospace;
}
.subtle-bg {
  background: #f8f9fb;
}
.nowrap {
  white-space: nowrap;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 208px minmax(0, 1fr);
  }
  .content {
    padding: 22px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .play-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
    gap: 12px;
  }
  .chat-area {
    padding: 17px 14px;
  }
  .trace-list {
    padding: 13px;
  }
  .top-actions .pill {
    display: none;
  }
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 235px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: #12122655;
    z-index: 9;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .play-grid > .panel {
    height: calc(100dvh - 190px);
    min-height: 530px;
  }
  .topbar {
    height: 59px;
  }
  .content {
    padding: 20px 16px;
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .pagehead h1 {
    font-size: 24px;
  }
}
@media (max-width: 620px) {
  .topbar {
    padding: 0 12px;
    gap: 7px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions .btn.subtle {
    display: none;
  }
  .crumb {
    gap: 5px;
    font-size: 11px;
  }
  .crumb .crumb-start {
    display: none;
  }
  .content {
    padding: 16px 12px;
  }
  .pagehead {
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 11px;
  }
  .pagehead h1 {
    font-size: 24px;
  }
  .pagehead p {
    font-size: 12px;
  }
  .play-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }
  .play-grid > .panel {
    height: calc(100dvh - 182px);
    min-height: 480px;
    max-height: 720px;
  }
  .play-grid > .trace-panel {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .trace-list {
    max-height: 520px;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .chat-area {
    padding: 16px 12px;
  }
  .message .bubble-wrap {
    max-width: 88%;
  }
  .bubble {
    padding: 10px 11px;
    font-size: 12px;
  }
  .panel-head {
    padding: 12px;
  }
  .panel-body {
    padding: 14px;
  }
  .toolbar {
    flex-wrap: wrap;
    padding: 11px;
  }
  .search {
    max-width: none;
  }
  .toolrow {
    padding: 13px;
    gap: 9px;
  }
  .toolrow .avatar {
    width: 29px;
    height: 29px;
  }
  .composer-wrap {
    padding: 10px;
  }
  .suggestions {
    padding: 0 11px 9px;
  }
  .composer-meta {
    font-size: 9px;
  }
  .activity-chat {
    max-height: 480px;
  }
  .top-actions .btn {
    padding: 7px 9px;
  }
  .trace-panel .panel-head {
    min-height: 49px;
  }
  .sidebar {
    padding-top: 18px;
  }
  .notice {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
/* Final visual refinements */
.profile b,
.profile small {
  display: block;
}
.profile b {
  line-height: 1.4;
}
.profile small {
  line-height: 1.4;
}
.crumb {
  min-width: 0;
}
.crumb b {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.chat-area {
  padding-top: 16px;
}
.message {
  margin-bottom: 13px;
}
.bubble {
  line-height: 1.56;
}
.source-chip + .text-link {
  margin-left: 7px;
}
.play-grid > .panel {
  height: calc(100dvh - 220px);
}
.client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 24px;
  align-items: center;
  padding: 30px;
  background: #eceef3;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 660px;
}
.client-stage {
  padding: 20px;
  min-width: 0;
}
.client-stage h2 {
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: -2px;
  margin: 16px 0;
}
.client-stage p {
  color: var(--muted);
  max-width: 350px;
}
.client-widget {
  display: flex;
  flex-direction: column;
  height: 620px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 45px #32304d1a;
  overflow: hidden;
  border: 1px solid #e0e2ec;
}
.client-widget .panel-head {
  background: #24223d;
  color: #fff;
  border: 0;
  padding: 16px;
}
.client-widget .chat-title small {
  color: #ceccdf;
}
.client-widget .chat-title .avatar {
  background: #49436e;
}
.client-widget .chat-title b {
  font-size: 14px;
}
.client-widget .btn.icon {
  border-color: #ffffff30;
  background: #ffffff0c;
  color: white;
}
.client-widget .message .bubble-wrap {
  max-width: 90%;
}
.client-widget .chat-area {
  padding: 15px 13px;
}
.client-widget .composer-meta {
  justify-content: center;
}
.client-widget .chat-day {
  margin-bottom: 13px;
}
.client-widget .source-chip {
  font-size: 10px;
}
.client-stage .mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.client-stage .mark svg {
  width: 30px;
  height: 30px;
}
.client-stage .eyebrow {
  margin-top: 20px;
}
.client-stage .row {
  margin-top: 24px;
  flex-wrap: wrap;
}
.client-stage .notice {
  margin-top: 30px;
  max-width: 390px;
}
.preview-tag {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .play-grid > .panel {
    height: calc(100dvh - 190px);
  }
  .client-layout {
    padding: 18px;
    gap: 15px;
  }
  .client-stage {
    padding: 5px;
  }
  .client-stage h2 {
    font-size: 34px;
    letter-spacing: -1.4px;
  }
}
@media (max-width: 620px) {
  .play-grid > .panel {
    height: calc(100dvh - 232px);
    min-height: 430px;
  }
  .play-grid > .trace-panel {
    height: auto;
    min-height: 0;
  }
  .client-layout {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 10px;
    min-height: 0;
  }
  .client-stage {
    display: none;
  }
  .client-widget {
    height: calc(100dvh - 200px);
    min-height: 470px;
  }
  .client-widget .panel-head {
    padding: 12px;
  }
  .crumb b {
    max-width: 73px;
  }
  .client-widget .composer-meta {
    font-size: 10px;
  }
}
@media (max-width: 400px) {
  .crumb > span:last-child,
  .crumb > svg {
    display: none;
  }
  .topbar {
    gap: 5px;
  }
  .top-actions .btn {
    font-size: 11px;
  }
  .content {
    padding-inline: 10px;
  }
  .pagehead {
    gap: 8px;
  }
  .pagehead .row {
    flex-wrap: wrap;
  }
  .topbar .crumb b {
    max-width: 78px;
  }
  .panel-head .chat-title b {
    font-size: 12px;
  }
  .panel-head .chat-title small {
    font-size: 10px;
  }
}
/* AURA / Obsidian — semantic surfaces and a more deliberate studio layout. */
:root {
  --bg: #f0f1f4;
  --paper: #ffffff;
  --ink: #171923;
  --muted: #626977;
  --line: #dfe2e9;
  --soft: #f5f6f9;
  --accent: #5449ce;
  --accent2: #463abb;
  --tint: #eeebff;
  --green: #167c59;
  --red: #b9414b;
  --radius: 13px;
  --surface: #f8f9fb;
  --raised: #fff;
  --hover: #edeff4;
  --faint: #7a8191;
  --accent-ink: #fff;
  --brand-mark: #25233c;
  --code: #eef0f5;
  --code-ink: #454c67;
  --field: #fff;
  --good-bg: #e8f5ed;
  --good-line: #cce8d9;
  --warm: #a76519;
  --shadow: 0 8px 36px #16172b0b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101116;
  --paper: #181a21;
  --ink: #ebedf5;
  --muted: #a0a5b5;
  --line: #2b2e39;
  --soft: #20222c;
  --accent: #b5a6ff;
  --accent2: #c5baff;
  --tint: #302846;
  --green: #83dcb2;
  --red: #ff9ca8;
  --surface: #14161c;
  --raised: #21232c;
  --hover: #252833;
  --faint: #858b9d;
  --accent-ink: #171329;
  --brand-mark: #29253e;
  --code: #101218;
  --code-ink: #bfc9e6;
  --field: #15171e;
  --good-bg: #1e312d;
  --good-line: #345146;
  --warm: #e4b67e;
  --shadow: 0 14px 40px #0003;
  color-scheme: dark;
}
* {
  scrollbar-color: var(--line) transparent;
}
body {
  font-size: 14px;
  letter-spacing: -0.12px;
  background: var(--bg);
  color: var(--ink);
}
.shell {
  grid-template-columns: 228px minmax(0, 1fr);
}
.sidebar {
  background: var(--surface);
  border-color: var(--line);
  padding: 23px 13px 15px;
  overflow: auto;
}
.brand {
  padding: 0 8px 25px;
  gap: 12px;
}
.brand strong {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1.7px;
}
.brand small {
  letter-spacing: 1.6px;
  font-size: 9px;
  color: var(--faint);
  margin-top: 5px;
}
.mark {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: var(--brand-mark);
  color: #e9e3ff;
  box-shadow: inset 0 0 0 1px #b5a6ff35;
  position: relative;
}
.mark:after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #b5a6ff26;
  border-radius: 50%;
  transform: rotate(-15deg) scaleX(0.85);
  pointer-events: none;
}
.mark svg {
  width: 24px;
  height: 24px;
}
.workspace {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 11px 10px;
  border-radius: 10px;
  box-shadow: none;
  margin-bottom: 17px;
}
.workspace b {
  font-size: 13px;
  font-weight: 600;
}
.workspace small {
  font-size: 11px;
  line-height: 1.35;
}
.avatar {
  background: var(--tint);
  color: var(--accent);
  border: 1px solid var(--line);
}
.workspace .avatar {
  background: var(--soft);
  font-size: 14px;
}
.nav-label {
  color: var(--faint);
  font:
    600 10px/1.6 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 1.4px;
  margin: 17px 0 8px;
}
.nav {
  gap: 4px;
}
.nav button {
  font-size: 13px;
  padding: 10px 10px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    background 0.18s,
    color 0.18s,
    border 0.18s;
}
.nav button:hover {
  background: var(--hover);
  color: var(--ink);
}
.nav button.active {
  background: var(--tint);
  border-color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 23%, var(--line));
  color: var(--accent);
  font-weight: 650;
}
.nav button.active:before {
  left: -1px;
  top: 11px;
  bottom: 11px;
  width: 2px;
}
.nav button .count {
  color: var(--accent);
  background: var(--soft);
  border-radius: 5px;
  padding: 0 5px;
}
.demo-note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 14px 0;
}
.demo-note b {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.2px;
}
.demo-note p {
  color: var(--muted);
  font-size: 11px;
}
.profile {
  padding: 12px 5px 0;
}
.profile .avatar {
  background: var(--soft);
  color: var(--muted);
}
.profile small {
  font-size: 10px;
}
.topbar {
  height: 60px;
  background: var(--surface);
  border-color: var(--line);
  padding: 0 28px;
}
.crumb {
  font-size: 12px;
  gap: 9px;
  color: var(--faint);
}
.crumb b {
  font-weight: 650;
}
.top-actions {
  gap: 8px;
}
.pill {
  background: var(--soft);
  border-color: var(--line);
  color: var(--muted);
  border-radius: 5px;
  font-size: 10px;
  padding: 4px 8px;
  font-weight: 600;
  letter-spacing: 0.15px;
}
.pill.purple {
  background: var(--tint);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}
.pill.green {
  background: var(--good-bg);
  border-color: var(--good-line);
  color: var(--green);
}
.dot.green {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}
.btn {
  background: var(--raised);
  border-color: var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 0.18s,
    border 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}
.btn:hover {
  background: var(--hover);
  border-color: var(--faint);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 15%, transparent);
}
.btn.primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  transform: translateY(-1px);
}
.btn.subtle {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn.subtle:hover {
  background: var(--hover);
  color: var(--ink);
}
.btn.danger {
  color: var(--red);
}
.btn.icon {
  min-height: 34px;
}
.theme-switch {
  width: 34px;
  flex: none;
}
.content {
  padding: 25px 28px 28px;
  max-width: 1700px;
}
.pagehead {
  margin-bottom: 20px;
  align-items: flex-end;
  position: relative;
  gap: 16px;
}
.pagehead h1 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -1.65px;
}
.pagehead p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  max-width: 620px;
}
.eyebrow {
  color: var(--accent);
  font:
    600 10px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.pagehead .eyebrow:before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: 1px;
}
.pagehead > .row {
  padding-bottom: 2px;
}
.context-strip {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin: -3px 0 17px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
  color: var(--muted);
}
.context-strip > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.context-strip b {
  color: var(--ink);
  font-weight: 600;
}
.context-strip .text-link {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.context-strip .strip-end {
  margin-left: auto;
  font-family: ui-monospace, monospace;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.3px;
}
.seg {
  background: var(--surface);
  border-color: var(--line);
}
.seg button.active {
  background: var(--raised);
  color: var(--ink);
  box-shadow: none;
}
.panel {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.panel-head {
  min-height: 60px;
  padding: 15px 18px;
  border-color: var(--line);
}
.panel-head h2 {
  font-size: 14px;
  letter-spacing: -0.15px;
}
.panel-head > .row > svg {
  color: var(--accent);
}
.panel-body {
  padding: 21px;
}
.play-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(295px, 1fr);
  gap: 14px;
}
.play-grid > .panel {
  height: calc(100dvh - 248px);
  min-height: 520px;
}
.chat-panel {
  position: relative;
}
.chat-title .avatar,
.agent-hero .avatar {
  background: var(--brand-mark);
  color: #d6ceff;
  border-color: #a99aff35;
  box-shadow: inset 0 0 0 1px #b5a6ff13;
}
.chat-title .avatar {
  width: 37px;
  height: 37px;
  border-radius: 10px;
}
.chat-title b {
  font-size: 14px;
  font-weight: 650;
}
.chat-title small {
  color: var(--muted);
}
.chat-area {
  padding: 17px 24px 12px;
  scrollbar-color: var(--line) transparent;
  background: var(--paper);
}
.chat-day {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.2px;
  margin-bottom: 18px;
}
.chat-day:before,
.chat-day:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.message {
  gap: 10px;
  margin-bottom: 16px;
}
.message .avatar {
  background: var(--brand-mark);
  color: #d6ceff;
  border-color: #a99aff35;
  width: 29px;
  height: 29px;
  border-radius: 9px;
}
.message .msgname {
  font-size: 11px;
  font-weight: 650;
  color: var(--ink);
  margin: 1px 0 5px;
  gap: 9px;
}
.msgname span {
  font-weight: 400;
  color: var(--faint);
  font-size: 10px;
}
.bubble {
  padding: 0 4px 1px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
  border-radius: 0;
}
.me .bubble {
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  color: var(--ink);
  border-radius: 12px 4px 12px 12px;
  padding: 10px 14px;
}
.source-chip {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10px;
}
.source-chip svg {
  color: var(--accent);
}
.source-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.slots {
  gap: 7px;
  margin-top: 11px;
}
.slots button {
  background: var(--field);
  border-color: var(--line);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  font:
    600 11px/1.3 ui-monospace,
    monospace;
  transition:
    background 0.16s,
    border 0.16s,
    transform 0.16s;
}
.slots button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.suggestions {
  padding: 10px 17px 11px;
  gap: 6px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.suggestions button {
  background: var(--paper);
  color: var(--muted);
  border-color: var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.composer-wrap {
  background: var(--paper);
  padding: 13px 16px 11px;
  border-top: 1px solid var(--line);
}
.composer {
  background: var(--field);
  border-color: var(--line);
  border-radius: 11px;
  padding: 8px;
  align-items: center;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}
.composer textarea {
  background: transparent !important;
  color: var(--ink);
  font-size: 13px;
  border: 0 !important;
  outline: none !important;
  min-height: 37px;
}
.composer .btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.composer-meta {
  color: var(--faint);
  font-size: 10px;
}
.composer-meta span:last-child {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.2px;
}
.trace-panel {
  background: var(--surface);
}
.trace-panel .panel-head {
  background: var(--paper);
}
.trace-intro {
  background: var(--surface);
  padding: 16px 17px 13px;
}
.trace-intro select {
  margin: 8px 0 4px;
}
.trace-stat {
  padding: 11px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.trace-stat strong {
  font-size: 12px;
  margin-top: 3px;
}
.trace-stat small {
  font-size: 10px;
  color: var(--faint);
}
.trace-list {
  padding: 17px 18px;
  counter-reset: trace-step;
}
.trace-item {
  counter-increment: trace-step;
  padding: 0 0 19px 35px;
}
.trace-item:before {
  left: 12px;
  top: 28px;
  border-left: 1px dashed var(--line);
  background: none;
}
.trace-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--accent);
  border-color: var(--line);
}
.trace-icon.good {
  background: var(--good-bg);
  color: var(--green);
  border-color: var(--good-line);
}
.trace-name {
  font-size: 12px;
  min-height: 26px;
  justify-content: space-between;
}
.trace-name:after {
  content: "0" counter(trace-step);
  color: var(--faint);
  font:
    10px ui-monospace,
    monospace;
}
.trace-detail {
  font-size: 12px;
  margin-top: 4px;
}
.codebox {
  background: var(--code);
  border-color: var(--line);
  color: var(--code-ink);
  font-size: 11px;
  line-height: 1.6;
  padding: 11px;
  border-radius: 8px;
  position: relative;
}
.codebox:before {
  content: "TOOL OUTPUT / JSON";
  display: block;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.65px;
}
.trace-footer {
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
}
.field label {
  color: var(--ink);
}
input:not([type="checkbox"]),
textarea,
select {
  background: var(--field);
  border-color: var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
.info-card {
  background: var(--paper);
  border-color: var(--line);
  border-radius: 12px;
  padding: 20px;
}
.info-card .metric {
  font-size: 34px !important;
  letter-spacing: -1.5px !important;
  margin-top: 6px;
}
.info-card p {
  font-size: 12px;
}
.notice {
  background: var(--tint);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 9px;
}
.notice svg {
  color: var(--accent);
}
th {
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  letter-spacing: 0.2px;
}
td,
th {
  padding: 15px 16px;
}
.toolrow {
  padding: 20px 18px;
}
.toolrow code {
  color: var(--accent);
}
.toggle {
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--faint);
}
.toggle.on {
  box-shadow: none;
  background: var(--accent);
}
.toggle.on:after {
  background: var(--accent-ink);
}
.modal-back {
  background: #0008;
  backdrop-filter: blur(6px);
}
.modal {
  background: var(--paper);
  border-color: var(--line);
  border-radius: 15px;
  box-shadow: 0 20px 70px #0006;
}
.toast {
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.toast svg {
  color: var(--green);
}
.activity-list button:hover,
.activity-list button.active {
  background: var(--tint);
}
.subtle-bg {
  background: var(--surface);
}
.client-layout {
  background: var(--surface);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  min-height: 660px;
}
.client-layout:before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, #000, transparent 85%);
}
.client-stage,
.client-layout > div {
  position: relative;
}
.client-stage h2 {
  font-size: 50px;
  letter-spacing: -2.6px;
  max-width: 520px;
}
.client-widget {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: 0 22px 60px #0003;
  border-radius: 20px;
}
.client-widget .panel-head {
  background: var(--brand-mark);
  color: #f3eeff;
}
.client-widget .chat-title small {
  color: #c3b8dc;
}
.client-widget .chat-title .avatar {
  background: #41365d;
  color: #e3d9ff;
}
.client-widget .chat-area {
  background: var(--paper);
}
.client-widget .suggestions {
  background: var(--surface);
}
.client-widget .composer-meta {
  color: var(--faint);
}
.client-widget .btn.icon {
  color: #fff;
  background: #ffffff0d;
  border-color: #ffffff24;
}
.client-stage .mark {
  width: 56px;
  height: 56px;
  border-radius: 17px;
}
.client-stage .notice {
  background: var(--paper);
}
.preview-tag {
  color: var(--faint);
}
@keyframes auraEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.content.page-enter {
  animation: auraEnter 0.24s ease-out both;
}
.message:last-child {
  animation: auraEnter 0.2s ease-out;
}
.toast {
  animation: auraEnter 0.22s ease-out;
}
.modal {
  animation: auraEnter 0.2s ease-out;
}
@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 208px minmax(0, 1fr);
  }
  .content {
    padding: 21px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .play-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr);
    gap: 12px;
  }
  .chat-area {
    padding: 15px 15px;
  }
  .trace-list {
    padding: 15px;
  }
  .pagehead h1 {
    font-size: 31px;
  }
  .context-strip {
    gap: 11px;
  }
  .context-strip .strip-end {
    display: none;
  }
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 235px;
  }
  .topbar {
    height: 59px;
    padding: 0 14px;
  }
  .content {
    padding: 19px 16px;
  }
  .play-grid > .panel {
    height: calc(100dvh - 240px);
    min-height: 480px;
  }
  .client-stage h2 {
    font-size: 36px;
    letter-spacing: -1.5px;
  }
  .client-layout {
    padding: 18px;
  }
  .pagehead h1 {
    font-size: 28px;
  }
  .pagehead {
    align-items: flex-start;
  }
}
@media (max-width: 620px) {
  .topbar {
    padding: 0 10px;
  }
  .top-actions {
    gap: 5px;
  }
  .content {
    padding: 17px 11px;
  }
  .pagehead h1 {
    font-size: 28px;
  }
  .pagehead p {
    font-size: 12px;
    margin-top: 5px;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 6px;
  }
  .pagehead {
    margin-bottom: 15px;
    gap: 9px;
  }
  .context-strip {
    font-size: 10px;
    padding: 9px;
    gap: 8px 13px;
    margin-bottom: 12px;
  }
  .context-strip > span svg {
    width: 13px;
    height: 13px;
  }
  .context-strip .text-link {
    font-size: 10px;
  }
  .play-grid {
    grid-template-columns: 1fr;
  }
  .play-grid > .panel {
    height: calc(100dvh - 245px);
    min-height: 460px;
  }
  .play-grid > .trace-panel {
    height: auto;
    min-height: 0;
  }
  .panel-head {
    padding: 12px;
    min-height: 53px;
  }
  .panel-body {
    padding: 14px;
  }
  .chat-area {
    padding: 15px 12px;
  }
  .bubble {
    font-size: 12px;
  }
  .message {
    margin-bottom: 13px;
  }
  .message .avatar {
    width: 26px;
    height: 26px;
  }
  .suggestions {
    padding: 9px 10px;
  }
  .suggestions button {
    font-size: 10px;
    padding: 5px 7px;
  }
  .composer-wrap {
    padding: 10px;
  }
  .composer textarea {
    font-size: 12px;
  }
  .composer-meta {
    font-size: 9px;
  }
  .trace-list {
    padding: 15px;
  }
  .client-layout {
    padding: 10px;
    min-height: 0;
  }
  .client-widget {
    height: calc(100dvh - 196px);
    min-height: 450px;
  }
  .toolrow {
    padding: 14px;
  }
  .info-card {
    padding: 15px;
  }
  .theme-switch {
    width: 30px;
    min-width: 30px !important;
    padding: 6px !important;
  }
  .top-actions .btn.primary {
    font-size: 10px;
    padding: 8px;
  }
  .top-actions .btn.primary svg {
    display: none;
  }
  .topbar .crumb b {
    max-width: 58px;
  }
  .pagehead > .row {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .client-layout:before {
    display: none;
  }
}
@media (max-width: 350px) {
  .crumb > span:last-child,
  .crumb > svg {
    display: none;
  }
  .topbar .crumb b {
    max-width: 48px;
  }
  .pagehead h1 {
    font-size: 25px;
  }
  .context-strip {
    gap: 7px 10px;
  }
  .composer-meta {
    font-size: 8px;
  }
  .chat-title .avatar {
    width: 31px;
    height: 31px;
  }
  .chat-title b {
    font-size: 12px;
  }
  .chat-title small {
    font-size: 10px;
  }
  .trace-stat strong {
    font-size: 11px;
  }
  .toolrow {
    gap: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Fit the complete workspace at standard desktop sizes. */
@media (min-width: 901px) {
  .sidebar {
    padding-top: 20px;
  }
  .brand {
    padding-bottom: 19px;
  }
  .workspace {
    margin-bottom: 12px;
    padding-block: 9px;
  }
  .workspace small {
    font-size: 10px;
  }
  .nav-label {
    margin: 12px 0 5px;
  }
  .nav {
    gap: 3px;
  }
  .nav button {
    padding-block: 8px;
  }
  .demo-note {
    margin: 10px 0;
    padding: 10px;
  }
  .profile {
    padding-top: 10px;
  }
  .content {
    padding-top: 21px;
  }
  .pagehead {
    margin-bottom: 16px;
  }
  .context-strip {
    margin-bottom: 13px;
  }
  .play-grid > .panel {
    height: calc(100dvh - 245px);
  }
  .chat-area {
    padding-top: 15px;
  }
  .message {
    margin-bottom: 12px;
  }
  .bubble {
    line-height: 1.57;
  }
  .trace-intro {
    padding-top: 13px;
    padding-bottom: 11px;
  }
  .trace-list {
    padding-top: 14px;
  }
  .trace-item {
    padding-bottom: 14px;
  }
}
.codebox {
  padding: 0;
  white-space: normal;
  overflow: hidden;
}
.codebox:before {
  display: none;
}
.codebox summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  color: var(--accent);
  font:
    600 10px/1.5 ui-monospace,
    monospace;
  letter-spacing: 0.1px;
  user-select: none;
}
.codebox summary::-webkit-details-marker {
  display: none;
}
.codebox summary:before {
  content: "›";
  font-size: 15px;
  line-height: 1;
  transition: transform 0.15s;
}
.codebox[open] summary:before {
  transform: rotate(90deg);
}
.codebox summary:hover {
  background: var(--hover);
}
.codebox .json-content {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.6;
}
.codebox summary .json-label {
  color: var(--faint);
  margin-left: auto;
  font-weight: 400;
}
.context-strip .text-link:hover {
  color: var(--ink);
}
.trace-icon.good {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 10%, transparent);
}
@media (max-width: 620px) {
  .play-grid > .panel {
    height: calc(100dvh - 280px);
    min-height: 460px;
  }
  .play-grid > .trace-panel {
    height: auto;
    min-height: 0;
  }
  .pagehead p {
    max-width: 100%;
  }
}
#workspace-options {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
#workspace-options summary {
  cursor: pointer;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
}
.local-foot,
.desk-note {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 0;
}
.desk-chat {
  max-width: 860px;
  margin: clamp(12px, 4vh, 52px) auto;
}
.desk-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.desk-heading h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1.15;
}
.desk-heading p {
  color: var(--muted);
  margin: 8px 0 0;
}
.desk-chat .chat-area {
  height: clamp(240px, 45dvh, 520px);
  padding: clamp(14px, 2.4vw, 36px);
}
.desk-note {
  margin: 0;
}
