/* Look taken from aquiltersnotion.com: Lato, white ground, blush bands, rosewood pill buttons. */
:root {
  --bg: #ffffff;
  --band: #fae7e5;
  --surface: #ffffff;
  --ink: #0d141a;
  --heading: #1d1e20;
  --muted: #56585e;
  --line: #e0e0e0;
  --accent: #7a4e4e;
  --accent-ink: #ffffff;
  --card: 200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Lato, "Helvetica Neue", Arial, sans-serif;
}

button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto; padding: 30px 40px;
}
.logo img { display: block; width: 97px; height: 97px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.site-header nav a { color: var(--ink); text-decoration: none; padding: 2px 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { border-bottom-color: var(--ink); }

.hero { background: var(--band); text-align: center; padding: 56px 16px; }
.hero h1 { margin: 0 0 12px; color: var(--heading); font-size: clamp(32px, 5vw, 48px); font-weight: 700; line-height: 1.2; }
.hero p { margin: 0 auto; max-width: 56ch; color: var(--muted); }

.toolbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.search { flex: 1 1 240px; max-width: 380px; }
.search input, .designer select {
  width: 100%; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 50px; background: var(--surface);
}
.designer { flex: 0 1 260px; }

.segmented { display: flex; border: 1px solid var(--line); border-radius: 50px; overflow: hidden; background: var(--surface); }
.segmented button { border: 0; background: none; padding: 9px 16px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.size { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.size input { accent-color: var(--accent); }

.chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 20px 16px 12px; max-width: 1240px; margin: 0 auto;
}
.chips button {
  border: 1px solid var(--line); background: var(--surface);
  padding: 8px 18px; border-radius: 50px; cursor: pointer;
}
.chips button:hover { border-color: var(--accent); }
.chips button span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.chips button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips button[aria-pressed="true"] span { color: #ecdcdc; }

main { max-width: 1600px; margin: 0 auto; padding: 0 16px 60px; }
.status { color: var(--muted); font-size: 14px; margin: 4px 0 16px; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--card), 100%), 1fr));
}

.card {
  display: block; width: 100%; padding: 0; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.card:hover, .card:focus-visible { box-shadow: 0 6px 20px rgba(13, 20, 26, .12); transform: translateY(-2px); border-color: var(--accent); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 210 / 190; object-fit: contain; background: #fff; padding: 10px; }
.card .label { display: block; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.card .name { display: block; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.card .cat { display: block; font-size: 13px; color: var(--muted); }
.badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 50px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; vertical-align: 1px;
}

.more { text-align: center; padding: 28px 0 0; }
.more button {
  border: 0; border-radius: 50px; padding: 14px 36px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-size: 14px;
}

.site-footer { background: var(--band); padding: 36px 16px; text-align: center; color: var(--muted); }
.site-footer p { margin: 0 auto 10px; max-width: 90ch; }
.site-footer a { color: var(--accent); }
.fine-print { font-size: 12px; line-height: 1.5; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The source pictures are 210 x 190, so the enlarged view stops at three times that to stay clear. */
dialog {
  border: 0; border-radius: 12px; padding: 0; background: var(--surface); color: var(--ink);
  width: min(94vw, 780px); max-height: 94vh;
}
dialog::backdrop { background: rgba(13, 20, 26, .75); }
dialog figure { margin: 0; padding: 24px 68px 20px; text-align: center; }
dialog img { display: block; margin: 0 auto; width: 100%; max-width: 630px; max-height: 70vh; aspect-ratio: 210 / 190; object-fit: contain; background: #fff; }
dialog figcaption { padding-top: 12px; }
dialog figcaption strong { display: block; font-size: 22px; font-weight: 700; color: var(--heading); overflow-wrap: anywhere; }
dialog figcaption span { color: var(--muted); font-size: 14px; }
dialog button {
  position: absolute; border: 0; background: var(--band); cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1;
}
dialog button:hover { background: var(--accent); color: var(--accent-ink); }
dialog .close { top: 10px; right: 10px; }
dialog .nav { top: 50%; transform: translateY(-50%); }
dialog .prev { left: 10px; }
dialog .next { right: 10px; }

@media (max-width: 600px) {
  .site-header { padding: 16px; justify-content: center; }
  .logo img { width: 64px; height: 64px; }
  .site-header nav { justify-content: center; gap: 6px 20px; }
  .hero { padding: 36px 16px; }
  .toolbar { position: static; }
  .designer { flex: 1 1 100%; }
  .grid { gap: 10px; grid-template-columns: repeat(2, 1fr); }
  dialog figure { padding: 60px 12px 70px; }
  dialog .nav { top: auto; bottom: 12px; transform: none; }
  .size { display: none; }
  :root { --card: 140px; }
}
