:root {
  color-scheme: dark;
  --bg: #050814;
  --bg-2: #080d1d;
  --surface: rgba(12, 18, 35, 0.78);
  --surface-solid: #0e162b;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(125, 92, 255, 0.42);
  --text: #edf4ff;
  --muted: #9aa7bd;
  --faint: #64748b;
  --primary: #7c3aed;
  --primary-2: #2563eb;
  --cyan: #06b6d4;
  --green: #14e7a4;
  --amber: #f59e0b;
  --danger: #fb7185;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --shadow: 0 28px 95px rgba(0, 0, 0, 0.46);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8ff;
  --bg-2: #eaf1ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: rgba(15, 23, 42, 0.055);
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(37, 99, 235, 0.32);
  --text: #0f172a;
  --muted: #526079;
  --faint: #748096;
  --shadow: 0 28px 80px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 14%, rgba(37, 99, 235, 0.22), transparent 34%),
    radial-gradient(circle at 85% 2%, rgba(124, 58, 237, 0.24), transparent 35%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  z-index: -2;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  cursor: pointer;
}

#networkCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.ambient {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
  animation: floatGlow 12s ease-in-out infinite;
}

.ambient-one {
  left: -120px;
  top: 18%;
  background: var(--primary-2);
}

.ambient-two {
  right: -140px;
  bottom: 8%;
  background: var(--primary);
  animation-delay: -4s;
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(28px,-18px,0) scale(1.1); }
}

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

.site-header {
  width: min(1220px, calc(100% - 36px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(8, 13, 29, 0.6);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
  position: sticky;
  top: 16px;
  z-index: 40;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  letter-spacing: -0.04em;
  font-size: 1.08rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.74rem;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.nav-tab,
.theme-toggle,
.mobile-menu {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.nav-tab:hover,
.nav-tab.active,
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(6, 182, 212, 0.08));
  transform: translateY(-1px);
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.theme-toggle {
  justify-self: end;
  min-width: 74px;
}

.mobile-menu {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  justify-self: end;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.page-shell {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 52px 0 44px;
}

.section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  text-align: center;
  padding: clamp(42px, 7vw, 84px) 18px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 10% -34% 10%;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 72%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #c7d2fe;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .87rem;
  font-weight: 700;
  margin-bottom: 20px;
}

[data-theme="light"] .hero-badge {
  color: #4c1d95;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(20, 231, 164, 0.5);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 12px rgba(20, 231, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 231, 164, 0); }
}

.hero h1 {
  max-width: 850px;
  margin: 0 auto 18px;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.hero h1 span {
  background: linear-gradient(110deg, #60a5fa, #a78bfa 42%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 690px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.search-panel {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 22px 80px rgba(37, 99, 235, 0.16);
}

.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 15px 16px;
  font-size: 1rem;
}

.search-panel input::placeholder {
  color: var(--faint);
}

.search-panel button,
.primary-btn,
.btn-card-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-2), var(--primary), var(--cyan));
  border-radius: 16px;
  padding: 0 22px;
  min-height: 50px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
  transition: transform .2s ease, filter .2s ease;
}

.search-panel button:hover,
.primary-btn:hover,
.btn-card-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.quick-searches {
  width: min(780px, 100%);
  margin: 18px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.quick-searches button,
.filter-chip,
.text-action,
.soft-btn,
.page-btn,
.tag {
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 999px;
}

.quick-searches button,
.filter-chip {
  padding: 8px 12px;
  font-size: .88rem;
  transition: all .2s ease;
}

.quick-searches button:hover,
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(124, 58, 237, 0.16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 18px 0 42px;
}

.stat-card {
  padding: 20px;
  min-height: 112px;
  display: grid;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--primary-2), var(--cyan));
}

.stat-card strong {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
}

.stat-card span {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 4px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: end;
  margin: 34px 0 16px;
}

.section-heading h2 {
  margin: 4px 0 0;
  letter-spacing: -0.045em;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-kicker {
  margin: 0;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 900;
}

.split {
  justify-content: space-between;
}

.section-note,
.result-count {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.text-action {
  padding: 9px 13px;
  font-weight: 800;
}

.text-action:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.text-action.danger:hover {
  border-color: rgba(251, 113, 133, 0.48);
  color: var(--danger);
}

.feature-card {
  min-height: 290px;
  border: 1px solid rgba(124, 58, 237, 0.38);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(124, 58, 237, 0.16), rgba(6, 182, 212, 0.08)),
    var(--surface);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -100px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 68%);
}

.feature-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
}

.feature-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255,255,255,0.075);
  color: #dbeafe;
  font-weight: 800;
  font-size: .82rem;
}

.feature-title {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.07em;
  margin: 18px 0 12px;
}

.feature-title span {
  color: #93c5fd;
}

.feature-description {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
}

.feature-actions,
.card-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-metrics {
  display: grid;
  grid-template-columns: repeat(3, 132px);
  gap: 10px;
}

.metric-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  padding: 18px;
}

.metric-box strong {
  display: block;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.metric-box span {
  color: var(--muted);
  font-size: .78rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.category-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  padding: 18px;
  min-height: 132px;
  text-align: left;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 95px;
  background: radial-gradient(circle, var(--cat-color), transparent 70%);
  opacity: .14;
}

.category-card:hover,
.category-card.active {
  transform: translateY(-3px);
  border-color: var(--cat-color);
}

.category-icon,
.tool-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  color: #fff;
  background: linear-gradient(135deg, var(--cat-color, var(--primary)), rgba(6, 182, 212, 0.84));
  box-shadow: 0 16px 30px color-mix(in srgb, var(--cat-color, var(--primary)) 20%, transparent);
}

.category-card strong {
  display: block;
  margin-top: 14px;
  letter-spacing: -0.02em;
}

.category-card span:last-child {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: .84rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sort-label {
  color: var(--muted);
  font-size: .86rem;
}

.sort-select {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  padding: 18px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

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

.tool-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--tool-color) 65%, var(--border));
  box-shadow: 0 22px 65px rgba(0,0,0,.22);
}

.tool-top {
  display: flex;
  gap: 12px;
  align-items: start;
}

.tool-avatar {
  --cat-color: var(--tool-color);
  flex: 0 0 auto;
  font-size: .98rem;
  letter-spacing: -0.04em;
}

.tool-title-wrap {
  min-width: 0;
  flex: 1;
}

.tool-title-wrap h3 {
  margin: 2px 0 5px;
  letter-spacing: -0.035em;
  font-size: 1.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-category-line {
  color: var(--muted);
  font-size: .82rem;
}

.badge-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge-row {
  justify-content: flex-end;
  max-width: 110px;
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .04em;
}

.badge.hot { color: #fecaca; border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.1); }
.badge.new { color: #bfdbfe; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.1); }
.badge.free { color: #bbf7d0; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.1); }
.badge.pro { color: #fde68a; border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.1); }

.tool-description {
  color: var(--muted);
  line-height: 1.62;
  font-size: .92rem;
  flex: 1;
  margin: 14px 0;
}

.tag-row {
  margin: 4px 0 16px;
}

.tag {
  padding: 5px 8px;
  font-size: .72rem;
}

.tool-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: auto;
}

.rating-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .86rem;
}

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

.card-actions button,
.soft-btn {
  min-height: 40px;
  padding: 0 12px;
  font-weight: 850;
  border-radius: 14px;
}

.soft-btn,
.btn-card-soft {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.btn-card-soft {
  min-height: 40px;
  padding: 0 12px;
  font-weight: 850;
  border-radius: 14px;
}

.soft-btn:hover,
.btn-card-soft:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-card-primary {
  min-height: 40px;
  border-radius: 14px;
  padding: 0 14px;
}

.pagination {
  margin: 28px 0 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 900;
}

.page-btn.active,
.page-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(124, 58, 237, 0.16);
}

.trend-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.trend-strip::-webkit-scrollbar {
  display: none;
}

.trend-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  border-radius: 16px;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.trend-pill span:first-child {
  color: var(--faint);
  font-weight: 950;
}

.empty-state {
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  border-radius: 26px;
  padding: 44px 22px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: 7px;
}

.compare-note {
  margin-top: -6px;
  margin-bottom: 18px;
}

.compare-table {
  display: grid;
  grid-template-columns: 160px repeat(var(--compare-count), minmax(180px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.compare-cell,
.compare-head {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  min-width: 0;
}

.compare-head {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 150px;
}

.compare-label {
  color: var(--muted);
  font-weight: 900;
  background: var(--surface-soft);
}

.compare-head h3 {
  margin: 10px 0 3px;
  letter-spacing: -0.03em;
}

.compare-head p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
  z-index: 90;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: min(680px, 100%);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1.4rem;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 42px;
}

.modal-avatar {
  width: 68px;
  height: 68px;
  font-size: 1.35rem;
}

.modal-head h2 {
  margin: 5px 0 0;
  letter-spacing: -0.05em;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.modal-description {
  color: var(--muted);
  line-height: 1.72;
  margin: 22px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.detail-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
}

.detail-item span {
  color: var(--muted);
  display: block;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
}

.detail-item strong {
  display: block;
  margin-top: 5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 120px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, opacity .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer {
  width: min(1220px, calc(100% - 36px));
  margin: 4px auto 36px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  color: var(--muted);
}

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

.site-footer p {
  margin: 0;
  line-height: 1.55;
}

.site-footer small {
  grid-column: 1 / -1;
  color: var(--faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: auto auto auto;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }

  .nav-tabs.open {
    display: flex;
  }

  .nav-tab {
    width: 100%;
  }

  .feature-layout {
    grid-template-columns: 1fr;
  }

  .feature-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .sort-label {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .site-header,
  .page-shell,
  .site-footer {
    width: min(100% - 24px, 1220px);
  }

  .brand-copy small {
    display: none;
  }

  .theme-toggle {
    min-width: 62px;
    padding-inline: 10px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .search-panel button {
    width: 100%;
  }

  .stats-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .feature-metrics {
    grid-template-columns: 1fr;
  }

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

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

  .compare-table {
    grid-template-columns: 130px repeat(var(--compare-count), 220px);
  }
}

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

  #networkCanvas {
    display: none;
  }
}
