:root {
  --bg: #0B0C0F;
  --surface: #13151A;
  --surface-2: #1A1D23;
  --line: #262A31;
  --ink: #ECEDEF;
  --muted: #9BA1AB;
  --accent: #34D399;
  --accent-ink: #052E1F;
  --accent-soft: rgba(52, 211, 153, 0.1);
  --skill: #34D399;
  --repo: #818CF8;
  --grade: rgba(255, 255, 255, 0.045);
  --radius: 16px;
  --display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F6F7F9;
    --surface: #FFFFFF;
    --surface-2: #F0F2F5;
    --line: #E1E4EA;
    --ink: #14161A;
    --muted: #5B616B;
    --accent: #047857;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(4, 120, 87, 0.08);
    --skill: #047857;
    --repo: #4F46E5;
    --grade: rgba(0, 0, 0, 0.05);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.container { max-width: 72rem; margin: 0 auto; padding-inline: 1.25rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topo-linha { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.marca {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
  text-decoration: none;
}
.marca-icone { width: 1.9rem; height: 1.9rem; flex-shrink: 0; }
.nav { display: flex; gap: 0.15rem; }
.nav a {
  font-size: 0.9rem; color: var(--muted); text-decoration: none;
  padding: 0.4rem 0.65rem; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 26rem) { .nav-catalogo { display: none; } }

/* Hero */
.hero-area { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-area::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grade) 1px, transparent 1px),
    linear-gradient(90deg, var(--grade) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 0%, #000 35%, transparent 100%);
}
.hero { position: relative; text-align: center; padding-block: clamp(3.5rem, 9vw, 6.5rem); }
h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.035em;
  max-width: 18ch; margin: 0 auto 1.1rem; text-wrap: balance;
}
.lead { color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.15rem); max-width: 40rem; margin: 0 auto; }
.hero-acoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* Botões e links */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 0.7rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
}
.botao:hover { filter: brightness(1.08); }
.botao--contorno { background: transparent; color: var(--ink); border-color: var(--line); }
.botao--contorno:hover { background: var(--surface-2); filter: none; }
.link { font-size: 0.9rem; color: var(--muted); text-underline-offset: 3px; }
.link:hover { color: var(--ink); }

/* Catálogo */
.catalogo { padding-block: 3.5rem 2rem; }
.catalogo-topo {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}
h2 { font-family: var(--display); font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.2; }
.contagem { color: var(--muted); font-size: 0.9rem; }

.filtros { display: grid; gap: 0.85rem; margin-bottom: 1.5rem; }
.busca {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding-inline: 0.9rem;
}
.busca:focus-within { border-color: var(--accent); }
.busca svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; color: var(--muted); }
.busca input {
  flex: 1; min-width: 0; padding-block: 0.8rem;
  font: inherit; color: var(--ink); background: transparent; border: 0; outline: 0;
}
.grupo { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.grupo button {
  font: inherit; font-size: 0.85rem; color: var(--muted); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.grupo button:hover { color: var(--ink); border-color: var(--muted); }
.grupo button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.grade { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }

.item {
  display: flex; flex-direction: column; gap: 0.8rem; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem;
}
.item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.item-topo { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tipo {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.15rem 0.55rem; border-radius: 6px;
}
.tipo--skill { color: var(--skill); background: color-mix(in srgb, var(--skill) 14%, transparent); }
.tipo--repositorio { color: var(--repo); background: color-mix(in srgb, var(--repo) 14%, transparent); }
.categoria { font-size: 0.8rem; color: var(--muted); }
.item-nome { font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.25; }
.item-nome a { text-decoration: none; }
.item-nome a:hover { text-decoration: underline; text-underline-offset: 3px; }
.item-cabeca { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.item-cabeca .item-nome { min-width: 0; }
.estrelas {
  --estrela: #FBBF24;
  display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0; margin-top: 0.2rem;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 0.12rem 0.5rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.estrelas svg { width: 0.85rem; height: 0.85rem; color: var(--estrela); }
.estrelas:hover { border-color: var(--estrela); }
@media (prefers-color-scheme: light) { .estrelas { --estrela: #B45309; } }
.nota { margin-top: 1.25rem; text-align: center; font-size: 0.8rem; color: var(--muted); }
.item-origem { margin-top: -0.5rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.item-desc { font-size: 0.95rem; }

.bloco-rotulo {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.35rem;
}
.porque {
  font-size: 0.9rem; padding: 0.7rem 0.9rem;
  background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}
.porque .bloco-rotulo { color: var(--accent); }
.instalar-topo { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.instalar-topo .bloco-rotulo { margin-bottom: 0; }
.codigo {
  padding: 0.7rem 0.85rem;
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.copiar {
  font: inherit; font-size: 0.75rem; color: var(--muted); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 0.15rem 0.55rem;
}
.copiar:hover { color: var(--ink); }
.agentes { font-size: 0.82rem; color: var(--muted); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; padding-top: 0.2rem; }
.tags li { font-size: 0.75rem; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 0.12rem 0.5rem; }

.vazio { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.vazio button, .vazio a { font: inherit; color: var(--accent); background: none; border: 0; text-decoration: underline; cursor: pointer; }

/* Sugerir */
.sugerir { padding-block: 2rem 4rem; }
.sugerir-caixa {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.sugerir-caixa h2 { max-width: 30ch; margin-bottom: 1rem; }
.passos { display: grid; gap: 0.5rem; padding-left: 1.2rem; color: var(--muted); }
.passos strong { color: var(--ink); font-weight: 600; }
.sugerir-acoes { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }

/* Rodapé */
.rodape {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 1.5rem 3rem; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--muted);
}
.rodape a { color: var(--ink); }
