.document-ai-source-page__content {
  padding-bottom: 2rem;
  overflow: visible;
}

.document-ai-source {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
  overflow: visible;
}

html body .document-ai-source-page.main-container,
html body .document-ai-source-page .main-main {
  overflow: visible;
}

.document-ai-source__anchors {
  display: grid;
  grid-template-columns: repeat(var(--anchor-count, 10), minmax(0, 1fr));
  gap: 0.24rem;
  padding: 0.3rem 0.36rem;
  border-radius: 0.6rem;
  border: 1px solid var(--theme-header-border-color, rgba(0, 0, 0, 0.08));
  background: var(--theme-front-color, #f5f7fd);
  z-index: 9;
  width: 100%;
  box-sizing: border-box;
}

.document-ai-source__anchors-spacer {
  display: none;
  height: 0;
}

.document-ai-source__anchors-marker {
  height: 0;
  margin: 0;
  padding: 0;
}

.document-ai-source__anchors.is-fixed {
  position: fixed !important;
  top: 4.1rem;
  z-index: 9;
  pointer-events: auto;
}

.document-ai-source__anchors a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.13rem 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.1);
  color: inherit;
  text-decoration: none;
  font-size: 0.62rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.document-ai-source__anchors a:hover,
.document-ai-source__anchors a:focus-visible,
.document-ai-source__anchors a.is-active {
  color: var(--theme-color, #3eaf7c);
  border-color: color-mix(in srgb, var(--theme-color, #3eaf7c) 55%, rgba(15, 23, 42, 0.15));
  background: color-mix(in srgb, var(--theme-color, #3eaf7c) 14%, rgba(255, 255, 255, 0.95));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-color, #3eaf7c) 28%, transparent) inset;
}

.document-ai-source__head,
.document-ai-source__group {
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--theme-header-border-color, rgba(0, 0, 0, 0.08));
  background: var(--theme-front-color, #f5f7fd);
}

.document-ai-source__title {
  margin: 0;
  font-size: 1.25rem;
}

.document-ai-source__sub {
  margin: 0.45rem 0 0;
  color: rgba(0, 0, 0, 0.58);
}

.document-ai-source__submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 104px;
  height: 38px;
  padding: 0 0.95rem;
  margin-right: 0.2rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 119, 6, 0.55);
  background: linear-gradient(180deg, #fffdf6, #fff7d6);
  color: #92400e;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.document-ai-source__head .document-submit-product-btn__badge {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.52);
  background: #fff8dc;
  color: #a16207;
  font-size: 0.62rem;
  line-height: 1.25;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.document-ai-source__submit-btn:hover,
.document-ai-source__submit-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(217, 119, 6, 0.8);
  background: linear-gradient(180deg, #fff9e8, #ffefbf);
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.16), 0 0 0 1px rgba(217, 119, 6, 0.12) inset;
}

.document-ai-source__submit-btn:hover .document-submit-product-btn__badge,
.document-ai-source__submit-btn:focus-visible .document-submit-product-btn__badge {
  border-color: rgba(217, 119, 6, 0.82);
  color: #92400e;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.2);
}

html.dark .document-ai-source__submit-btn,
html body.dark .document-ai-source__submit-btn {
  border: 1px solid rgba(250, 204, 21, 0.7);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.78));
  color: #fef3c7;
}

html.dark .document-ai-source__head .document-submit-product-btn__badge,
html body.dark .document-ai-source__head .document-submit-product-btn__badge {
  border: 1px solid rgba(252, 211, 77, 0.6);
  background: #111827;
  color: #fde68a;
}

html.dark .document-ai-source__submit-btn:hover,
html.dark .document-ai-source__submit-btn:focus-visible,
html body.dark .document-ai-source__submit-btn:hover,
html body.dark .document-ai-source__submit-btn:focus-visible {
  border-color: rgba(252, 211, 77, 0.9);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 0.86));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(252, 211, 77, 0.18) inset;
}

html.dark .document-ai-source__submit-btn:hover .document-submit-product-btn__badge,
html.dark .document-ai-source__submit-btn:focus-visible .document-submit-product-btn__badge,
html body.dark .document-ai-source__submit-btn:hover .document-submit-product-btn__badge,
html body.dark .document-ai-source__submit-btn:focus-visible .document-submit-product-btn__badge {
  border-color: rgba(253, 230, 138, 0.92);
  color: #fff2bf;
  box-shadow: 0 0 10px rgba(253, 230, 138, 0.28);
}

.document-ai-source__empty {
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: rgba(0, 0, 0, 0.58);
  background: rgba(148, 163, 184, 0.08);
}

.document-ai-source__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.document-ai-source__group {
  scroll-margin-top: 6rem;
}

.document-ai-source__group-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.document-ai-source__group-head a {
  font-size: 0.83rem;
  color: var(--theme-color, #3eaf7c);
  text-decoration: none;
}

.document-ai-source__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.document-ai-source__card {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 0.65rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-radius: 0.65rem;
  border: 1px solid var(--theme-header-border-color, rgba(0, 0, 0, 0.08));
  background: var(--theme-white, #fff);
  padding: 0.55rem;
}

.document-ai-source__thumb-wrap {
  width: 50px;
  height: 50px;
  border-radius: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-ai-source__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-ai-source__thumb-fallback {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
}

.document-ai-source__thumb-fallback--after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

html.dark .document-ai-source__thumb-fallback,
html body.dark .document-ai-source__thumb-fallback {
  color: rgba(226, 232, 240, 0.75);
}

.document-ai-source__meta {
  min-width: 0;
}

.document-ai-source__name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.document-ai-source__desc {
  margin-top: 0.22rem;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html.dark .document-ai-source__head,
html.dark .document-ai-source__group,
html.dark .document-ai-source__anchors,
html body.dark .document-ai-source__head,
html body.dark .document-ai-source__group,
html body.dark .document-ai-source__anchors {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.26);
}

html.dark .document-ai-source__sub,
html.dark .document-ai-source__desc,
html body.dark .document-ai-source__sub,
html body.dark .document-ai-source__desc {
  color: rgba(226, 232, 240, 0.72);
}

html.dark .document-ai-source__submit-btn,
html body.dark .document-ai-source__submit-btn {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(15, 23, 42, 0.45);
  color: rgba(94, 234, 212, 0.95);
}

html.dark .document-ai-source__card,
html body.dark .document-ai-source__card {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.26);
}

html.dark .document-ai-source__anchors a,
html body.dark .document-ai-source__anchors a {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.32);
  color: rgba(226, 232, 240, 0.92);
}

html.dark .document-ai-source__anchors a:hover,
html.dark .document-ai-source__anchors a:focus-visible,
html.dark .document-ai-source__anchors a.is-active,
html body.dark .document-ai-source__anchors a:hover,
html body.dark .document-ai-source__anchors a:focus-visible,
html body.dark .document-ai-source__anchors a.is-active {
  color: rgba(110, 231, 183, 0.98);
  border-color: rgba(110, 231, 183, 0.52);
  background: rgba(16, 185, 129, 0.15);
}

@media (max-width: 1024px) {
  html body .document-ai-source-page .document-ai-source__head .document-submit-product-btn {
    display: inline-flex !important;
  }

  .document-ai-source__anchors.is-fixed {
    top: 3.35rem;
  }

  .document-ai-source__anchors {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.28rem;
    white-space: normal;
    overflow: visible;
  }

  .document-ai-source__anchors a {
    min-width: 0;
    max-width: 100%;
  }

  .document-ai-source__grid {
    grid-template-columns: 1fr;
  }
}

