:root {
  color-scheme: dark;
  --brand: #4d6bfe;
  --brand-2: #7c5cff;
  --brand-3: #22d3ee;
  --brand-grad: linear-gradient(135deg, #4d6bfe 0%, #7c5cff 100%);
  --canvas: #070910;
  --canvas-soft: #0c0f1c;
  --canvas-card: #101527;
  --canvas-card-hover: #151b36;
  --canvas-mid: #2a3358;
  --ink: #f4f6ff;
  --body: #c3c9e0;
  --mute: #818bb0;
  --hairline: #1d2440;
  --outline: rgba(255, 255, 255, 0.16);
  --outline-strong: rgba(255, 255, 255, 0.32);
  --font-sans: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --container: 1240px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-card: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 24px 60px -20px rgba(77, 107, 254, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(77, 107, 254, 0.16), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(124, 92, 255, 0.10), transparent 55%),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.mono-label {
  margin: 0;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- 按钮 ---------- */

.outline-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--outline);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.outline-button {
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 20px;
}

.icon-button {
  width: 40px;
  padding: 0;
}

.outline-button:hover,
.icon-button:hover {
  border-color: var(--brand);
  background: rgba(77, 107, 254, 0.12);
}

.primary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(77, 107, 254, 0.65);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 30px -10px rgba(77, 107, 254, 0.75);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 头部 / 底部 ---------- */

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(29, 36, 64, 0.9);
  background: rgba(7, 9, 16, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand::before {
  content: '';
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--brand-grad);
  box-shadow: 0 6px 18px -6px rgba(77, 107, 254, 0.8);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5) 0 6%, transparent 7%),
    var(--brand-grad);
}

.brand__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff 0%, #c7d0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__en {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  color: var(--mute);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 48px;
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.site-footer__brand {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.site-footer__brand p {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- 首页头部（Hero） ---------- */

.catalog-head {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.catalog-head::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 320px at 50% 0%, rgba(77, 107, 254, 0.22), transparent 70%),
    radial-gradient(520px 260px at 82% 20%, rgba(124, 92, 255, 0.18), transparent 70%);
}

.catalog-head__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  text-align: center;
  padding-block: 72px 52px;
}

.catalog-head__title .mono-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  background: rgba(16, 21, 39, 0.7);
  padding: 6px 14px;
}

.catalog-head__title .mono-label::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-3);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}

.catalog-head__title h1 {
  margin: 22px 0 18px;
  font-size: clamp(46px, 7vw, 84px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #aeb9ff 45%, #7c5cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.catalog-head__title > p:last-child {
  max-width: 640px;
  margin: 0 auto;
  color: var(--body);
  font-size: 17px;
  line-height: 28px;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.catalog-stats div {
  padding: 20px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow-card);
}

.catalog-stats dt {
  color: var(--mute);
  font-size: 12px;
}

.catalog-stats dd {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #aeb9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 筛选工具 ---------- */

.catalog-tools {
  border-bottom: 1px solid var(--hairline);
  background: rgba(12, 15, 28, 0.4);
}

.search-row {
  display: flex;
  gap: 12px;
  padding-block: 22px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--mute);
  background: rgba(16, 21, 39, 0.6);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(77, 107, 254, 0.18);
}

.search-field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 15px;
}

.search-field input::placeholder {
  color: var(--mute);
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 22px;
}

.category-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  background: rgba(16, 21, 39, 0.5);
  color: var(--body);
  font-size: 13px;
  line-height: 20px;
  padding: 6px 13px;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.category-filter i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--category-color, var(--mute));
}

.category-filter span {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 11px;
}

.category-filter:hover {
  color: var(--ink);
  border-color: var(--outline);
  transform: translateY(-1px);
}

.category-filter.is-active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px -8px rgba(77, 107, 254, 0.7);
}

.category-filter.is-active span {
  color: rgba(255, 255, 255, 0.85);
}

.category-filter.is-active i {
  background: #fff;
}

/* ---------- 结果区 ---------- */

.catalog-results {
  padding-bottom: 48px;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 26px 16px;
  color: var(--mute);
  font-size: 13px;
}

.results-head p {
  margin: 0;
}

.results-head p span {
  color: var(--ink);
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.empty-state {
  text-align: center;
  padding-block: 80px;
}

.empty-state h2 {
  margin: 12px 0;
  font-size: 28px;
  font-weight: 700;
}

.empty-state p {
  color: var(--mute);
}

.empty-sync {
  padding-block: 120px;
}

.empty-sync h1 {
  margin: 16px 0;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
}

.empty-sync p {
  color: var(--mute);
}

.empty-sync code {
  font-family: var(--font-mono);
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ---------- 插件卡片 ---------- */

.project-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 320px;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 60%), var(--canvas-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(77, 107, 254, 0.55);
  background: var(--canvas-card-hover);
  box-shadow: var(--shadow-pop);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card__topline,
.project-card__identity,
.project-card__footer,
.project-card__metrics,
.project-card__metrics span {
  display: flex;
  align-items: center;
}

.project-card__topline {
  gap: 8px;
  padding-right: 36px;
}

.category-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--category-color);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.project-card__type {
  margin-left: auto;
  color: var(--mute);
  font-size: 12px;
}

.project-card__identity {
  min-width: 0;
  gap: 14px;
}

.project-card__identity img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  object-fit: cover;
}

.project-card__identity div {
  min-width: 0;
}

.project-card h2,
.project-card__identity p,
.project-card__description {
  margin: 0;
}

.project-card h2 {
  overflow: hidden;
  font-size: 19px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card h2 a::after {
  position: absolute;
  inset: 0;
  content: '';
}

.project-card__identity p {
  overflow: hidden;
  color: var(--mute);
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card__description {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  color: var(--body);
  font-size: 14px;
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-card__topics {
  display: flex;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.project-card__topics span {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 22px;
  padding-inline: 9px;
  text-overflow: ellipsis;
}

.project-card__footer {
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
  color: var(--mute);
  font-size: 12px;
}

.project-card__metrics {
  gap: 14px;
}

.project-card__metrics span {
  gap: 5px;
}

.project-card__metrics span svg {
  color: #f7c948;
}

.project-card__updated {
  white-space: nowrap;
}

.project-card__open {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--body);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.project-card__open:hover {
  border-color: var(--brand);
  background: rgba(77, 107, 254, 0.14);
  color: var(--ink);
}

/* ---------- 分页 ---------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-block: 34px 8px;
}

.page-link {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  color: var(--body);
  font-size: 13px;
  padding: 0 11px;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.page-link:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.page-link.is-current {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(77, 107, 254, 0.7);
}

.page-link.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.page-ellipsis {
  color: var(--mute);
}

/* ---------- 详情页 ---------- */

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(760px 300px at 20% 0%, rgba(77, 107, 254, 0.20), transparent 70%);
}

.detail-hero .container {
  position: relative;
  padding-block: 28px 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mute);
  font-size: 13px;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--ink);
}

.detail-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 64px;
  align-items: end;
  padding-top: 52px;
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-eyebrow > span:last-child {
  border-left: 1px solid var(--hairline);
  color: var(--mute);
  font-size: 12px;
  padding-left: 10px;
}

.detail-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
  margin-top: 18px;
}

.detail-title img {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--canvas-soft);
  object-fit: cover;
}

.detail-title > div {
  min-width: 0;
}

.detail-title h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, #aeb9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.detail-title p {
  margin: 8px 0 0;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
}

.detail-description {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--body);
  font-size: 18px;
  line-height: 30px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
}

.detail-metrics div {
  padding: 18px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.detail-metrics dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mute);
  font-size: 12px;
}

.detail-metrics dd {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-content {
  padding-block: 48px 0;
}

.detail-content__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
}

.detail-section {
  margin-bottom: 48px;
}

.detail-section h2 {
  margin: 8px 0 20px;
  font-size: 22px;
  font-weight: 700;
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-cloud a {
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 13px;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.topic-cloud a:hover {
  border-color: var(--brand);
  background: rgba(77, 107, 254, 0.12);
  color: var(--ink);
}

.classification-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.classification-grid div {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px;
}

.classification-grid span {
  display: block;
  color: var(--mute);
  font-size: 12px;
}

.classification-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
}

.classification-note {
  margin: 16px 0 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 22px;
}

.install-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.install-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hairline);
  border-radius: 9999px;
  color: var(--mute);
  font-size: 12px;
  line-height: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}

.install-status svg {
  color: #f7c948;
}

.command-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 20px;
}

.command-row code {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--canvas-soft);
  color: var(--body);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 16px;
  white-space: nowrap;
}

.command-row .icon-button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.copy-icon,
.check-icon {
  display: inline-flex;
}

.check-icon {
  display: none;
  color: #34d399;
}

.icon-button.is-copied .copy-icon {
  display: none;
}

.icon-button.is-copied .check-icon {
  display: inline-flex;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.install-note {
  margin: 16px 0 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 22px;
}

.repository-facts dl {
  margin: 0;
}

.repository-facts dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 13px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}

.repository-facts dt {
  color: var(--mute);
}

.repository-facts dd {
  margin: 0;
  text-align: right;
}

.readme-empty {
  color: var(--mute);
}

/* ---------- README（markdown 渲染） ---------- */

.markdown-body {
  color: var(--body);
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 1.5em 0 0.75em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.markdown-body h1 {
  font-size: 1.8em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.3em;
}

.markdown-body h2 {
  font-size: 1.4em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.3em;
}

.markdown-body h3 {
  font-size: 1.15em;
}

.markdown-body p {
  margin: 0 0 1em;
}

.markdown-body a {
  color: #8aa0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.markdown-body li {
  margin: 0.25em 0;
}

.markdown-body code {
  background: var(--canvas-soft);
  border-radius: 5px;
  padding: 0.2em 0.4em;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.markdown-body pre {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
  overflow: auto;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
}

.markdown-body blockquote {
  margin: 0 0 1em;
  padding: 0 1em;
  border-left: 3px solid var(--brand);
  color: var(--mute);
}

.markdown-body table {
  border-collapse: collapse;
  margin: 0 0 1em;
  width: 100%;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--hairline);
  padding: 6px 13px;
}

.markdown-body th {
  background: var(--canvas-soft);
}

.markdown-body img {
  max-width: 100%;
  border-radius: 8px;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 24px 0;
}

/* ---------- 同类项目 ---------- */

.related-section {
  border-top: 1px solid var(--hairline);
  padding-block: 48px;
}

.related-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}

.related-heading h2 {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 700;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
  }

  .detail-content__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .outline-button,
  .icon-button,
  .primary-button {
    min-height: 44px;
  }

  .icon-button {
    width: 44px;
  }

  .brand__en,
  nav .outline-button span {
    display: none;
  }

  .site-footer__inner {
    display: grid;
    padding-block: 32px;
  }

  .catalog-head__inner {
    padding-block: 52px 40px;
  }

  .catalog-stats {
    gap: 8px;
  }

  .catalog-stats div {
    padding: 14px 8px;
  }

  .catalog-stats dd {
    font-size: 24px;
  }

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

  .project-card {
    min-height: 300px;
    padding: 20px;
  }

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

  .detail-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-row {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
