/* The Agent Index — the agent-building stack. Violet "swarm" identity. */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0c0a14; --bg2: #120e1c; --surface: #16111f; --surface2: #1e1830;
  --ink: #ece9f5; --muted: #9a92b3; --faint: #655c80;
  --line: #1e1830; --line2: #2c2342;
  --accent: #b07cff; --accent-dim: #9d63f5; --accent-soft: #1c1330;
}
[data-theme="light"] {
  --bg: #f7f5fb; --bg2: #efebf7; --surface: #ffffff; --surface2: #f2eefb;
  --ink: #140e22; --muted: #5a5276; --faint: #9b93b3;
  --line: #e7e2f2; --line2: #d8d0ec;
  --accent: #7c3aed; --accent-dim: #6d28d9; --accent-soft: #efe7fe;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink); min-height: 100vh; overflow-x: hidden;
  font-family: "Space Mono", ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 480px at 12% -6%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 68%),
    radial-gradient(700px 420px at 92% 4%, color-mix(in srgb, #ff5ec4 7%, transparent), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.disp { font-family: "Sora", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* kstrip */
.kstrip { position: relative; z-index: 60; background: #060410; color: #c9c2dd;
  font-family: "Space Mono", monospace; font-size: 10.5px; letter-spacing: .03em; border-bottom: 1px solid var(--line); }
.kstrip .wrap { display: flex; align-items: center; gap: 16px; padding: 7px 28px; flex-wrap: wrap; }
.kstrip a { color: #c9c2dd; opacity: .82; transition: opacity .2s, color .2s; display: inline-flex; align-items: center; gap: 6px; }
.kstrip a:hover { opacity: 1; color: var(--accent); }
.kstrip .dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; display: inline-block; box-shadow: 0 0 9px var(--accent); }
.kstrip .sep { opacity: .3; } .kstrip .grow { flex: 1; }

/* header */
header { border-bottom: 1px solid var(--line2); position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); }
.head-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.brand a { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand .disp { font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand em { color: var(--accent); font-style: normal; }
.node { display: inline-grid; grid-template-columns: repeat(3, 5px); gap: 3px; width: 19px; }
.node i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 60%, transparent); }
.node i:nth-child(1){opacity:1} .node i:nth-child(2){opacity:.4} .node i:nth-child(3){opacity:.7}
.node i:nth-child(4){opacity:.5} .node i:nth-child(5){opacity:.9}
.head-actions { display: flex; align-items: center; gap: 18px; }
.head-actions a { color: var(--muted); font-size: 12px; transition: color .2s; }
.head-actions a:hover { color: var(--accent); }
.theme-btn { background: none; border: 1px solid var(--line2); color: var(--muted); width: 30px; height: 30px;
  border-radius: 7px; cursor: pointer; font-size: 13px; transition: all .2s; }
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }

/* hero */
.hero { padding: 72px 0 40px; }
.kicker { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px; display: flex; align-items: center; gap: 9px; }
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.hero h1 { font-family: "Sora", sans-serif; font-weight: 800; font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04; letter-spacing: -.035em; max-width: 17ch; }
.hero h1 .amp { color: var(--accent); }
.lede { color: var(--muted); font-size: 14.5px; line-height: 1.7; max-width: 66ch; margin-top: 24px; }
.stats { display: flex; gap: 44px; margin-top: 40px; flex-wrap: wrap; }
.stat .num { font-family: "Sora", sans-serif; font-weight: 800; font-size: 34px; color: var(--ink); letter-spacing: -.02em; }
.stat .lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* toolbar */
.toolbar { padding: 14px 0 8px; position: sticky; top: 60px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.search-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line2); border-radius: 10px; padding: 0 14px; transition: border-color .2s; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.search input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: inherit; font-size: 13px; padding: 11px 0; }
.search input::placeholder { color: var(--faint); }
.sort { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; }
.sort button { background: none; border: none; color: var(--muted); font-family: inherit; font-size: 11.5px; padding: 8px 13px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.sort button.active { background: var(--accent); color: #0c0814; font-weight: 700; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.chip { background: var(--surface); border: 1px solid var(--line2); color: var(--muted); font-family: inherit; font-size: 11.5px; padding: 7px 13px; border-radius: 20px; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip .ct { opacity: .6; margin-left: 3px; }

/* grid */
.meta-line { font-size: 11px; color: var(--faint); letter-spacing: .04em; margin: 22px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(312px, 1fr)); gap: 14px; padding-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 19px 16px;
  display: flex; flex-direction: column; gap: 11px; transition: border-color .2s, transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: 0; transition: opacity .2s; }
.card:hover { border-color: var(--line2); transform: translateY(-3px); box-shadow: 0 16px 42px -22px color-mix(in srgb, var(--accent) 40%, #000); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; gap: 12px; }
.card .av { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line2); flex: none; background: var(--surface2); }
.card .id { flex: 1; min-width: 0; }
.card .name { font-family: "Sora", sans-serif; font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .owner { font-size: 11px; color: var(--faint); margin-top: 1px; }
.card .rank { font-family: "Sora", sans-serif; font-weight: 800; font-size: 13px; color: var(--line2); flex: none; }
.card .cat { align-self: flex-start; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 3px 9px; border-radius: 6px; }
.card .desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gauge { display: flex; align-items: center; gap: 10px; }
.gauge .bar { flex: 1; height: 4px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.gauge .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent-dim), #ff6ec7); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.gauge .score { font-family: "Sora", sans-serif; font-weight: 800; font-size: 13px; color: var(--accent); width: 26px; text-align: right; }
.card-foot { display: flex; gap: 13px; flex-wrap: wrap; font-size: 10.5px; color: var(--faint); border-top: 1px solid var(--line); margin-top: 1px; padding-top: 11px; }
.card-foot .star { color: var(--accent); }
.empty { grid-column: 1/-1; text-align: center; color: var(--faint); padding: 60px 0; font-size: 13px; }

/* about / faq */
.about { border-top: 1px solid var(--line2); padding: 52px 0 8px; margin-top: 30px; }
.about h2 { font-weight: 800; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin-bottom: 8px; }
.about .intro { color: var(--muted); max-width: 72ch; font-size: 14px; line-height: 1.75; margin-bottom: 28px; }
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.faq .q { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 19px 21px; }
.faq .q h3 { font-family: "Sora", sans-serif; font-weight: 600; font-size: 14.5px; margin-bottom: 8px; color: var(--ink); }
.faq .q p { font-size: 12.5px; color: var(--muted); line-height: 1.65; }

/* footer */
footer { border-top: 1px solid var(--line2); padding: 44px 0 64px; margin-top: 40px; }
.foot-row { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
footer .blurb { max-width: 50ch; color: var(--muted); font-size: 12px; line-height: 1.75; }
footer .links { display: flex; flex-direction: column; gap: 8px; }
footer .links a { color: var(--muted); font-size: 11.5px; transition: color .2s; }
footer .links a:hover { color: var(--accent); }
footer .links .grouphead { color: var(--faint); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.updated { font-size: 10.5px; color: var(--faint); margin-top: 24px; letter-spacing: .04em; }

/* detail page */
.detail { padding: 50px 0 48px; }
.crumb { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 26px; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--accent); }
.detail-head { display: flex; align-items: center; gap: 20px; }
.detail-head .av { width: 72px; height: 72px; border-radius: 14px; border: 1px solid var(--line2); flex: none; background: var(--surface2); }
.detail h1 { font-family: "Sora", sans-serif; font-weight: 800; font-size: clamp(28px, 5vw, 50px); line-height: 1.02; letter-spacing: -.03em; }
.detail .sub { color: var(--faint); margin-top: 10px; font-size: 12px; }
.detail .desc-big { font-size: clamp(15px, 1.9vw, 20px); color: var(--muted); margin-top: 26px; max-width: 64ch; line-height: 1.6; }
.detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px,1fr)); gap: 12px; margin: 32px 0; }
.detail-stats .box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 17px 19px; position: relative; overflow: hidden; }
.detail-stats .box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.detail-stats .num { font-family: "Sora", sans-serif; font-weight: 800; font-size: 28px; color: var(--ink); }
.detail-stats .lbl { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 7px; }
.topics { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.topic { font-size: 10.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line2); padding: 6px 12px; border-radius: 20px; }
.cta { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #0c0814; padding: 13px 24px; border-radius: 10px;
  font-family: "Space Mono", monospace; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; transition: transform .2s, box-shadow .2s; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 55%, transparent); }

@media (max-width: 640px) {
  .wrap { padding: 0 18px; } .kstrip .wrap { padding: 7px 18px; }
  .grid { grid-template-columns: 1fr; } .hero { padding: 48px 0 28px; }
  .stats { gap: 28px; } .toolbar { top: 56px; }
  .detail-head { gap: 14px; } .detail-head .av { width: 56px; height: 56px; }
}
