:root {
  color-scheme: dark;
  --bg: #08090d;
  --bg-soft: #10121a;
  --panel: #151821;
  --panel-strong: #1d2230;
  --ink: #f7f7ff;
  --muted: #c2c6d4;
  --quiet: #858b9b;
  --line: rgba(247, 247, 255, 0.13);
  --line-strong: rgba(247, 247, 255, 0.25);
  --teal: #2df8e6;
  --teal-soft: rgba(45, 248, 230, 0.13);
  --violet: #b86cff;
  --violet-soft: rgba(184, 108, 255, 0.16);
  --magenta: #ff4fd8;
  --magenta-soft: rgba(255, 79, 216, 0.13);
  --green: #70ff9c;
  --green-soft: rgba(112, 255, 156, 0.13);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  --font-stack: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-stack);
  line-height: 1.5;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(184, 108, 255, 0.12), transparent 280px),
    linear-gradient(135deg, #08090d 0%, #0d1018 48%, #080d10 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(247, 247, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 247, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.site-header {
  padding: 8px 0 28px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
  color: var(--muted);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  color: var(--ink);
}

.brand-link::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 18px rgba(45, 248, 230, 0.55);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
}

.nav-links a,
.footer a {
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-links a:hover,
.footer a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-text {
  max-width: 690px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.button {
  padding: 0 18px;
  color: #ffffff;
  background: var(--violet);
  border: 1px solid transparent;
  box-shadow: 0 0 24px rgba(184, 108, 255, 0.24);
}

.button.secondary {
  color: var(--ink);
  background: rgba(247, 247, 255, 0.05);
  border-color: var(--line);
}

.button:hover,
.card-link:hover {
  transform: translateY(-2px);
}

.button.secondary:hover {
  border-color: var(--line-strong);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(45, 248, 230, 0.12), transparent 48%),
    linear-gradient(320deg, rgba(184, 108, 255, 0.18), transparent 56%),
    var(--panel);
  box-shadow: var(--shadow);
}

.panel-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.panel-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--quiet);
}

.panel-bar span:nth-child(1) {
  background: var(--magenta);
}

.panel-bar span:nth-child(2) {
  background: var(--violet);
}

.panel-bar span:nth-child(3) {
  background: var(--green);
}

.panel-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 9, 13, 0.64);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.panel-line span {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.panel-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-line::after {
  content: "->";
  color: var(--violet);
  font-family: var(--font-mono);
  font-weight: 900;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.panel-line:hover,
.panel-line:focus-visible {
  transform: translateX(4px);
  border-color: rgba(184, 108, 255, 0.58);
  background: rgba(184, 108, 255, 0.12);
}

.panel-line:hover::after,
.panel-line:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.panel-line.hot {
  border-color: rgba(184, 108, 255, 0.62);
  background: var(--violet-soft);
}

.panel-line.hot span {
  color: var(--violet);
}

.panel-line.ops {
  border-color: rgba(45, 248, 230, 0.32);
  background: rgba(45, 248, 230, 0.08);
}

.panel-line.ops span {
  color: var(--green);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.trust-strip div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 247, 255, 0.04);
}

.trust-strip dt {
  margin-bottom: 2px;
  font-size: 1.35rem;
  font-weight: 900;
}

.trust-strip dd {
  margin: 0;
  color: var(--quiet);
}

.catalog-controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 18px 0 10px;
  padding: 14px 0;
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(18px);
}

.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  color: var(--ink);
  background: rgba(247, 247, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--quiet);
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 248, 230, 0.12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-btn {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(247, 247, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: #ffffff;
  background: var(--violet);
  border-color: var(--violet);
}

.result-count {
  min-height: 24px;
  margin: 0 0 28px;
  color: var(--quiet);
  font-size: 0.94rem;
}

.tool-section {
  margin-top: 44px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 275px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 33, 0.78);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--panel);
}

.tool-card.spotlight {
  min-height: 248px;
  background:
    linear-gradient(135deg, rgba(45, 248, 230, 0.12), transparent 42%),
    var(--panel);
}

.featured-grid .tool-card {
  padding: 16px;
}

.featured-grid .card-meta {
  margin-bottom: 14px;
}

.featured-grid .tool-card h3 {
  margin-bottom: 9px;
  font-size: 1.15rem;
}

.featured-grid .tool-card p {
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.featured-grid .tech-badges {
  margin-bottom: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.tag,
.status-dot,
.tech-badges span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.tag {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.tag.dev {
  color: var(--teal);
  background: var(--teal-soft);
}

.tag.utility {
  color: var(--violet);
  background: var(--violet-soft);
}

.status-dot {
  min-height: 24px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(247, 247, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 0.72rem;
}

.status-dot.private {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(112, 255, 156, 0.25);
}

.tool-card h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.tool-card p {
  flex: 1;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.tech-badges span {
  min-height: 24px;
  padding: 0 8px;
  color: var(--quiet);
  background: rgba(8, 9, 13, 0.52);
  border: 1px solid var(--line);
  font-size: 0.72rem;
}

.card-link {
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(247, 247, 255, 0.06);
  border: 1px solid var(--line);
}

.card-link::after {
  content: "->";
  margin-left: 8px;
  color: var(--violet);
  font-family: var(--font-mono);
}

.card-link:hover {
  border-color: var(--teal);
  background: rgba(45, 248, 230, 0.1);
}

.empty-state {
  margin: 42px 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: var(--panel);
}

.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
}

.footer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.footer p {
  margin: 0;
}

.is-hidden,
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(184, 108, 255, 0.72);
  outline-offset: 3px;
}

::selection {
  color: #08090d;
  background: var(--teal);
}

@media (max-width: 980px) {
  .hero,
  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 560px;
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .tools-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 16px;
  }

  .top-nav,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    margin-bottom: 36px;
  }

  .nav-links {
    gap: 14px;
  }

  h1 {
    font-size: clamp(2.35rem, 14vw, 4.2rem);
  }

  .hero {
    gap: 28px;
  }

  .hero-panel {
    width: 100%;
  }

  .panel-line {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .trust-strip,
  .tools-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .catalog-controls {
    position: static;
  }

  .tool-card,
  .tool-card.spotlight {
    min-height: 0;
  }

}

@media print {
  body {
    color: #111;
    background: #fff;
  }

  body::before,
  .catalog-controls,
  .hero-actions {
    display: none;
  }

  .tool-card {
    border-color: #ccc;
    box-shadow: none;
  }
}
