:root {
  color-scheme: dark;
  font-family: system-ui, "Segoe UI", sans-serif;
  background: #1d1d20;
  color: #f5f4f5;
  --surface: #161616;
  --border: #37373b;
  --muted: #aaa9ad;
  --accent: #ff622c;
  --focus: #ff8a61;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100dvh; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100dvh;
  align-self: start;
  padding: 25px 24px;
  border-right: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 23px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -.5px;
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #e94c14;
  border-radius: 7px;
  font-size: 24px;
  letter-spacing: 0;
}

.workspace {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.workspace-label { font-size: 12px; color: var(--muted); font-weight: 550; }
.workspace-name { padding: 8px 15px; background: var(--surface); border-radius: 4px; font-size: 14px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.nav-item svg { width: 17px; height: 17px; }
main { min-width: 0; padding: 37px 40px 48px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 36px; line-height: 1.24; letter-spacing: -.8px; }

.filters {
  min-height: 40px;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 41px;
  border-bottom: 1px solid var(--border);
}

.search, .select { display: flex; align-items: center; position: relative; }
.search { width: 200px; gap: 6px; padding-left: 9px; color: var(--muted); }
.search svg, .select svg { width: 16px; height: 16px; }
.search input, .select select { background: transparent; color: #f5f4f5; border: 0; min-width: 0; height: 100%; font-size: 14px; }
.search input { width: 100%; padding: 0 10px 0 0; }
.search input::placeholder { color: #a29fa4; opacity: 1; }
.select { border-left: 1px solid var(--border); flex-shrink: 0; }
.select select { padding: 0 31px 0 12px; cursor: pointer; appearance: none; }
.select option { background: var(--surface); }
.select svg { position: absolute; right: 9px; pointer-events: none; color: var(--muted); }
.result-count { align-self: center; min-width: 0; margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.card {
  min-width: 0;
  min-height: 202px;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  color: inherit;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background-color .16s ease, border-color .16s ease;
}

.card:hover { background: #212124; border-color: #38363b; }
.card-top { width: 100%; display: flex; align-items: flex-start; gap: 6px; }
.avatar { display: block; object-fit: contain; border-radius: 12px; }
.card-top .avatar { margin-right: auto; }
.card-action, .card-arrow { display: grid; place-items: center; width: 27px; height: 24px; border-radius: 3px; margin-top: 3px; }
.card-action { background: #302641; color: #b29ae6; }
.card-arrow { background: #27272a; color: var(--muted); }
.card-action svg { width: 16px; height: 16px; }
.card-arrow svg { width: 13px; height: 13px; }
.card:hover .card-arrow { color: var(--accent); }
.card-heading { display: flex; align-items: baseline; gap: 6px; width: 100%; margin-top: 13px; }
.card-name { min-width: 0; font-size: 14px; line-height: 1.34; font-weight: 670; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version { flex: none; font-size: 13px; line-height: 1; font-weight: 600; color: var(--muted); white-space: nowrap; }
.version::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; background: #505055; border-radius: 1px; }
.card-description { margin: 12px 0 9px; color: var(--muted); font-size: 12.5px; line-height: 1.34; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tag { width: fit-content; max-width: 100%; border-radius: 3px; background: #232326; color: #dedde1; padding: 3px 8px; font-size: 10px; font-weight: 640; line-height: 1.35; letter-spacing: .025em; text-transform: uppercase; }
.card .tag { margin-top: auto; }
.status { display: grid; gap: 14px; justify-items: start; padding: 24px 0; color: var(--muted); }

dialog {
  width: min(960px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 64px);
  padding: 0;
  border: 1px solid #323236;
  border-radius: 9px;
  background: #1d1d20;
  color: inherit;
  overscroll-behavior: contain;
}

body:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: rgb(0 0 0 / .69); }
.dialog-inner { position: relative; padding: 20px; }
.close { position: sticky; top: 9px; z-index: 1; margin: 9px 9px -45px auto; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: #27272a; border: 0; border-radius: 4px; color: #f5f4f5; }
.close:hover { background: #37373a; }
.agent-hero { display: grid; grid-template-columns: minmax(190px, 38fr) minmax(0, 62fr); align-items: center; background: var(--surface); border-radius: 6px; padding: 32px 35px; gap: 25px; }
.agent-art { display: grid; place-items: center; }
.agent-art .avatar { width: min(100%, 226px); height: auto; aspect-ratio: 1; }
.agent-intro { padding-top: 9px; }
.agent-meta { display: flex; align-items: center; gap: 10px; margin: 0 28px 14px 0; }
h2 { font-size: clamp(26px, 3.1vw, 39px); font-weight: 670; line-height: 1.1; letter-spacing: -.034em; }
#agent-summary { margin-top: 14px; color: #e8e7e9; font-size: 16px; line-height: 1.55; }
.actions { display: flex; gap: 10px; margin-top: 20px; }
.action {
  min-height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.actions .action { flex: 1 1 0; }
.action svg { width: 17px; height: 17px; }
.primary { background: linear-gradient(105deg, #d7410d, #ed5020); font-size: 19px; }
.primary:hover { background: #df4616; }
.secondary { background: #29292c; }
.secondary:hover { background: #37373b; }
#more[aria-expanded="true"] svg { transform: rotate(180deg); }
.agent-note { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
#details { margin-top: 16px; padding: 23px 28px; border-radius: 5px; background: var(--surface); }
#details:focus { outline: none; }
h3 { font-size: 19px; line-height: 1.3; }
.capabilities { list-style: none; display: grid; gap: 14px; padding: 0; margin: 15px 0 22px; }
.capabilities li { padding-left: 12px; border-left: 2px solid var(--accent); }
.capabilities h4 { margin-bottom: 3px; font-size: 14px; font-weight: 650; }
.capabilities p, .example { color: var(--muted); font-size: 14px; line-height: 1.5; }
.example { margin-top: 7px; }

@media (max-width: 1270px) {
  main { padding-right: 28px; padding-left: 28px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  body { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-right: 18px; padding-left: 18px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 690px) {
  body { display: block; }
  .sidebar { position: static; min-height: auto; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--border); }
  .brand { font-size: 20px; }
  .brand-mark { width: 31px; height: 31px; font-size: 21px; }
  .workspace, .sidebar nav { display: none; }
  main { padding: 23px 18px 30px; }
  h1 { font-size: 29px; }
  .filters { margin-top: 19px; }
  .search { width: auto; flex: 1 1 130px; padding-left: 0; }
  .grid { gap: 10px; margin-top: 17px; }
  dialog { width: calc(100% - 22px); max-height: calc(100dvh - 30px); }
  .dialog-inner { padding: 10px; }
  .close { top: 8px; margin: 8px 8px -46px auto; width: 38px; height: 38px; }
  .agent-hero { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; padding: 18px 16px; }
  .agent-art { justify-items: start; }
  .agent-art .avatar { width: 77px; }
  .agent-intro { padding-top: 0; }
  .agent-meta { margin-bottom: 9px; }
  #agent-summary { font-size: 14px; margin-top: 10px; }
  .actions { margin-top: 14px; }
  #details { padding: 18px 16px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 172px; }
  .card-heading { margin-top: 9px; }
  .card-name { white-space: normal; }
  .card-description { margin-top: 7px; }
  .result-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

@media (max-width: 340px) {
  .actions { flex-direction: column; }
  .actions .action { flex-basis: auto; }
  .select select { max-width: 159px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
