:root {
  --bg: #e5e5e5;
  --bg-soft: #eef4ff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 32%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.header {
  width: 100%;
  background-color: white;
  text-align: center;
  padding: .5rem 0;
  font-weight: 900;
  font-size: 24px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat {
  padding: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
  line-height: 1.45;
}

#logo-browser {
  margin-top: 18px;
  scroll-margin-top: 90px;
}

.toolbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-top: 18px;
  padding: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

.toolbar__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  flex: 1 1 360px;
  min-width: 0;
}

.field label,
.toolbar__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 5px;
  padding: 14px 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.field input::placeholder {
  color: #94a3b8;
}

.field input:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.reset:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.filter:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--text);
}

.filter[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 6px 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.results-meta #search-help {
  max-width: 56ch;
  font-size: 0.88rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 5px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  scroll-margin-top: 110px;
  max-width: 306.5px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.card__preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 22px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.card__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.08));
}

.card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.90);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 18px;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge--brand {
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
}

.badge--soft {
  background: #f1f5f9;
  color: var(--muted);
}

.card h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  min-height: 46px;
  padding: 13px 16px;
  border-radius: 5px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.download:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.30);
}

.download svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty {
  margin-top: 18px;
  padding: 34px 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.80);
  border: 1px dashed rgba(37, 99, 235, 0.18);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.empty h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.empty p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.empty .download {
  width: auto;
  max-width: 260px;
  margin: 0 auto;
}

.footer-note {
  margin: 24px 8px 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.footer-note code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

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

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1280px);
    padding: 12px 0 40px;
  }

  .toolbar {
    top: 10px;
    border-radius: 5px;
    padding: 14px;
  }

  .reset {
    width: 100%;
  }

  .card {
    min-width: 100%;
  }

  .card__preview {
    min-height: 180px;
  }

  .results-meta {
    margin-inline: 2px;
  }
}