:root {
  font: 16px/1.5 system-ui, sans-serif;
  color: #202422;
  background: #f5f4ef;
  --line: #d4d8d0;
  --accent: #285840;
  --muted: #505a52;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 25px 32px; background: white; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 28px; letter-spacing: -1px; }
p { margin: 5px 0; color: var(--muted); }
.eyebrow { margin: 0 0 3px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.total { max-width: 250px; text-align: right; font-size: 14px; }
main { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 24px 32px; }
aside { align-self: start; }
label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 5px; }
input, select, button { font: inherit; border: 1px solid var(--line); border-radius: 6px; background: white; color: inherit; min-height: 44px; padding: 8px 12px; }
input, select { width: 100%; }
.field { margin-bottom: 16px; min-width: 0; }
button { cursor: pointer; }
button:hover { background: #e6eee8; }
button:disabled, select:disabled, input:disabled { opacity: .55; cursor: default; }
button[aria-pressed="true"] { background: #e6eee8; border-color: var(--accent); color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#results { min-width: 0; }
#message { color: var(--accent); min-height: 24px; overflow-wrap: anywhere; }
nav { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0 20px; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-actions label { margin: 0 0 0 4px; }
#page { width: 84px; }
#count { font-size: 14px; }
#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: white; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-width: 0; }
.preview { display: block; background: #e9e7df; }
.preview img { display: block; width: 100%; height: 190px; object-fit: contain; }
.info { padding: 12px; }
.name { font-size: 14px; overflow-wrap: anywhere; font-weight: 650; margin: 0; color: inherit; }
.meta { font-size: 12px; color: var(--muted); margin: 6px 0; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { font-size: 13px; padding: 6px 9px; }
.catalog-notes { font-size: 13px; }
.catalog-notes p { margin: 12px 0; }
.empty { grid-column: 1 / -1; padding: 32px; border: 1px dashed var(--line); }
.error { padding: 16px; border: 1px solid #aa5144; border-radius: 6px; background: #fff3ef; }
.error p { color: #84372c; margin: 0 0 12px; }
a { color: var(--accent); }
.skip-link { position: absolute; left: 12px; top: -100px; padding: 12px; background: white; z-index: 1; }
.skip-link:focus { top: 12px; }
@media (max-width: 760px) {
  main { grid-template-columns: 1fr; padding: 16px; }
  header { padding: 20px; align-items: start; }
  .total { max-width: 170px; }
  aside { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .catalog-notes { grid-column: 1 / -1; }
  #grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview img { height: 160px; }
}
@media (max-width: 430px) {
  header { display: block; }
  .total { text-align: left; max-width: none; margin-top: 12px; }
  #grid { grid-template-columns: 1fr; }
  .preview img { height: 210px; }
  aside { gap: 0 12px; }
}
