/* Download page */
.downloads-main { width: var(--container); margin: 0 auto 24px; padding: 24px 34px 0; }
.download-hero { display: block; width: var(--inner); min-height: 124px; margin: 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: #fff; }
.download-hero-inner { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: center; gap: 24px; min-height: 124px; padding: 24px 28px; }
.download-copy { grid-column: 1 / -1; }
.download-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.download-search { position: relative; width: 280px; height: 36px; border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; }
.download-search [data-icon] { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #94a3b8; }
.download-search input { padding-left: 34px; }
.download-result-summary { margin: 0 24px 14px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fafafa; color: #334155; font-size: 14px; font-weight: 700; }
.download-grid { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0 24px; }
.download-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 116px 88px; align-items: center; column-gap: 16px; min-height: 112px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.download-card:last-child { border-bottom: 0; }
.download-card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: #f8fafc; color: var(--blue); }
.download-card > div { grid-column: 2; min-width: 0; }
.download-card strong { display: block; margin: 0 0 8px; font-size: 17px; line-height: 1.35; font-weight: 800; }
.download-card p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.download-card em { display: inline-flex; align-items: center; height: 22px; margin-right: 6px; padding: 0 8px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted); background: #fafafa; font-size: 12px; font-style: normal; font-weight: 700; }
.download-card button, .download-card .collect-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 36px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.download-card button[data-download-resource] { grid-column: 3; border: 1px solid var(--blue); color: #fff; background: var(--blue); }
.download-card button[data-save-resource], .download-card .collect-link { grid-column: 4; border: 1px solid var(--line); color: #334155; background: #fff; }
.download-card a.collect-link { display: none; }
.download-card button [data-icon] { width: 15px; height: 15px; color: currentColor; }
.download-pager { margin: 20px 24px 28px; }

/* Download empty state polish */
.download-grid .download-inline-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.download-grid .download-inline-notice strong {
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.download-grid .download-inline-notice a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  background: #fff;
  color: #1269f3;
  font-size: 13px;
  line-height: 30px;
  font-weight: 800;
  white-space: nowrap;
}

.download-grid .download-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 20px;
  border: 1px solid #e3ebf5;
  border-radius: 8px;
  background: #fff;
}

.download-grid .download-empty-main {
  min-width: 0;
}

.download-grid .download-empty-main strong {
  display: block;
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.download-grid .download-empty-main p {
  max-width: 680px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.download-grid .download-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.download-grid .download-empty-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  color: #2563eb;
  font-size: 14px;
  line-height: 34px;
  font-weight: 800;
}

.download-grid .download-empty-actions a.primary {
  border-color: #1269f3;
  background: #1269f3;
  color: #fff;
}

/* Download file type badge */
.download-grid .download-card-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #1269f3;
  color: #fff;
  mask: none;
  -webkit-mask: none;
  box-shadow: none;
}

.download-grid .download-card-icon::before {
  content: none;
}

.download-grid .download-card-icon[data-icon]::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
}

.download-grid .download-card-icon em {
  display: none;
}

@media (max-width: 640px) {
  .download-grid .download-inline-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-grid .download-empty {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }
}

/* Downloads page focused polish */
.page-downloads-hub .downloads-main {
  padding-top: 22px;
  padding-bottom: 28px;
}

.page-downloads-hub .download-hero,
.page-downloads-hub .download-content {
  width: var(--inner);
  border-color: #dbe5f1;
  background: #fff;
}

.page-downloads-hub .download-hero {
  border-radius: 8px 8px 0 0;
}

.page-downloads-hub .download-hero-inner {
  min-height: 112px;
  padding: 24px 28px;
}

.page-downloads-hub .download-copy {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.page-downloads-hub .download-copy h1 {
  font-size: 24px;
}

.page-downloads-hub .download-copy p {
  max-width: 760px;
  color: #52647a;
  font-size: 14px;
}

.page-downloads-hub .download-content {
  padding: 0;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.page-downloads-hub .download-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  width: auto;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid #e8eef6;
  background: #fff;
}

.page-downloads-hub .download-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.page-downloads-hub .download-filter a,
.page-downloads-hub .download-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 30px;
  font-weight: 800;
  white-space: nowrap;
}

.page-downloads-hub .download-filter a.active,
.page-downloads-hub .download-filter button.active {
  border-color: #1269f3;
  background: #eff6ff;
  color: #1269f3;
}

.page-downloads-hub .download-search {
  align-self: start;
  width: 100%;
  height: 36px;
  border-color: #d8e2ee;
  border-radius: 8px;
}

.page-downloads-hub .download-search input {
  height: 34px;
  padding-right: 12px;
  font-size: 13px;
}

.page-downloads-hub .download-result-summary {
  margin: 16px 22px 0;
  border-color: #dbe7f5;
  background: #f8fbff;
}

.page-downloads-hub .download-grid {
  display: grid;
  gap: 10px;
  padding: 18px 22px 22px;
}

.page-downloads-hub .download-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 1px solid #e3ebf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.page-downloads-hub .download-card:hover {
  border-color: #c7dcf5;
  background: #fbfdff;
}

.page-downloads-hub .download-card-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #1269f3;
  color: #fff;
  mask: none;
  -webkit-mask: none;
  box-shadow: none;
}

.page-downloads-hub .download-card-icon::before {
  content: none;
}

.page-downloads-hub .download-card-icon[data-icon]::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
}

.page-downloads-hub .download-card-icon em {
  display: none;
}

.page-downloads-hub .download-card-main {
  min-width: 0;
}

.page-downloads-hub .download-card strong {
  display: block;
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.page-downloads-hub .download-card p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.page-downloads-hub .download-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.page-downloads-hub .download-card-meta em {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 22px;
  font-style: normal;
  font-weight: 700;
}

.page-downloads-hub .download-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-self: center;
  justify-self: stretch;
}

.page-downloads-hub .download-card .member-primary-action,
.page-downloads-hub .download-card button[data-download-resource] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #1269f3;
  border-radius: 8px;
  background: #1269f3;
  color: #fff;
  font-size: 13px;
  line-height: 36px;
  font-weight: 800;
  white-space: nowrap;
}

.page-downloads-hub .download-card .collect-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  color: #2563eb;
  font-size: 13px;
  line-height: 32px;
  font-weight: 800;
  white-space: nowrap;
}

.page-downloads-hub .download-card [data-icon]:not(.download-card-icon) {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.page-downloads-hub .download-grid .download-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 22px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.page-downloads-hub .download-pager {
  margin: 0;
  padding: 0 22px 24px;
}

@media (max-width: 860px) {
  .page-downloads-hub .download-copy,
  .page-downloads-hub .download-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-downloads-hub .download-card {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: start;
  }

  .page-downloads-hub .download-card-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page-downloads-hub .downloads-main {
    padding: 16px 12px 24px;
  }

  .page-downloads-hub .download-hero-inner,
  .page-downloads-hub .download-toolbar,
  .page-downloads-hub .download-grid,
  .page-downloads-hub .download-pager {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-downloads-hub .download-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-downloads-hub .download-card-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
