:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #17202a;
  --muted: #5d6978;
  --line: #d8dee8;
  --accent: #0f7b6c;
  --accent-strong: #09594e;
  --focus: #c9552f;
  --shadow: 0 14px 34px rgba(36, 48, 66, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #edf2f7 0, rgba(237, 242, 247, 0) 280px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: end;
  padding: 24px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.meta-panel {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.meta-label,
#updatedAt {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#totalCount {
  display: block;
  margin: 6px 0 14px;
  font-size: 44px;
  line-height: 1;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 16px 0;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(14px);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search-box input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(201, 85, 47, 0.16);
}

.result-summary {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0 22px;
}

.category-tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.category-tab strong {
  font-size: 12px;
}

.category-tab[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.plugin-grid {
  display: grid;
  gap: 34px;
}

.category-section {
  scroll-margin-top: 150px;
}

.category-heading {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.category-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.category-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.plugin-card {
  display: grid;
  grid-template-rows: 68px auto auto auto;
  gap: 14px;
  min-height: 292px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(36, 48, 66, 0.05);
}

.card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow: hidden;
}

.plugin-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #ffffff;
  font-weight: 800;
}

.plugin-icon img {
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
}

.plugin-icon img[src^="assets/logos/"] {
  width: 42px;
  height: 42px;
  max-width: none;
  max-height: none;
  border-radius: 8px;
}

.plugin-title {
  min-width: 0;
}

.plugin-title h2 {
  display: -webkit-box;
  max-height: 44px;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.new-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(201, 85, 47, 0.12);
  color: var(--focus);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  vertical-align: 2px;
}

.developer {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description-block {
  position: relative;
  align-self: start;
  min-height: 116px;
}

.description {
  display: -webkit-box;
  max-height: 116px;
  margin: 0;
  overflow: hidden;
  color: #273240;
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

.description-block.has-overflow::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 44px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    var(--surface) 76%
  );
  content: "";
  pointer-events: none;
}

.description-block.is-expanded::after {
  display: none;
}

.description-block.is-expanded .description {
  display: block;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.description-toggle {
  position: absolute;
  right: 0;
  bottom: -2px;
  z-index: 1;
  min-height: 28px;
  padding: 0 0 0 18px;
  border: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    var(--surface) 24%
  );
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.description-toggle:hover {
  text-decoration: underline;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  align-self: end;
}

.card-actions a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.card-actions a:hover {
  text-decoration: underline;
}

.empty-state {
  margin-top: 24px;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.site-footer p {
  max-width: 920px;
  margin: 0;
}

.site-footer p + p {
  margin-top: 8px;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 750;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .hero,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .meta-panel {
    min-height: auto;
  }

  .result-summary {
    white-space: normal;
  }
}
