.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  overflow: hidden;
}

.wiki-thumb {
  border-radius: 13px;
  max-width: 40%;
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
  background: var(--border-color);
}

.wiki-thumb--logo {
  display: block;
  max-width: 80%;
  max-height: 60px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.75rem;
  margin: 0.75rem auto 2rem auto;
}

.wiki-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wiki-title {
  display: block;
  font-size: var(--font-large);
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
  line-height: 1.1;
}

.wiki-title:hover {
  color: var(--link-hover, var(--link-color));
  text-decoration: underline;
}

.wiki-desc {
  margin-bottom: 1rem;
  font-size: var(--font-small);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.wiki-extract {
  font-size: var(--font-medium);
  color: var(--text-primary);
  display: inline;
}

.wiki-footer-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.wiki-footer-link:hover {
  color: var(--link-color);
  text-decoration: underline;
}

.gh-slot-result {
  padding: 0;
  max-width: 100%;
  width: 100%;
  color: var(--text-primary);
  min-width: 0;
}

.gh-slot-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gh-slot-section {
  margin-bottom: 0;
  min-width: 0;
}

.gh-slot-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.gh-slot-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  min-width: 0;
}

.gh-slot-grid::-webkit-scrollbar {
  /* The global theme rule (src/styles/style.scss) only sets `width`, which
     affects vertical scrollbars. Set the height here so the horizontal bar
     of this grid matches (0.5rem). Ideally this moves into the theme so all
     horizontal scrollbars are consistent site-wide. */
  height: 0.5rem;
}

.gh-slot-grid::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 3px;
}

.gh-slot-grid::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.4;
  border-radius: 3px;
}

.gh-slot-card {
  display: block;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 280px;
  transition: background 0.15s ease;
}

.results-slot-panel-body a:hover {
  text-decoration: none;
}

.gh-slot-card {
  background: var(--bg-hover);
}

.gh-slot-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gh-slot-avatar--user {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.gh-slot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gh-slot-avatar-placeholder {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.gh-slot-repo-head,
.gh-slot-user-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.gh-slot-repo-meta,
.gh-slot-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gh-slot-repo-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary, #0969da);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-slot-repo-lang {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-stars {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.gh-slot-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-slot-user-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.gh-slot-user-login {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-user-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

#results-layout:has(#engine-stats) #sidebar-col {
  display: none;
}

#results-layout:has(#engine-stats) #results-main {
  max-width: none;
}

.es-command {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0 2rem;
}

.es-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.es-heading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.es-logo {
  color: var(--primary);
  font-size: 1.5rem;
}

.es-heading-text {
  display: flex;
  flex-direction: column;
}

.es-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.es-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.es-tabs {
  display: flex;
  gap: 0.25rem;
}

.es-tab {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.es-tab:hover {
  background: var(--bg-hover);
}

.es-tab--on {
  background: var(--primary);
  color: var(--white);
}


.es-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.es-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg-light);
}

.es-card-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.es-table-wrap {
  overflow-x: auto;
}

.es-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.es-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.es-table td {
  padding: 0.55rem 0.6rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.es-row:hover td {
  background: var(--bg-hover);
}

.es-num {
  font-variant-numeric: tabular-nums;
}

.es-engine {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.es-name {
  font-weight: 500;
}

.es-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-secondary);
}

.es-dot--healthy {
  background: var(--success);
}

.es-dot--shaky {
  background: var(--warning, #d98324);
}

.es-dot--down {
  background: var(--danger);
}

.es-row--down .es-fail,
.es-error {
  color: var(--danger);
}

.es-row--shaky .es-fail {
  color: var(--warning, #d98324);
}

.es-chips {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.es-chip {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.es-muted {
  color: var(--text-secondary);
}

.es-empty,
.es-foot {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

#results-layout:has(#engine-stats) #sidebar-col {
  display: none;
}

#results-layout:has(#engine-stats) #results-main {
  max-width: none;
}

.es-command {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0 2rem;
}

.es-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.es-heading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.es-logo {
  color: var(--primary);
  font-size: 1.5rem;
}

.es-heading-text {
  display: flex;
  flex-direction: column;
}

.es-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.es-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.es-tabs {
  display: flex;
  gap: 0.25rem;
}

.es-tab {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.es-tab:hover {
  background: var(--bg-hover);
}

.es-tab--on {
  background: var(--primary);
  color: var(--white);
}


.es-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.es-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg-light);
}

.es-card-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.es-table-wrap {
  overflow-x: auto;
}

.es-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.es-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.es-table td {
  padding: 0.55rem 0.6rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.es-row:hover td {
  background: var(--bg-hover);
}

.es-num {
  font-variant-numeric: tabular-nums;
}

.es-engine {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.es-name {
  font-weight: 500;
}

.es-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-secondary);
}

.es-dot--healthy {
  background: var(--success);
}

.es-dot--shaky {
  background: var(--warning, #d98324);
}

.es-dot--down {
  background: var(--danger);
}

.es-row--down .es-fail,
.es-error {
  color: var(--danger);
}

.es-row--shaky .es-fail {
  color: var(--warning, #d98324);
}

.es-chips {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.es-chip {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.es-muted {
  color: var(--text-secondary);
}

.es-empty,
.es-foot {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.rss-result-date {
  font-size: 12px;
  color: var(--text-secondary);
}
.rss-result-date::before {
  content: "\00b7";
  margin: 0 6px;
}

#main-home.has-feed {
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 80px;
  padding-bottom: 24px;
}

.home-news-feed {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 584px;
  margin: 24px auto 0;
  gap: 16px;
}
.home-news-feed:empty {
  display: none;
}

.skeleton-feed {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
}
.skeleton-feed-card {
  background: var(--bg-light);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.skeleton-feed-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    90deg,
    var(--bg-light) 25%,
    var(--bg-hover) 50%,
    var(--bg-light) 75%
  );
  background-size: 200% 100%;
  animation: freshrss-shimmer 1.6s ease-in-out infinite;
}
.skeleton-feed-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-feed-line {
  background: linear-gradient(
    90deg,
    var(--bg-light) 25%,
    var(--bg-hover) 50%,
    var(--bg-light) 75%
  );
  background-size: 200% 100%;
  animation: freshrss-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
  height: 12px;
}
.skeleton-feed-line.skeleton-feed-source {
  width: 100px;
}
.skeleton-feed-line.skeleton-feed-title {
  height: 16px;
  width: 85%;
}

@keyframes freshrss-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes freshrss-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-feed-card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  animation: freshrss-fade-in 0.4s ease-out backwards;
}

.freshrss-mark-read {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--btn-text);
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s, transform 0.15s;
  z-index: 1;
}
.home-feed-card:hover .freshrss-mark-read {
  opacity: 1;
}
.freshrss-mark-read:hover {
  background: var(--btn-bg);
  transform: scale(1.1);
}
.freshrss-mark-read:active {
  transform: scale(0.95);
}

@keyframes freshrss-mark-out {
  to { opacity: 0; transform: scale(0.94); }
}
.freshrss-marking-read {
  animation: freshrss-mark-out 0.32s ease forwards;
  pointer-events: none;
}
.home-feed-card.ext-card {
  padding: 0;
}
.home-feed-card:nth-child(1) {
  animation-delay: 0.02s;
}
.home-feed-card:nth-child(2) {
  animation-delay: 0.06s;
}
.home-feed-card:nth-child(3) {
  animation-delay: 0.1s;
}
.home-feed-card:nth-child(4) {
  animation-delay: 0.14s;
}
.home-feed-card:nth-child(5) {
  animation-delay: 0.18s;
}
.home-feed-card:nth-child(6) {
  animation-delay: 0.22s;
}
.home-feed-card:nth-child(7) {
  animation-delay: 0.26s;
}
.home-feed-card:nth-child(8) {
  animation-delay: 0.3s;
}
.home-feed-card:nth-child(n + 9) {
  animation-delay: 0.34s;
}
.home-feed-card:active {
  background: var(--bg-hover);
}

.home-feed-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-hover);
}
.home-feed-card-favicon-wrap {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-hover);
  align-items: center;
  justify-content: center;
}
.home-feed-card-favicon {
  width: 48px;
  height: 48px;
  opacity: 0.6;
}
.home-feed-card-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-feed-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.home-feed-card-source-favicon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  object-fit: contain;
}

.home-feed-card-source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-feed-card-date {
  flex-shrink: 0;
}
.home-feed-card-date::before {
  content: "\00b7";
  margin-right: 6px;
}
.home-feed-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .home-news-feed:not(.home-news-feed--desktop) {
    display: none !important;
  }
  .home-news-feed--desktop {
    flex-direction: row;
    max-width: 100%;
    margin: 24px 0 0;
    padding: 0 24px;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .home-news-feed--desktop::-webkit-scrollbar {
    display: none;
  }
  .home-news-feed--desktop .home-feed-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
  .home-news-feed--desktop .home-feed-card-img {
    aspect-ratio: 16 / 9;
  }
  .home-news-feed--desktop .home-feed-sentinel {
    flex: 0 0 1px;
    min-width: 1px;
  }
  .home-news-feed--desktop .skeleton-feed {
    display: flex;
    flex-direction: row;
    gap: 16px;
  }
  .home-news-feed--desktop .skeleton-feed-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
}

@media (max-width: 767px) {
  .home-news-feed {
    width: 100vw;
    margin: 2em -1em;
    gap: 0;
  }

  .home-news-feed .home-feed-card {
    border-radius: 0;
    background: var(--bg);
  }

  .home-feed-card-body {
    padding: 1.3em 1em;
  }

  .home-feed-card-title {
    font-size: 16px;
    font-weight: normal;
  }

  .home-feed-card-meta {
    margin-bottom: 0.1em;
  }

  .home-feed-card-source,
  .home-feed-card-date {
    font-size: 10px;
  }

  .home-feed-card-source-favicon {
    background: var(--bg-light);
    border-radius: 100%;
  }

  .freshrss-mark-read {
    opacity: 1;
    top: 8px;
    right: 8px;
  }
}
