.intro {
  min-height: auto;
  padding: 44px 0 32px;
  position: relative;
}

.intro h1 {
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.15;
  margin: 14px 0 12px;
  font-weight: 800;
}

.intro h1 em {
  font-style: normal;
  color: #d87800;
}

.intro > p {
  max-width: 520px;
  line-height: 1.75;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  right: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
}

.scroll-cue span {
  margin-left: 12px;
}

.featured,
.directory {
  border-top: 1px solid var(--ink);
  scroll-margin-top: 96px;
}

@media (max-width: 1240px) {
  .featured,
  .directory {
    scroll-margin-top: 130px;
  }
}

@media (max-width: 900px) {
  .featured,
  .directory {
    scroll-margin-top: 170px;
  }
}

.featured {
  padding: 37px 0 86px;
}

.directory {
  padding: 40px 0 100px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: 28px;
  margin: 8px 0 0;
}

.section-heading > a {
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

.featured-grid,
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.agent-grid .agent-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.directory-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.directory-results {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.result-count {
  font: 11px "DM Mono", "Noto Sans SC", monospace;
  color: var(--muted);
}

.empty-state {
  padding: 45px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
}

.page-button {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: 600 12px "DM Mono", "Noto Sans SC", monospace;
  cursor: pointer;
}

.page-button:hover:not(:disabled),
.page-button.active {
  border-color: var(--lime);
  background: var(--lime);
}

.page-button:disabled {
  color: #a6afbb;
  background: var(--navy-soft);
  cursor: not-allowed;
}

/* Agent Detail Page Layout */
.detail-wrap { padding: 0 0 100px; }
.detail-section { scroll-margin-top: 94px; }
.overview-section { padding: 48px 0 56px; border-bottom: 1px solid var(--ink); }
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 1.15fr);
  align-items: center;
  gap: 48px;
}

.detail-copy {
  max-width: 600px;
}

.detail-copy h1 {
  font-size: clamp(40px, 4.6vw, 66px);
  line-height: 1.1;
  margin: 16px 0 16px;
  font-weight: 800;
}

.detail-tagline {
  font-size: 17px;
  line-height: 1.6;
  max-width: 500px;
  color: var(--muted);
  margin: 0 0 24px;
}

.detail-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.detail-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.trial-hint {
  margin: -4px 0 2px 2px;
  font: 500 12.5px "Noto Sans SC", sans-serif;
  color: var(--muted);
  line-height: 1.4;
}

.trial-hint[hidden] {
  display: none;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.primary-action {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s;
}

.primary-action:hover {
  transform: translateY(-2px);
  color: #fff;
}

.primary-action span {
  margin-left: 18px;
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.deploy-action {
  background: transparent;
  border: 1px solid var(--lime);
  color: var(--lime);
}

.deploy-action:hover {
  background: rgba(255, 158, 27, 0.08);
  border-color: var(--lime);
  color: var(--lime);
}

.deployment-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 9px 0 rgba(27, 54, 93, 0.2);
}

.deployment-dialog::backdrop {
  background: rgba(15, 29, 49, 0.58);
}

.deployment-form {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.deployment-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.deployment-dialog-header h2 {
  margin: 6px 0 0;
  font-size: 24px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.deployment-field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.deployment-field > span,
.deployment-field legend {
  color: var(--muted);
  font: 600 12px "Noto Sans SC", sans-serif;
}

.deployment-field input[type="text"],
.deployment-field input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 13px "DM Mono", monospace;
}

.deployment-field input[type="text"]:focus,
.deployment-field input[type="email"]:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
  border-color: var(--ink);
}

.deployment-location {
  grid-template-columns: repeat(3, 1fr);
}

.deployment-location legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.deployment-location label {
  position: relative;
  cursor: pointer;
}

.deployment-location input {
  position: absolute;
  opacity: 0;
}

.deployment-location span {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
  font: 700 12px "DM Mono", monospace;
}

.deployment-location input:checked + span {
  border-color: var(--ink);
  background: var(--orange-soft);
}

.deployment-location input:focus-visible + span {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}

.deployment-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.deployment-status.is-success { color: #17643a; }
.deployment-status.is-error { color: #a32929; }
.deployment-status.is-pending { color: var(--ink); }

.deployment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.deployment-form-actions .primary-action {
  border: 1px solid var(--ink);
  cursor: pointer;
}

#agent-artwork {
  width: 100%;
  height: 100%;
}

.agent-art.large {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
}

.overview-stats { display:grid;grid-template-columns:repeat(3,1fr);max-width:430px;margin:30px 0 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line); }
.overview-stats div { padding:13px 16px 12px;border-right:1px solid var(--line); }
.overview-stats div:first-child { padding-left:0; }
.overview-stats div:last-child { border-right:0; }
.overview-stats dt { color:var(--muted);font-size:11px;margin-bottom:4px; }
.overview-stats dd { margin:0;font:700 16px "DM Mono",monospace;color:var(--ink); }

.details-section,.usage-section { padding:64px 0;border-bottom:1px solid var(--ink); }
.detail-section-heading { max-width:820px;margin-bottom:42px; }
.detail-section-heading h2 { font-size:30px;line-height:1.3;margin:9px 0 16px; }
.detail-description { line-height:1.9;color:var(--muted);font-size:15px;margin:0;max-width:760px; }
.detail-images { display:flex;flex-direction:column;gap:18px;margin-top:28px;max-width:900px; }
.guide-images { margin-top:32px; }
.detail-image { margin:0;border:1px solid var(--line);background:#fff; }
.detail-image img { display:block;width:100%;height:auto; }
.detail-image.image-load-failed { min-height:180px;display:grid;place-items:center;background:var(--navy-soft); }
.detail-image.image-load-failed::before { content:"图片暂不可用";color:var(--muted);font:12px "Noto Sans SC",sans-serif; }
.detail-image figcaption { padding:10px 14px;color:var(--muted);font:600 12px "Noto Sans SC",sans-serif;background:var(--navy-soft); }
.detail-content { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr);gap:90px; }

.detail-list {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.detail-list #capability-list > div {
  display: flex;
  gap: 22px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

.detail-list b {
  font: 11px "DM Mono", monospace;
  color: #7b899b;
}

.specs {
  border-top: 2px solid var(--ink);
}

.spec-group {
  padding-top: 12px;
  padding-bottom: 4px;
}

.specs > div {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.specs span {
  color: var(--muted);
}

.specs strong {
  text-align: right;
  font-weight: 700;
}

.specs strong a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.specs strong a:hover {
  color: var(--lime);
}

.specs .uses {
  display: block;
}

.uses p {
  line-height: 1.7;
  margin: 10px 0 0;
  font-weight: 600;
}

.usage-heading { position:relative; }
.usage-heading p { margin:0;color:var(--muted);font-size:15px;line-height:1.8; }
.usage-provider { display:block;margin-top:12px;color:var(--muted);font:11px "DM Mono","Noto Sans SC",monospace; }
.usage-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
}

.usage-steps .step-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.usage-steps .step-item:last-child {
  border-bottom: none;
}

.usage-steps .step-header {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
}

.step-number {
  display: inline-block;
  color: var(--ink);
  font: 700 13px "DM Mono", monospace;
  background: var(--navy-soft);
  border: 1px solid var(--line);
  padding: 5px 8px;
  text-align: center;
}

.step-content h3 {
  font-size: 17px;
  margin: 0 0 6px;
  font-weight: 700;
}

.step-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
  max-width: 760px;
}

.step-image {
  margin-top: 14px;
  border: 1px solid var(--line);
  max-width: 720px;
  background: #fff;
  overflow: hidden;
}

.step-image img {
  width: 100%;
  height: auto;
  display: block;
}

.usage-empty { max-width:720px;padding:30px 24px;background:var(--navy-soft); }
.usage-empty strong { display:block;font-size:18px;margin-bottom:8px; }
.usage-empty p { margin:0;color:var(--muted);font-size:14px;line-height:1.7; }
.usage-heading:has(+ .usage-empty) { margin-bottom:24px; }
.usage-section.is-empty { border-bottom:0; }

.not-found {
  padding: 150px 24px;
  text-align: center;
}

.not-found span {
  font: 15px "DM Mono", monospace;
  color: var(--muted);
}

.not-found h1 {
  font-size: 38px;
}

.not-found a {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 800px) {
  .intro {
    padding: 32px 0 24px;
  }
  .intro h1 {
    font-size: 30px;
  }
  .scroll-cue {
    display: none;
  }
  .featured-grid,
  .agent-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .directory-layout {
    display: block;
  }
  .filter-panel {
    margin-bottom: 24px;
  }
  .detail-hero {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  .detail-copy h1 {
    font-size: 38px;
  }
  .deployment-form { padding:22px 18px; }
  .detail-content {
    display: block;
  }
  .specs {
    margin-top: 40px;
  }
  .overview-section { padding:34px 0 38px; }
  .detail-section { scroll-margin-top:130px; }
  .details-section,.usage-section { padding:44px 0; }
  .detail-section-heading { display:block;margin-bottom:28px; }
  .detail-section-heading h2 { font-size:24px;margin:8px 0 12px; }
  .usage-steps .step-header { grid-template-columns:36px 1fr; gap:12px; }
  .gallery-meta { grid-template-columns:1fr auto; }
  .gallery-title { grid-column:1 / -1; }
  .gallery-dots { justify-content:flex-start; }
}
.markdown-content {
  line-height: 1.8;
}

.markdown-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 0.75rem;
}

.markdown-content pre,
.markdown-content code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.markdown-content code {
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  background: var(--surface-muted, #f1f3f5);
}

.guide-link {
  display: inline-block;
  margin-top: 1rem;
}
