:root {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #16323b;
  background: #f2f6f5;
  line-height: 1.5;
  font-synthesis: none;
  --teal: #08746d;
  --border: #d5e1e1;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1550px; padding: 30px 34px 38px; margin: auto; }
h1 { margin: 0; font-size: 29px; line-height: 1.3; }
.muted { color: #506970; font-size: 14px; }
.intro { margin: 9px 0 0; }
header {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
  padding: 25px;
}
.heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.total { color: var(--teal); font-weight: 650; font-size: 15px; white-space: nowrap; padding-top: 5px; }
.filters { display: flex; align-items: end; gap: 12px; margin: 24px 0 17px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.filters label span { font-size: 13px; color: #506970; }
.filters .search { flex: 1; min-width: min(100%, 300px); }
input, select, button {
  font: inherit;
  min-height: 42px;
  color: inherit;
  padding: 10px 14px;
  border: 1px solid #c6d4d4;
  border-radius: 8px;
  background: white;
}
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:hover:not(:disabled) { border-color: var(--teal); }
:focus-visible { outline: 3px solid #148d84; outline-offset: 2px; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; }
.categories button { font-size: 14px; min-height: 37px; padding: 7px 12px; }
.categories .active { background: var(--teal); border-color: var(--teal); color: white; }
.results-bar { margin: 20px 0 13px; }
.results-bar p { margin: 0; font-size: 14px; color: #38575f; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr));
  gap: 15px;
}
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.picture { display: block; background: #eaf0ef; }
.card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.info h2 { font-size: 15px; line-height: 1.7; margin: 0 0 8px; font-weight: 620; overflow-wrap: anywhere; }
.info p { margin: 5px 0; font-size: 13px; overflow-wrap: anywhere; }
.info .tag { color: var(--teal); }
.info .metadata { color: #63797d; }
.info .source-link { color: #376468; text-underline-offset: 3px; }
.rights { color: #78572f; }
.actions { display: flex; align-items: center; gap: 12px; padding-top: 14px; margin-top: auto; font-size: 13px; }
.download { display: inline-flex; align-items: center; min-height: 38px; background: var(--teal); color: white; text-decoration: none; padding: 8px 14px; border-radius: 7px; font-weight: 600; }
.download:hover { background: #055d57; }
.empty { padding: 38px; background: white; border: 1px solid var(--border); border-radius: 10px; color: #526c70; text-align: center; grid-column: 1 / -1; }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; padding: 25px 0 4px; }
.pager[hidden] { display: none; }
.pager input { width: 68px; }
.pager label { display: flex; align-items: center; gap: 5px; font-size: 14px; }
.pager span { padding: 0 9px; }
@media (max-width: 650px) {
  main { padding: 14px 12px 30px; }
  header { padding: 17px; }
  h1 { font-size: 23px; }
  .heading { flex-wrap: wrap; gap: 7px; }
  .filters label { min-width: 130px; }
  .filters .search { flex-basis: 100%; }
  .filters label:not(.search) { flex: 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
  .card .info { padding: 11px; }
}
