main { max-width: 1120px; margin: 0 auto; padding: 8rem 2rem 5rem; }

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.75rem; }

.page-desc { color: var(--muted); font-size: 0.95rem; max-width: 66ch; margin-bottom: 2rem; }
.page-desc a { color: var(--accent); text-decoration: none; }
.page-desc a:hover { text-decoration: underline; }
.page-desc strong { color: var(--text); font-weight: 500; }

/* BUSCA */
.searchwrap {
  position: sticky;
  top: 63px;
  z-index: 5;
  background: var(--bg);
  padding: 0.75rem 0 1rem;
}

#search {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

#search:focus { border-color: var(--accent); }
#search::placeholder { color: rgba(136,136,136,0.5); }

.meta-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ATALHOS DE CATEGORIA */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.navbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s;
}

.navbtn:hover { border-color: var(--border-hover); }
.navbtn:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.navcode { font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: 0.04em; }
.navbtn .count { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* CATEGORIAS */
.cat { margin: 2.5rem 0; scroll-margin-top: 11rem; }

.cat h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 400;
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.cat-desc { color: var(--muted); font-size: 0.9rem; max-width: 80ch; margin-bottom: 1rem; }

.catcode {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(255, 107, 43, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.badge { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }

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

.card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.1s;
}

.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.card-name { font-size: 13px; font-weight: 400; line-height: 1.4; }
.card-domain { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }

.hidden { display: none !important; }

#empty {
  display: none;
  text-align: center;
  padding: 3rem 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 600px) {
  main { padding: 7rem 1.25rem 4rem; }
  .nav-links { display: none; }
  .searchwrap { top: 61px; }
  .cat { scroll-margin-top: 13.5rem; }
}
