:root {
  --bg: #0b0f17;
  --surface: #121826;
  --surface-elevated: #172033;
  --border: #243047;
  --text: #eef2f8;
  --text-muted: #9aa7bd;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --pro: #f59e0b;
  --free: #10b981;
  --ref: #818cf8;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top right, #152238 0%, var(--bg) 48%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), #6366f1);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.header-nav a {
  color: var(--text-muted);
}

.header-nav a:hover {
  color: var(--text);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  max-width: 72ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.controls-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-input,
.tier-select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.72rem 0.95rem;
  font-size: 0.96rem;
}

.search-input:focus,
.tier-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pill-btn.active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #04101c;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.reset-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.reset-btn:hover {
  border-color: var(--accent);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.55);
}

.tool-card.featured {
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.98) 0%, var(--surface) 100%);
  border-color: rgba(56, 189, 248, 0.34);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-pro {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-reference {
  background: rgba(129, 140, 248, 0.16);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.price-tag {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.tool-title {
  margin: 0 0 0.45rem;
  font-size: 1.07rem;
  line-height: 1.35;
}

.tool-category {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.tool-desc {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.91rem;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(36, 48, 71, 0.75);
}

.privacy-flag {
  font-size: 0.78rem;
  color: #34d399;
}

.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
}

.visit-btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #04101c;
  text-decoration: none;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.submit-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.submit-banner h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.submit-banner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.cta-btn {
  display: inline-block;
  background: var(--accent-strong);
  color: #04101c;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.cta-btn:hover {
  background: var(--accent);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.disclaimer-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fde68a;
  border-radius: 9px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.86rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

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

@media (max-width: 680px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
