:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-soft: #10100f;
  --panel: #141312;
  --panel-strong: #1a1815;
  --text: #f7f2e8;
  --muted: #a7a096;
  --faint: #736d64;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(245, 166, 35, 0.25);
  --amber: #f5a623;
  --amber-soft: rgba(245, 166, 35, 0.13);
  --green: #4ed99c;
  --blue: #67b7ff;
  --red: #ff7168;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.08), transparent 25rem),
    radial-gradient(circle at 80% 8%, rgba(103, 183, 255, 0.09), transparent 22rem),
    var(--bg);
  color: var(--text);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

.site-shell {
  position: relative;
  overflow: hidden;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(245, 166, 35, 0.11);
  transform: rotate(45deg);
}

.site-shell::before {
  top: -15rem;
  right: -7rem;
}

.site-shell::after {
  top: 18rem;
  left: -16rem;
}

.hero,
.directory,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 70vh;
  padding: 22px 0 58px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}

.brand,
.nav-links,
.hero-actions,
.meta-row,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  gap: 10px;
  color: #fff8ea;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--amber);
  color: #120d05;
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-links {
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-menu {
  position: relative;
}

.profile-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(20, 19, 18, 0.98);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.profile-menu-panel::before {
  content: "";
  position: absolute;
  inset: -12px 0 auto;
  height: 12px;
}

.profile-menu-panel a {
  display: block;
  padding: 9px 10px;
  color: #d9d0c3;
  white-space: nowrap;
}

.profile-menu-panel a:hover {
  background: var(--amber-soft);
}

.profile-menu:hover .profile-menu-panel,
.profile-menu:focus-within .profile-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-links a,
.footer-links a {
  transition: color 180ms ease;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: end;
  gap: 44px;
  padding-top: 80px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3.35rem, 8vw, 7.6rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 680px;
  color: #d3ccc2;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions {
  gap: 10px;
  margin-top: 30px;
}

.hero-actions span,
.meta-row span,
.status-badge,
.category-badge {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #e8dfd1;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.hero-actions span {
  padding: 9px 12px;
}

.privacy-panel {
  position: relative;
  min-height: 320px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(245, 166, 35, 0.12), transparent),
    rgba(20, 19, 18, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.privacy-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.privacy-panel p {
  position: relative;
  max-width: 320px;
  color: #f2e8da;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
}

.signal-grid {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  grid-template-columns: repeat(4, 26px);
  gap: 8px;
}

.signal-grid span {
  aspect-ratio: 1;
  border: 1px solid rgba(245, 166, 35, 0.22);
  background: rgba(245, 166, 35, 0.08);
}

.signal-grid span:nth-child(3n) {
  background: rgba(78, 217, 156, 0.1);
  border-color: rgba(78, 217, 156, 0.2);
}

.controls {
  position: sticky;
  top: 0;
  z-index: 10;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(18px);
}

.controls-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 16px;
  align-items: center;
  padding: 14px 0;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}

.filter-pill:hover {
  color: var(--text);
  border-color: rgba(245, 166, 35, 0.35);
}

.filter-pill.is-active {
  background: var(--amber);
  border-color: var(--amber);
  color: #120d05;
  font-weight: 800;
}

.search-box {
  position: relative;
  display: block;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: border-color 180ms ease, background 180ms ease;
}

.search-box input:focus {
  border-color: rgba(245, 166, 35, 0.55);
  background: rgba(255, 255, 255, 0.065);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--faint);
  border-radius: 50%;
  transform: translateY(-55%);
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: var(--faint);
  transform: rotate(45deg);
  transform-origin: left center;
}

.directory {
  padding: 60px 0 78px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: 620px;
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.04;
}

#result-count {
  color: var(--muted);
  white-space: nowrap;
}

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

.tool-card {
  position: relative;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 42%),
    var(--panel);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), transparent);
  opacity: 0;
  transition: opacity 220ms ease;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 166, 35, 0.24);
  background:
    linear-gradient(180deg, rgba(245, 166, 35, 0.055), transparent 44%),
    var(--panel-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.tool-card:hover::before {
  opacity: 1;
}

.lab-card {
  border-color: rgba(103, 183, 255, 0.18);
}

.internal-card {
  border-color: rgba(78, 217, 156, 0.17);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.category-badge,
.status-badge {
  padding: 7px 9px;
}

.category-badge {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(245, 166, 35, 0.18);
}

.status-badge.lab {
  color: var(--blue);
  border-color: rgba(103, 183, 255, 0.24);
  background: rgba(103, 183, 255, 0.09);
}

.status-badge.internal {
  color: var(--green);
  border-color: rgba(78, 217, 156, 0.22);
  background: rgba(78, 217, 156, 0.08);
}

.tool-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.22), transparent),
    rgba(255, 255, 255, 0.04);
  color: #ffe4ad;
  font-size: 0.86rem;
  font-weight: 800;
}

.tool-icon.img {
  background: linear-gradient(135deg, rgba(78, 217, 156, 0.2), transparent), rgba(255, 255, 255, 0.04);
  color: #c6ffe4;
}

.tool-icon.vid,
.tool-icon.ai,
.tool-icon.zoro {
  background: linear-gradient(135deg, rgba(103, 183, 255, 0.22), transparent), rgba(255, 255, 255, 0.04);
  color: #d3ecff;
}

.tool-icon.shield {
  background: linear-gradient(135deg, rgba(255, 113, 104, 0.2), transparent), rgba(255, 255, 255, 0.04);
  color: #ffd4d1;
}

.tool-icon.slate {
  background: linear-gradient(135deg, rgba(78, 217, 156, 0.18), rgba(245, 166, 35, 0.08)), rgba(255, 255, 255, 0.04);
  color: #defff0;
}

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

.tagline {
  min-height: 48px;
  margin-bottom: 14px;
  color: #e9dfcf;
  font-weight: 650;
  line-height: 1.45;
}

.description {
  color: var(--muted);
  line-height: 1.62;
}

.meta-row {
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

.meta-row span {
  padding: 6px 8px;
  color: #cfc6ba;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 18px;
  color: var(--amber);
  font-weight: 800;
}

.open-link span {
  transition: transform 180ms ease;
}

.open-link:hover span {
  transform: translateX(3px);
}

.empty-state {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer strong {
  color: var(--text);
}

.footer p {
  margin: 7px 0 0;
}

.footer-links {
  justify-content: flex-end;
  gap: 16px;
}

.footer-profile-menu .profile-menu-panel {
  top: auto;
  bottom: calc(100% + 10px);
}

.footer-profile-menu .profile-menu-panel::before {
  inset: auto 0 -12px;
}

.copyright {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.is-hidden {
  display: none;
}

.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;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 52px;
  }

  .privacy-panel {
    min-height: 260px;
  }

  .controls-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .hero,
  .directory,
  .footer,
  .controls-inner {
    width: min(100% - 24px, 1180px);
  }

  .topbar,
  .section-heading,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.5rem);
  }

  .privacy-panel {
    padding: 22px;
  }

  .privacy-panel p {
    font-size: 1.2rem;
  }

  .signal-grid {
    grid-template-columns: repeat(4, 18px);
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

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

  .tagline {
    min-height: 0;
  }

  .footer {
    display: flex;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
