:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #152033;
  --muted: #647187;
  --line: #dde6f1;
  --line-strong: #c2cfdf;
  --accent: #195fc8;
  --accent-2: #0f9f8f;
  --accent-soft: #e8f1ff;
  --chip: #eef5ff;
  --success: #17a36b;
  --shadow: 0 18px 44px rgba(28, 43, 70, 0.09);
  --shadow-soft: 0 8px 20px rgba(28, 43, 70, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(25, 95, 200, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0, var(--bg) 390px);
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 24px;
}

.brand,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--text), #285086);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
}

.top-actions a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.top-actions a:hover {
  color: var(--accent);
}

.top-actions .star-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #263852;
  box-shadow: 0 8px 18px rgba(28, 43, 70, 0.06);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.top-actions .star-nav-link:hover {
  border-color: rgba(25, 95, 200, 0.34);
  background: #fff;
  color: var(--accent);
  transform: translateY(-1px);
}

.github-icon {
  width: 17px;
  height: 17px;
  background: currentColor;
  flex: 0 0 auto;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 98 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' fill-rule='evenodd' clip-rule='evenodd' d='M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.303.89 2.853 3.316 2.364C83.993 89.39 98 70.973 98 49.217 97.707 22 75.788 0 48.854 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.star-icon {
  color: #ffd028;
  font-size: 15px;
  line-height: 1;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.language-switch button {
  min-width: 72px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.language-switch button.active {
  background: var(--text);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: end;
  gap: 44px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 52px;
}

.agent-hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 58px 24px 64px;
}

.agent-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 850;
}

.hero-main {
  min-width: 0;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
}

.primary-action {
  background: #152033;
  color: #fff;
  box-shadow: 0 14px 28px rgba(21, 32, 51, 0.16);
}

.primary-action:hover {
  background: var(--accent);
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.82);
  color: #40516a;
}

.secondary-action:hover {
  border-color: rgba(30, 100, 216, 0.32);
  color: var(--accent);
}

.hero-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 52px rgba(28, 43, 70, 0.11);
  overflow: hidden;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hero-panel-head a {
  color: var(--accent);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stats div {
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats strong {
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.layout {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 24px 64px;
}

.category-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.category-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.category-nav button:hover,
.category-nav button.active {
  background: var(--chip);
  color: var(--accent);
}

.category-nav span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 850;
}

.category-nav strong {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #42536c;
  font-size: 12px;
}

.content {
  min-width: 0;
}

.toolbar {
  position: sticky;
  top: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(170px, 0.55fr) minmax(170px, 0.55fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(31, 45, 74, 0.08);
  backdrop-filter: blur(16px);
}

.search,
.select {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(30, 100, 216, 0.16);
}

.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project:hover {
  border-color: rgba(30, 100, 216, 0.32);
  box-shadow: 0 16px 34px rgba(31, 45, 74, 0.1);
  transform: translateY(-1px);
}

.project h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.project h2 a:hover {
  color: var(--accent);
}

.project p {
  margin: 0;
  color: var(--muted);
}

.project p.secondary {
  margin-top: 6px;
  color: #7b8495;
  font-size: 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #40516a;
  font-size: 12px;
  font-weight: 800;
}

.chip:first-child {
  background: var(--accent-soft);
  color: var(--accent);
}

.stars {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stars strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.empty {
  padding: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 4px 24px 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  text-decoration: underline;
}

.agent-main {
  display: grid;
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.agent-section {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.install-panel {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.agent-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.agent-section h3 {
  margin: 8px 0 -4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.agent-section p {
  margin: 0 0 16px;
  color: var(--muted);
}

.agent-section pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.agent-section code {
  display: block;
  padding: 16px;
  color: #22304a;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.agent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agent-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.agent-links a:hover {
  border-color: rgba(30, 100, 216, 0.36);
  background: var(--accent-soft);
}

@media (max-width: 900px) {
  .hero,
  .toolbar,
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .agent-hero {
    padding-top: 42px;
  }

  .toolbar {
    position: static;
  }

  .category-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-stats div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .topbar,
  .top-actions,
  .result-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 16px;
  }

  .hero {
    padding: 34px 18px 48px;
  }

  .layout {
    padding: 24px 18px 48px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .category-nav {
    grid-template-columns: 1fr;
  }

  .project {
    grid-template-columns: 1fr;
  }

  .stars {
    justify-items: start;
    grid-template-columns: auto auto;
    align-items: baseline;
  }
}
