:root {
  --paper: #FBFAF7;
  --ink: #171614;
  --soft: #6b6862;
  --line: #e4e1da;
  --accent: #1f4ef5;
  --font-head: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1160px, calc(100% - 44px)); margin: 0 auto; }

.hero {
  padding: clamp(40px, 7vw, 90px) 0 clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 85% -10%, hsl(174 70% 90%) 0%, transparent 60%),
    radial-gradient(700px 380px at 5% 0%, hsl(28 90% 92%) 0%, transparent 55%),
    var(--paper);
}

.brand {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 18px;
}

h1 {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
}

.blank {
  display: inline-block;
  min-width: 4.2ch;
  border-bottom: 5px solid var(--ink);
  color: var(--accent);
  white-space: nowrap;
}

.caret {
  display: inline-block;
  width: 3px;
  height: .85em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: -0.08em;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.lead { color: var(--soft); font-size: clamp(1rem, 1.6vw, 1.2rem); margin: 0 0 30px; max-width: 540px; }

.searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 6px 16px;
  max-width: 620px;
  box-shadow: 4px 4px 0 rgba(23, 22, 20, .08);
  transition: box-shadow .25s var(--ease);
}

.searchbar:focus-within { box-shadow: 4px 4px 0 var(--accent); }

.searchbar svg { width: 20px; height: 20px; flex: none; color: var(--soft); }

.searchbar input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 1.05rem;
  padding: 10px 0;
  background: none;
  min-width: 0;
}

.searchbar kbd {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.chip {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .86rem;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}

.chip:hover { border-color: var(--ink); transform: translateY(-1px); }

.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

main { padding: clamp(28px, 4vw, 48px) 0 20px; }

.group { margin-bottom: clamp(30px, 4vw, 44px); }

.group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.group-ic {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: hsl(var(--gh) 80% 92%);
  color: hsl(var(--gh) 70% 32%);
}

.group-ic svg { width: 20px; height: 20px; }

.group-head h2 {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.group-head .count {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: hsl(var(--gh) 70% 32%);
  background: hsl(var(--gh) 80% 93%);
  border-radius: 999px;
  padding: 2px 10px;
}

.group-head .rule {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, hsl(var(--gh) 75% 78%), transparent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}

.tile {
  --h: 200;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, hsl(var(--h) 75% 97%) 0%, #fff 55%);
  border: 1.5px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(to bottom, hsl(var(--h) 80% 58%), hsl(var(--h) 85% 45%));
}

.tile::after {
  content: "?";
  position: absolute;
  right: -12px;
  bottom: -34px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 7.5rem;
  line-height: 1;
  color: hsl(var(--h) 80% 55% / .08);
  pointer-events: none;
  transition: transform .3s var(--ease), color .3s var(--ease);
}

.tile:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--h) 70% 45%);
  box-shadow: 0 14px 30px -14px hsl(var(--h) 75% 45% / .45);
}

.tile:hover::after { transform: rotate(10deg) scale(1.06); color: hsl(var(--h) 80% 50% / .14); }

.tile > * { position: relative; z-index: 1; }

.tile::after { z-index: 0; }

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tile .cat-ic {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: hsl(var(--h) 80% 93%);
  color: hsl(var(--h) 75% 34%);
}

.tile .cat-ic svg { width: 16px; height: 16px; }

.tile .word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.tile .word em {
  font-style: normal;
  color: hsl(var(--h) 75% 40%);
}

.tile .desc { color: var(--soft); font-size: .88rem; flex: 1; }

.tile .credit {
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--soft);
  opacity: .85;
}

.tile .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--soft);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.tile .domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tile .go { transition: transform .25s var(--ease); flex: none; }

.tile:hover .go { transform: translateX(4px); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
}

.badge .dot { width: 7px; height: 7px; border-radius: 50%; }

.badge.live { color: #0d7a4f; border-color: #bfe3d2; background: #effaf4; }
.badge.live .dot { background: #17b877; animation: pulse 2.4s ease-in-out infinite; }
.badge.paused { color: #a05a00; border-color: #f0ddba; background: #fdf6e8; }
.badge.paused .dot { background: #e8a200; }
.badge.app { color: #4747c2; border-color: #d5d5f2; background: #f3f3fd; }
.badge.app .dot { background: #6a6ae0; }
.badge.wip { color: var(--soft); border-color: var(--line); background: var(--paper); }
.badge.wip .dot { background: #b9b5ac; }

@keyframes pulse { 50% { opacity: .35; } }

.tile.first-hit { border-color: var(--accent); box-shadow: 0 0 0 3px hsl(228 90% 60% / .18); }

.noresult { color: var(--soft); padding: 30px 4px; }

.wip-head {
  font-family: var(--font-head);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 46px 0 4px;
}

.wip-lead { color: var(--soft); margin: 0 0 18px; font-size: .95rem; }

.grid.wip .tile { background: transparent; border-style: dashed; }
.grid.wip .tile::before { opacity: .45; }
.grid.wip .tile .word { color: var(--soft); }
.grid.wip .tile .word em { color: hsl(var(--h) 35% 55%); }

footer { border-top: 1px solid var(--line); margin-top: 50px; }

.foot { padding: 28px 0 36px; color: var(--soft); font-size: .9rem; }

.foot p { margin: 0 0 8px; }

.foot .fine { font-size: .78rem; font-family: var(--font-mono); }

.foot a { color: inherit; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 640px) {
  .hero { padding-top: 34px; }
  .searchbar kbd { display: none; }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-right: -22px;
    padding-right: 22px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .group-head .rule { display: none; }
  .tile .word { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
