@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk.woff2) format("woff2"); font-weight: 300 700; font-display: swap }
@font-face { font-family: Silkscreen; src: url(fonts/silkscreen.woff2) format("woff2"); font-display: swap }

/* Colours follow the OS through light-dark(); [data-theme] only exists when the visitor overrides it. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#fff4dc, #14131c);
  --card: light-dark(#ffffff, #1f1e2b);
  --ink: light-dark(#17151f, #f3eee2);
  --muted: light-dark(#5d586b, #a9a4b8);
  --pop: #ffcc33;
  --shadow: light-dark(#17151f, #ff5c8a);
  --dots: light-dark(#17151f14, #ffffff10);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}
[data-theme=light] { color-scheme: light }
[data-theme=dark] { color-scheme: dark }
* { box-sizing: border-box; margin: 0 }
[hidden] { display: none !important }
body { background: var(--bg) radial-gradient(var(--dots) 1.2px, transparent 1.3px) 0 0 / 18px 18px; color: var(--ink); -webkit-font-smoothing: antialiased }
:focus-visible { outline: 3px solid var(--shadow); outline-offset: 3px }
.px { font-family: Silkscreen, ui-monospace, monospace; text-transform: uppercase; letter-spacing: .04em }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(12px, 3.5vw, 32px) }
.box { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--shadow) }

.top { display: flex; justify-content: space-between; align-items: center; padding-block: 14px }
.logo { color: inherit; text-decoration: none; display: flex; gap: 8px; align-items: center; font-size: 15px }
.logo i { width: 26px; height: 26px; background: var(--pop); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 2px 2px 0 var(--shadow); display: grid; place-items: center; font-style: normal; font-size: 13px; color: #17151f }
.tog { height: 38px; padding: 0 12px; cursor: pointer; color: var(--ink); font-size: 12px }
.tog:active, .chip:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow) }

.hero { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; padding: clamp(16px, 4vh, 36px) clamp(16px, 3vw, 32px); margin-block: 6px clamp(14px, 3vh, 26px); background: var(--pop); color: #17151f }
.hero h1 { font-size: clamp(28px, 5.4vw, 60px); line-height: 1; letter-spacing: -.03em; max-width: 15ch }
.hero p { margin-top: 10px; font-size: clamp(13px, 1.5vw, 16px); max-width: 46ch; line-height: 1.45 }
.stats { display: flex; gap: 10px }
.stat { background: #fff; border: 2px solid #17151f; border-radius: 10px; padding: 8px 12px; text-align: center; box-shadow: 3px 3px 0 #17151f }
.stat b { display: block; font-size: 24px } .stat span { font-size: 10px }

.bar { position: sticky; top: 8px; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 8px; margin-bottom: 18px }
.bar input { flex: 0 0 min(240px, 36%); height: 38px; border: 2px solid var(--ink); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; padding: 0 12px }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 2px 6px 6px 2px }
.chip { flex: none; display: inline-flex; align-items: center; text-decoration: none; height: 34px; padding: 0 11px; border: 2px solid var(--ink); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 2px 2px 0 var(--shadow) }
.chip span { font-family: Silkscreen, monospace; font-size: 10px; margin-left: 4px; opacity: .7 }
.chip[aria-current] { background: var(--ink); color: var(--bg) }

.sec h2 { font-size: 14px; margin: 0 0 14px 2px } .sec h2 span { color: var(--muted) }
.sec + .sec { margin-top: 8px }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 44vw), 1fr)); gap: clamp(12px, 2.2vw, 24px); padding-bottom: 48px }
.card { text-decoration: none; color: inherit; display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s }
.card img { width: 100%; height: auto; aspect-ratio: 630/500; display: block; object-fit: cover; border-bottom: 2px solid var(--ink); background: var(--dots) }
.card .m { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1 }
.card .tag { font-size: 10px; color: var(--muted) }
.card h3 { font-size: 16px; line-height: 1.15; letter-spacing: -.01em }
.card p { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
@media (hover: hover) { .card:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 8px 8px 0 var(--shadow) } }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none } }

@media (max-width: 560px) {
  .stats, .hero p { display: none } .bar { flex-wrap: wrap } .bar input { flex: 1 0 100% }
  .card h3 { font-size: 13.5px } .card p { display: none } .card .m { padding: 8px 9px 10px }
}
@media (max-width: 420px) { .hero { padding-block: 14px } .hero h1 { font-size: 24px } }
@media (max-height: 520px) and (orientation: landscape) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) } .card p, .hero p { display: none }
  .hero { padding-block: 10px; margin-bottom: 10px } .hero h1 { font-size: 24px } .stat b { font-size: 16px }
}
.empty { padding: 50px 0; text-align: center }
footer { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 32px }
.lost { min-height: 100dvh; display: grid; place-content: center; gap: 18px; text-align: center; padding: 20px }
.lost a { color: inherit; padding: 10px 16px; text-decoration: none; justify-self: center }
