@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

.page {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem 2.5rem;
  text-align: center;
}

.heroGlow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 215, 0, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.heroContent {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.heroEyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.5);
  margin-bottom: 0.75rem;
}

[data-theme="light"] .heroEyebrow {
  color: var(--ifm-color-primary-darker);
}

.heroTitle {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

[data-theme="dark"] .heroTitle {
  color: #fafaf6;
}

.heroSub {
  font-size: 1.05rem;
  color: var(--ifm-font-color-secondary, #9a968e);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

/* Cross-nav between the Skills Hub and Plugin Catalog pages. */
.crossNav {
  display: inline-flex;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.crossNavLink {
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border-radius: 7px;
  color: var(--ifm-font-color-secondary, #9a968e);
  text-decoration: none;
  transition: all 0.15s;
}

.crossNavLink:hover {
  color: #ffd700;
  text-decoration: none;
}

.crossNavActive {
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
}

/* Inline "submit your plugin" link under the hero subtitle. */
.heroLink {
  color: #ffd700;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 215, 0, 0.35);
  transition: border-color 0.15s;
}

.heroLink:hover {
  color: #ffd700;
  text-decoration: none;
  border-bottom-color: #ffd700;
}

.heroMeta {
  font-size: 0.85rem;
  color: var(--ifm-font-color-secondary, #9a968e);
  opacity: 0.8;
  margin: -0.75rem 0 1.5rem;
}

/* Three promises every listing carries; replaces the registry-style counters. */



.controlsBar {
  position: sticky;
  top: 60px; /* below Docusaurus navbar */
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 2rem;
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 215, 0, 0.06);
}

[data-theme="dark"] .controlsBar {
  background: rgba(7, 7, 13, 0.85);
}

.searchWrap {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.searchIcon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 215, 0, 0.35);
  pointer-events: none;
}

.searchInput {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 2.6rem;
  font-size: 0.95rem;
  font-family: "DM Sans", sans-serif;
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 10px;
  background: var(--ifm-background-surface-color, #fff);
  color: var(--ifm-font-color-base, #e8e4dc);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .searchInput {
  background: rgba(15, 15, 24, 0.6);
}

.searchInput:focus {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.06);
}

.searchInput::placeholder {
  color: var(--ifm-font-color-secondary, #9a968e);
  opacity: 0.5;
}

.clearBtn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ifm-font-color-secondary);
  cursor: pointer;
  padding: 0.15rem;
  display: flex;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.clearBtn:hover {
  opacity: 1;
  color: #ffd700;
}

/* Tier tabs: All / Official / Community (skills page's source-pill pattern). */
.tierPills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tierBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background: transparent;
  color: var(--ifm-font-color-secondary, #9a968e);
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tierBtn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--ifm-font-color-base);
}

.tierBtnActive {
  border-color: var(--pill-border, rgba(255, 215, 0, 0.3));
  background: var(--pill-bg, rgba(255, 215, 0, 0.06));
  color: var(--pill-color, #ffd700);
}

.tierCount {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.05rem 0.35rem;
  border-radius: 8px;
}

.tierBtnActive .tierCount {
  background: rgba(255, 255, 255, 0.08);
}

/* Sort control: Most starred / Newest / Recently updated, same pill shape as the tier tabs. */
.sortPills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.sortLabel {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ifm-color-emphasis-500);
  margin-right: 0.15rem;
}

.sortBtnActive {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.06);
  color: #ffd700;
}

/* ── Category pills + grouped sections ─────────────────────────────────── */
.categoryPills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.categoryBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background: transparent;
  color: var(--ifm-color-emphasis-600);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.categoryBtn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--ifm-font-color-base);
}

.categoryBtnActive {
  border-color: rgba(125, 211, 252, 0.7);
  background: rgba(125, 211, 252, 0.14);
  color: #bae6fd;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.35), 0 0 14px rgba(125, 211, 252, 0.18);
}

.categoryBtnActive .tierCount {
  background: rgba(125, 211, 252, 0.2);
}

/* Header shown above the flat grid when a category filter or search is active */
.resultsBar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  color: var(--ifm-color-emphasis-700);
}

.resultsBar strong {
  color: var(--ifm-font-color-base);
  font-weight: 650;
}

.resultsClear {
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--ifm-color-emphasis-700);
  border-radius: 14px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.resultsClear:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--ifm-font-color-base);
}

.categorySection {
  margin-bottom: 2.25rem;
}

.categoryHeader {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title view" "blurb view";
  align-items: center;
  gap: 0.1rem 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.categoryTitle {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.categoryBlurb {
  grid-area: blurb;
  margin: 0;
  font-size: 0.85rem;
  color: var(--ifm-color-emphasis-600);
}

.categoryViewAll {
  grid-area: view;
  border: none;
  background: transparent;
  color: #7dd3fc;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.categoryViewAll:hover {
  text-decoration: underline;
}

.starPill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.06);
  color: #ffd700;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-decoration: none;
  white-space: nowrap;
}

.starPill:hover {
  background: rgba(255, 215, 0, 0.14);
  text-decoration: none;
  color: #ffd700;
}

.categoryChip {
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(125, 211, 252, 0.07);
  color: #7dd3fc;
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.categoryChip:hover {
  background: rgba(125, 211, 252, 0.14);
}

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.75rem;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Every card in a grid shares one height (grid-auto-rows: 1fr); the column flex lets
   .cardDetail sink to the bottom edge so install boxes and links line up across a row. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: cardIn 0.35s ease both;
}

[data-theme="dark"] .card {
  background: #0c0c16;
}

.card:hover {
  border-color: rgba(255, 215, 0, 0.15);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 215, 0, 0.05);
  transform: translateY(-1px);
}


.cardAccent {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.card:hover .cardAccent {
  opacity: 1;
}

/* Banner slot: the catalog's 2:1 banner ratio (48 of 56 shipped banners are exactly 2:1), so
   authored images render whole instead of losing their top and bottom to a fixed-height crop.
   Same width on every card in the grid, so the same height. */
.cardImage,
.cardImagePlaceholder {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cardImage {
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.02);
}

/* No banner: the tier tint (inline gradient) with the category glyph, muted so it reads as a
   deliberate blank rather than a missing image. */
.cardImagePlaceholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardImagePlaceholderIcon {
  font-size: 3rem;
  line-height: 1;
  opacity: 0.45;
  filter: saturate(0.6);
  user-select: none;
}

.cardInner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem 1rem 0.85rem 1.15rem;
}

.cardTop {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.cardIcon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.7;
}

.cardTitleGroup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

/* One line: a long name gets an ellipsis, the pills never wrap under it. */
.cardTitle {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ifm-font-color-base);
}

.tierPill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.versionPill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.12);
  color: rgba(96, 165, 250, 0.95);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Three lines, always: long copy is clamped with an ellipsis (full text in the title attribute),
   short copy reserves the same three lines so the rows below start at one offset. */
.cardDesc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ifm-font-color-secondary, #9a968e);
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(3 * 1.55em);
}

/* Chip rows stay one line; whatever does not fit fades out at the right edge instead of
   wrapping or clipping mid-glyph. */
.cardMeta,
.chipList {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}

.cardMeta {
  gap: 0.35rem;
  height: 1.5rem;
}

.cardMeta > * {
  flex-shrink: 0;
}

/* Added / Updated line from the catalog's git history. Always one line tall, even when the
   entry is undated, so the button below sits at the same offset on every card. */
.cardDates {
  display: block;
  height: 1.1rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  line-height: 1.1rem;
  color: var(--ifm-color-emphasis-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cardDates > * + * {
  margin-left: 0.35rem;
}

.cardDatesSep {
  opacity: 0.5;
}

/* Capability chips: tools/hooks/middleware counts. */
.capChip {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-radius: 3px;
  background: rgba(255, 215, 0, 0.04);
  color: rgba(255, 215, 0, 0.7);
}

/* Required env var chips. */
.envChip {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 215, 0, 0.6);
}

.platformPill {
  font-size: 0.66rem;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  background: rgba(96, 165, 250, 0.06);
  color: rgba(96, 165, 250, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.1);
}

/* Sinks to the card's bottom edge so install boxes and links align across a grid row; the
   margin on .pickBtn keeps a floor on the gap above it in the tallest card. */
.cardDetail {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Fixed-height fact rows (exactly three per card: Maintainer, Pinned, Tools). */
.metaRow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 1.4rem;
  margin-bottom: 0.3rem;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}

.metaLabel {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ifm-font-color-secondary);
  opacity: 0.5;
  min-width: 4.5rem;
  flex-shrink: 0;
}

.metaValue {
  font-size: 0.78rem;
  color: var(--ifm-font-color-base);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metaEmpty {
  opacity: 0.35;
}

.metaValue code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}

.chipList {
  gap: 0.3rem;
  flex: 1;
}

/* Tool names as one comma-separated run that ellipsizes as a whole, so the "+N" tail stays
   visible and same-prefix names never degrade into three identical stubs. */
.toolList {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  color: rgba(255, 215, 0, 0.6);
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cardMeta .envChip {
  white-space: nowrap;
  flex-shrink: 0;
}

/* "+N" tail on a capped tool list; hover the row for the full list. */
.chipList .moreChip {
  flex-shrink: 0;
  min-width: 0;
  color: var(--ifm-font-color-secondary);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.22);
}

.shaLink {
  color: rgba(96, 165, 250, 0.9);
  text-decoration: none;
}

.shaLink:hover {
  color: rgba(96, 165, 250, 1);
  text-decoration: none;
}

.installHint {
  margin-top: 0.65rem;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 215, 0, 0.06);
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.installHint code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: rgba(255, 215, 0, 0.7);
  background: none;
  padding: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copyBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.06);
  color: rgba(255, 215, 0, 0.85);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.copyBtn:hover {
  background: rgba(255, 215, 0, 0.14);
  color: rgba(255, 215, 0, 1);
}

.copyBtnLabel {
  line-height: 1;
}

.cardLinks {
  display: flex;
  gap: 0.5rem;
}

.cardLinks .docsLink {
  flex: 1;
}

.docsLink {
  display: block;
  margin-top: 0.65rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 5px;
  background: rgba(96, 165, 250, 0.06);
  color: rgba(96, 165, 250, 0.9);
  font-size: 0.78rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
}

.docsLink:hover {
  background: rgba(96, 165, 250, 0.12);
  color: rgba(96, 165, 250, 1);
  border-color: rgba(96, 165, 250, 0.35);
  text-decoration: none;
}

.highlight {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-radius: 2px;
  padding: 0 1px;
}

.loadingSpinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 1rem;
  border: 3px solid rgba(255, 215, 0, 0.15);
  border-top-color: rgba(255, 215, 0, 0.7);
  border-radius: 50%;
  animation: pluginsSpin 0.8s linear infinite;
}

@keyframes pluginsSpin {
  to {
    transform: rotate(360deg);
  }
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}

.emptyIcon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.emptyTitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ifm-font-color-base);
}

.emptyDesc {
  font-size: 0.85rem;
  color: var(--ifm-font-color-secondary);
  margin: 0 0 1.25rem;
  max-width: 480px;
  line-height: 1.6;
}

.emptyActions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.emptyCta {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  background: rgba(255, 215, 0, 0.06);
  color: #ffd700;
  text-decoration: none;
  transition: all 0.2s;
}

.emptyCta:hover {
  background: rgba(255, 215, 0, 0.12);
  color: #ffd700;
  text-decoration: none;
}

.emptyCtaSecondary {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.05);
  color: rgba(96, 165, 250, 0.9);
  text-decoration: none;
  transition: all 0.2s;
}

.emptyCtaSecondary:hover {
  background: rgba(96, 165, 250, 0.1);
  color: rgba(96, 165, 250, 1);
  text-decoration: none;
}

.emptyReset {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 6px;
  background: transparent;
  color: #ffd700;
  cursor: pointer;
  transition: all 0.2s;
}

.emptyReset:hover {
  background: rgba(255, 215, 0, 0.08);
}

.filterPanel {
  display: contents;
}

.controlsTopRow {
  display: contents;
}

.filterToggle,
.compactSelect {
  display: none;
}

@media (max-width: 1024px), (max-height: 800px) {
  .controlsBar {
    flex-direction: row;
    gap: 0.65rem;
    justify-content: center;
    padding: 0.55rem 1rem;
  }

  .controlsTopRow {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: min(100%, 1200px);
    min-width: 0;
  }

  .searchWrap {
    flex: 1 1 22rem;
    min-width: 8rem;
    max-width: none;
  }

  .searchInput {
    min-height: 44px;
  }

  .compactSelect {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    /* Hold the select's 7.5rem floor: without it the column shrinks below the
       select and the control overruns its neighbour. */
    min-width: 7.5rem;
    color: var(--ifm-color-emphasis-600);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .compactSelect select {
    height: 44px;
    max-width: 10.5rem;
    min-width: 7.5rem;
    padding: 0 1.9rem 0 0.65rem;
    border: 1px solid rgba(255, 215, 0, 0.14);
    border-radius: 8px;
    background: var(--ifm-background-surface-color);
    color: var(--ifm-font-color-base);
    font: 500 0.78rem "DM Sans", sans-serif;
  }

  [data-theme="light"] .compactSelect select {
    border-color: var(--ifm-color-emphasis-300);
  }

  .compactSort select { max-width: 11.5rem; }
  .filterPanel { display: none; }
}

/* Below ~820px the uppercase labels leave no room for the select's own value. */
@media (max-width: 820px) {
  .compactSelect > span { display: none; }
}

@media (max-width: 600px) {
  .controlsBar {
    display: contents;
  }

  .controlsTopRow {
    position: sticky;
    top: 60px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    background: var(--ifm-navbar-background-color);
    border-bottom: 1px solid var(--ifm-hr-border-color);
    backdrop-filter: blur(16px);
  }

  .searchWrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    width: 100%;
    padding: 0;
  }

  .filterToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding: 0 0.85rem;
    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.04);
    color: var(--ifm-font-color-base);
    font: 600 0.82rem "DM Sans", sans-serif;
  }

  .activeFilterCount {
    min-width: 1.25rem;
    border-radius: 999px;
    background: var(--ifm-color-emphasis-200);
    color: var(--ifm-font-color-base);
  }

  /* Gold accents are tuned for the dark theme; against the light surface the
     translucent gold borders are invisible. */
  [data-theme="light"] .controlsTopRow .filterToggle {
    border-color: var(--ifm-color-emphasis-300);
  }

  [data-theme="dark"] .activeFilterCount {
    background: rgba(255, 215, 0, 0.14);
    color: #ffd700;
  }

  .compactSelect { display: none; }

  .filterPanel.filterPanelOpen {
    display: block;
    margin: 0 0.75rem 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 10px;
    background: var(--ifm-background-surface-color);
    scroll-margin-top: 120px;
  }

  .filterPanelOpen .tierPills,
  .filterPanelOpen .categoryPills,
  .filterPanelOpen .sortPills {
    justify-content: flex-start;
  }

  .clearBtn {
    right: 0.25rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }

  .filterPanelOpen .tierBtn,
  .filterPanelOpen .categoryBtn {
    min-height: 44px;
  }

  .categoryHeader {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.5rem;
  }

  .categoryTitle,
  .categoryBlurb,
  .metaValue,
  .chipList {
    min-width: 0;
  }

  .envChip {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 2.5rem 1.25rem 1.75rem;
  }

  .heroTitle {
    font-size: 2rem;
  }


  .controlsBar {
    padding: 0.75rem 1rem;
  }

  .main {
    padding: 0.75rem 1rem 2rem;
  }

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


/* ── Picker embed mode (?embed=picker, iframed by the desktop app) ────── */

.pickerMode .hero {
  display: none;
}

.pickerMode {
  padding-top: 0.5rem;
}

/* The navbar is hidden in picker mode, so the sticky controls bar must pin
   to the frame top — its normal 60px navbar offset would float it over the
   first card row. */
.pickerMode .controlsBar,
.pickerMode .controlsTopRow {
  top: 0;
}

:global(html):has(.pickerMode) :global(.navbar),
:global(html):has(.pickerMode) :global(footer) {
  display: none;
}

.pickBtn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--ifm-color-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--ifm-color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pickBtn:hover {
  background: var(--ifm-color-primary);
  color: #fff;
  text-decoration: none;
}

a.pickBtn {
  text-align: center;
  text-decoration: none;
}

/* Card title doubles as the link to the plugin's own page. */
.cardTitleLink {
  color: inherit;
  text-decoration: none;
}

.cardTitleLink:hover,
.card:hover .cardTitleLink {
  color: var(--ifm-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dark-theme gold (#ffd700, 1.4:1 on white) and sky blue (#7dd3fc / #60a5fa)
   are unreadable on the light page. Text uses the theme's darker amber and a
   blue that clears WCAG AA; tints stay translucent versions of the same hues. */
[data-theme="light"] .heroLink,
[data-theme="light"] .heroLink:hover,
[data-theme="light"] .crossNavActive,
[data-theme="light"] .crossNavLink:hover,
[data-theme="light"] .emptyCta,
[data-theme="light"] .emptyCta:hover,
[data-theme="light"] .emptyReset,
[data-theme="light"] .emptyReset:hover,
[data-theme="light"] .installHint code {
  color: var(--ifm-color-primary-darker);
}

[data-theme="light"] .searchIcon {
  color: var(--ifm-color-primary);
}

[data-theme="light"] .searchInput {
  border-color: rgba(28, 30, 33, 0.18);
}

[data-theme="light"] .searchInput::placeholder {
  color: #525860;
  opacity: 1;
}

[data-theme="light"] .controlsBar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(28, 30, 33, 0.08);
}

[data-theme="light"] .tierBtn,
[data-theme="light"] .categoryBtn {
  color: #3c4043;
  border-color: rgba(28, 30, 33, 0.16);
}

/* Active rules below must stay after these: same specificity as :hover. */
[data-theme="light"] .tierBtn:hover,
[data-theme="light"] .categoryBtn:hover {
  border-color: rgba(28, 30, 33, 0.32);
  color: #1c1e21;
}

[data-theme="light"] .tierBtnActive,
[data-theme="light"] .tierBtnActive:hover {
  color: var(--pill-color, var(--ifm-color-primary-darker));
  border-color: var(--pill-border, rgba(110, 79, 0, 0.45));
  background: var(--pill-bg, rgba(110, 79, 0, 0.08));
}

[data-theme="light"] .sortBtnActive,
[data-theme="light"] .sortBtnActive:hover {
  color: var(--ifm-color-primary-darker);
  border-color: rgba(110, 79, 0, 0.45);
  background: rgba(110, 79, 0, 0.08);
}

[data-theme="light"] .categoryViewAll,
[data-theme="light"] .categoryViewAll:hover {
  color: #075985;
}

[data-theme="light"] .categoryBtnActive,
[data-theme="light"] .categoryBtnActive:hover {
  border-color: rgba(7, 89, 133, 0.55);
  background: rgba(7, 89, 133, 0.1);
  box-shadow: none;
  color: #075985;
}

[data-theme="light"] .categoryBtnActive .tierCount {
  background: rgba(7, 89, 133, 0.14);
  color: #075985;
}

[data-theme="light"] .categoryChip {
  border-color: rgba(7, 89, 133, 0.35);
  background: rgba(7, 89, 133, 0.08);
  color: #075985;
}

[data-theme="light"] .card {
  background: #fff;
  border-color: rgba(28, 30, 33, 0.12);
}

[data-theme="light"] .card:hover {
  border-color: rgba(110, 79, 0, 0.45);
  box-shadow: 0 4px 16px rgba(28, 30, 33, 0.06);
}

[data-theme="light"] .starPill,
[data-theme="light"] .starPill:hover {
  border-color: rgba(110, 79, 0, 0.35);
  background: rgba(110, 79, 0, 0.08);
  color: var(--ifm-color-primary-darker);
}

[data-theme="light"] .capChip,
[data-theme="light"] .toolList {
  color: var(--ifm-color-primary-darker);
}

[data-theme="light"] .envChip {
  border-color: rgba(110, 79, 0, 0.28);
  background: rgba(110, 79, 0, 0.06);
  color: var(--ifm-color-primary-darker);
}

[data-theme="light"] .cardDates,
[data-theme="light"] .sortLabel,
[data-theme="light"] .categoryBlurb,
[data-theme="light"] .metaLabel {
  color: #525860;
  opacity: 1;
}

[data-theme="light"] .shaLink,
[data-theme="light"] .shaLink:hover {
  color: var(--plugin-catalog-link);
}

[data-theme="light"] .docsLink,
[data-theme="light"] .emptyCtaSecondary {
  border-color: rgba(29, 78, 216, 0.35);
  background: rgba(29, 78, 216, 0.06);
  color: var(--plugin-catalog-link);
}

[data-theme="light"] .docsLink:hover,
[data-theme="light"] .emptyCtaSecondary:hover {
  color: #1e3a8a;
  border-color: rgba(30, 58, 138, 0.45);
  background: rgba(29, 78, 216, 0.1);
}

[data-theme="light"] .versionPill,
[data-theme="light"] .platformPill {
  border-color: rgba(29, 78, 216, 0.4);
  background: rgba(29, 78, 216, 0.08);
  color: var(--plugin-catalog-link);
}

[data-theme="light"] .installHint {
  background: rgba(110, 79, 0, 0.06);
  border-color: rgba(110, 79, 0, 0.22);
}

[data-theme="light"] .cardImage,
[data-theme="light"] .cardImagePlaceholder {
  border-bottom-color: rgba(28, 30, 33, 0.1);
}

[data-theme="light"] .chipList .moreChip {
  border-color: rgba(28, 30, 33, 0.35);
  color: #525860;
}

[data-theme="light"] .metaEmpty {
  opacity: 0.6;
}

[data-theme="light"] .copyBtn,
[data-theme="light"] .copyBtn:hover {
  border-color: rgba(110, 79, 0, 0.35);
  background: rgba(110, 79, 0, 0.08);
  color: var(--ifm-color-primary-darker);
}

[data-theme="light"] .copyBtn:hover {
  background: rgba(110, 79, 0, 0.16);
}

[data-theme="light"] .highlight {
  background: rgba(110, 79, 0, 0.15);
  color: var(--ifm-color-primary-darker);
}

[data-theme="light"] .filterPanelOpen {
  border-color: rgba(28, 30, 33, 0.12);
}
