.github-pinned,
.github-pinned * {
  box-sizing: border-box;
}

.github-pinned {
  --ghp-accent: #f05d4f;
  --ghp-columns: 2;
  --ghp-surface: #ffffff;
  --ghp-surface-muted: #f6f8fa;
  --ghp-border: #d8dee4;
  --ghp-text: #1f2328;
  --ghp-text-muted: #59636e;
  --ghp-link: #0969da;
  --ghp-shadow: 0 16px 45px rgb(31 35 40 / 8%);
  width: 100%;
  margin-block: 1.5rem;
  color: var(--ghp-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.github-pinned[data-theme="dark"] {
  --ghp-surface: #161b22;
  --ghp-surface-muted: #21262d;
  --ghp-border: #30363d;
  --ghp-text: #f0f6fc;
  --ghp-text-muted: #9da7b3;
  --ghp-link: #58a6ff;
  --ghp-shadow: 0 16px 45px rgb(0 0 0 / 20%);
}

.github-pinned__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.github-pinned__profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.github-pinned__avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 1px solid var(--ghp-border);
  border-radius: 50%;
  background: var(--ghp-surface-muted);
  object-fit: cover;
}

.github-pinned__identity {
  min-width: 0;
}

.github-pinned__eyebrow {
  margin: 0 0 2px;
  color: var(--ghp-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.github-pinned__title {
  margin: 0;
  overflow: hidden;
  color: var(--ghp-text);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-pinned__profile-link,
.github-pinned__repo-link {
  color: inherit;
  text-decoration: none;
}

.github-pinned__profile-link:hover,
.github-pinned__repo-link:hover {
  color: var(--ghp-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.github-pinned__username {
  margin: 3px 0 0;
  color: var(--ghp-text-muted);
  font-size: 0.92rem;
}

.github-pinned__github-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--ghp-border);
  border-radius: 10px;
  background: var(--ghp-surface);
  color: var(--ghp-text);
  box-shadow: 0 1px 0 rgb(31 35 40 / 4%);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.github-pinned__github-button svg {
  width: 18px;
  height: 18px;
}

.github-pinned__github-button:hover {
  border-color: var(--ghp-accent);
  box-shadow: 0 8px 22px rgb(31 35 40 / 10%);
  color: var(--ghp-text);
  transform: translateY(-1px);
}

.github-pinned__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.github-pinned__summary-item {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--ghp-border);
  border-radius: 12px;
  background: var(--ghp-surface);
}

.github-pinned__summary-value {
  display: block;
  overflow: hidden;
  color: var(--ghp-text);
  font-size: 1.15rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-pinned__summary-label {
  display: block;
  margin-top: 2px;
  color: var(--ghp-text-muted);
  font-size: 0.77rem;
}

.github-pinned__grid,
.github-pinned__skeleton-grid {
  display: grid;
  grid-template-columns: repeat(var(--ghp-columns), minmax(0, 1fr));
  gap: 14px;
}

.github-pinned__card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 238px;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--ghp-border);
  border-radius: 16px;
  background: var(--ghp-surface);
  box-shadow: var(--ghp-shadow);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.github-pinned__card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--repo-color, var(--ghp-accent));
  content: "";
}

.github-pinned__card:hover {
  border-color: var(--repo-color, var(--ghp-accent));
  box-shadow: 0 20px 50px rgb(31 35 40 / 12%);
  transform: translateY(-2px);
}

.github-pinned__repo-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.github-pinned__repo-name {
  min-width: 0;
  margin: 0;
  color: var(--ghp-text);
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.35;
}

.github-pinned__repo-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--ghp-text-muted);
}

.github-pinned__repo-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.github-pinned__description {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 12px 0;
  overflow: hidden;
  color: var(--ghp-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.github-pinned__topics {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.github-pinned__topic {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ghp-link) 10%, transparent);
  color: var(--ghp-link);
  font-size: 0.7rem;
  font-weight: 700;
}

.github-pinned__languages {
  margin-top: auto;
}

.github-pinned__language-bar {
  display: flex;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ghp-surface-muted);
}

.github-pinned__language-segment {
  min-width: 2px;
  background: var(--language-color, #8c959f);
}

.github-pinned__language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 8px 0 14px;
  color: var(--ghp-text-muted);
  font-size: 0.72rem;
}

.github-pinned__language {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.github-pinned__language-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--language-color, #8c959f);
}

.github-pinned__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--ghp-border);
}

.github-pinned__stats {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 11px;
}

.github-pinned__stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ghp-text-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.github-pinned__stat svg {
  width: 15px;
  height: 15px;
}

.github-pinned__updated {
  flex: 0 0 auto;
  color: var(--ghp-text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.github-pinned__empty,
.github-pinned__error,
.github-pinned__loading {
  padding: 28px;
  border: 1px solid var(--ghp-border);
  border-radius: 16px;
  background: var(--ghp-surface);
}

.github-pinned__empty,
.github-pinned__error {
  text-align: center;
}

.github-pinned__empty h2,
.github-pinned__error h2 {
  margin: 0 0 8px;
  color: var(--ghp-text);
  font-size: 1.1rem;
}

.github-pinned__empty p,
.github-pinned__error p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ghp-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.github-pinned__retry {
  margin-top: 16px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--ghp-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
}

.github-pinned__loading-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.github-pinned__skeleton {
  display: block;
  border-radius: 10px;
  background: linear-gradient(90deg, rgb(140 149 159 / 12%) 25%, rgb(140 149 159 / 22%) 50%, rgb(140 149 159 / 12%) 75%);
  background-size: 200% 100%;
  animation: gpr-shimmer 1.35s infinite linear;
}

.github-pinned__skeleton--avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.github-pinned__skeleton--title {
  width: min(280px, 62%);
  height: 24px;
}

.github-pinned__skeleton--card {
  height: 220px;
}

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

.gpr-admin-notice {
  padding: 12px 16px;
  border-left: 4px solid #d63638;
  background: #fff;
  color: #1d2327;
}

@keyframes gpr-shimmer {
  to { background-position: -200% 0; }
}

@media (max-width: 900px) {
  .github-pinned[data-columns="3"] .github-pinned__grid,
  .github-pinned[data-columns="3"] .github-pinned__skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .github-pinned__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .github-pinned__grid,
  .github-pinned__skeleton-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .github-pinned__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .github-pinned__github-button {
    width: 100%;
    justify-content: center;
  }

  .github-pinned__card {
    min-height: 0;
    padding: 18px;
  }

  .github-pinned__footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .github-pinned__card,
  .github-pinned__github-button {
    transition: none;
  }

  .github-pinned__skeleton {
    animation: none;
  }
}

@media (prefers-color-scheme: dark) {
  .github-pinned[data-theme="auto"] {
    --ghp-surface: #161b22;
    --ghp-surface-muted: #21262d;
    --ghp-border: #30363d;
    --ghp-text: #f0f6fc;
    --ghp-text-muted: #9da7b3;
    --ghp-link: #58a6ff;
    --ghp-shadow: 0 16px 45px rgb(0 0 0 / 20%);
  }
}
