:root {
  --bg: #0e0e14;
  --panel: #1a1b26;
  --fg: #a9b1d6;
  --fg-bright: #c0caf5;
  --dim: #565f89;
  --muted: #414868;
  --accent: #7aa2f7;
  --urgent: #f7768e;
  --yes: #9ece6a;
  --track: rgba(169, 177, 214, 0.12);
  --fill: rgba(169, 177, 214, 0.14);
  --fill-idle: rgba(169, 177, 214, 0.04);
  --fill-hover: rgba(169, 177, 214, 0.08);
  --fill-selected: rgba(169, 177, 214, 0.18);
  --border: rgba(169, 177, 214, 0.28);
  --font: "JetBrains Mono", "JetBrainsMono Nerd Font", ui-monospace, monospace;
  --caption: 11px;
  --body-small: 12px;
  --body: 13px;
  --title: 15px;
  --heading: 18px;
  --display: 22px;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--body);
  font-feature-settings: "calt" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  padding: 48px 16px 64px;
  position: relative;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(122, 162, 247, 0.16), transparent 60%),
    radial-gradient(700px 420px at 10% 110%, rgba(173, 142, 230, 0.10), transparent 55%),
    radial-gradient(1200px 800px at 50% 40%, #13141c, var(--bg));
}
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.panel {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  box-shadow:
    inset 0 1px 0 rgba(192, 202, 245, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.45);
}

.hero {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  background: var(--fill-idle);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border);
}

.hero h1 {
  margin: 0;
  font-size: var(--heading);
  font-weight: 600;
  color: var(--fg-bright);
  letter-spacing: -0.02em;
}

.hero .meta {
  margin: 3px 0 0;
  font-size: var(--caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 10px;
  background: var(--fill-idle);
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 6px;
}

.search-wrap:focus-within {
  background: var(--fill-hover);
  box-shadow: inset 0 0 0 1px rgba(169, 177, 214, 0.5);
}

.prompt {
  flex: none;
  color: var(--dim);
  font-size: var(--body-small);
  letter-spacing: 0.04em;
}

.search {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 8px 0;
  background: transparent;
  border: 0;
  color: var(--fg-bright);
  font-family: inherit;
  font-size: var(--body);
  outline: none;
}

.search::placeholder { color: var(--muted); }

.chips {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  background: var(--fill-idle);
  box-shadow: inset 0 0 0 1px var(--border);
  border: 0;
  border-radius: 6px;
  color: var(--fg);
  font-family: inherit;
  font-size: var(--caption);
  cursor: pointer;
}

.chip:hover { background: var(--fill-hover); }
.chip[aria-selected="true"] {
  background: var(--fill-selected);
  box-shadow: none;
  color: var(--fg-bright);
}

.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(169, 177, 214, 0.16), transparent);
  margin: 2px 0 12px;
}

.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.section-h h2 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row {
  position: relative;
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(169, 177, 214, 0.04);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  cursor: pointer;
}

.row .bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--fill);
  border-radius: 6px;
  pointer-events: none;
  transition: width 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.row.has-cli .bar { width: 100%; }

.row:hover,
.row[aria-selected="true"] {
  background: var(--fill-hover);
}

.row-top,
.row-sub {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--body-small);
  color: var(--fg-bright);
}

.row .value {
  font-size: var(--body-small);
  font-weight: 700;
  color: var(--dim);
}

.row.has-cli .value { color: var(--yes); }
.row.no-cli .value { color: var(--urgent); opacity: 0.85; }

.row-sub {
  margin-top: 3px;
  min-height: 14px;
}

.row .hint {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--dim);
}

.row .tag {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.empty {
  padding: 28px 8px;
  text-align: center;
  color: var(--dim);
  font-size: var(--body);
  line-height: 1.5;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin: 16px 0 0;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.footer kbd {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 5px;
  background: var(--fill-idle);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--border);
  font-family: inherit;
  font-size: 10px;
  color: var(--fg);
}

.footer .api {
  color: var(--fg);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 8px 12px;
  background: var(--panel);
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  color: var(--fg-bright);
  font-size: var(--caption);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.toast.show { opacity: 1; }

@media (max-width: 520px) {
  body { padding: 20px 10px 40px; }
  .footer .api { width: 100%; text-align: center; }
}
