/* ---------------- Self-hosted Inter (variable 400-800, latin + latin-ext) ---------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-var.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   Nexoralist — design system modelled on the nexora.tools layout
   Dark-first, variable driven, 1280px container
   ========================================================================== */

:root,
[data-theme='dark'] {
  --bg-page: #09090b;
  --bg-elevated: #0e0e10;
  --bg-surface: #16161a;
  --bg-inset: #27272a;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #63636e;
  --border: hsla(0, 0%, 100%, 0.06);
  --border-strong: hsla(0, 0%, 100%, 0.11);
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-secondary: #c084fc;
  --accent-subtle: rgba(129, 140, 248, 0.07);
  --nav-bg: rgba(9, 9, 11, 0);
  --nav-bg-scrolled: rgba(9, 9, 11, 0.88);
  --card-bg: #111114;
  --card-border: hsla(0, 0%, 100%, 0.06);
  --card-hover-border: rgba(129, 140, 248, 0.35);
  --card-hover-shadow: 0 8px 30px rgba(129, 140, 248, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --badge-ai-bg: rgba(129, 140, 248, 0.12);
  --badge-ai-color: #a5b4fc;
  --badge-free-bg: rgba(52, 211, 153, 0.1);
  --badge-free-color: #6ee7b7;
  --badge-paid-bg: rgba(251, 191, 36, 0.1);
  --badge-paid-color: #fcd34d;
  --trend-color: #34d399;
  --logo-dot: #818cf8;
  --hero-glow: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(129, 140, 248, 0.1) 0%, transparent 70%);
  --grid-line: hsla(0, 0%, 100%, 0.025);
  --error: #f87171;
  --success: #34d399;
}

[data-theme='light'] {
  --bg-page: #ffffff;
  --bg-elevated: #f8f8f9;
  --bg-surface: #f0f0f2;
  --bg-inset: #e4e4e7;
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-secondary: #a855f7;
  --accent-subtle: rgba(99, 102, 241, 0.07);
  --nav-bg: hsla(0, 0%, 100%, 0);
  --nav-bg-scrolled: hsla(0, 0%, 100%, 0.88);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --card-hover-border: rgba(99, 102, 241, 0.45);
  --card-hover-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --badge-ai-bg: rgba(99, 102, 241, 0.09);
  --badge-ai-color: #4f46e5;
  --badge-free-bg: rgba(16, 185, 129, 0.09);
  --badge-free-color: #059669;
  --badge-paid-bg: rgba(245, 158, 11, 0.12);
  --badge-paid-color: #b45309;
  --trend-color: #10b981;
  --logo-dot: #6366f1;
  --hero-glow: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.13) 0%, transparent 70%);
  --grid-line: rgba(0, 0, 0, 0.04);
  --error: #dc2626;
  --success: #059669;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent-subtle);
  color: var(--accent);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-inset);
  border-radius: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------- Layout ---------------- */
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main {
  flex: 1;
}

/* ---------------- Navbar ---------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: var(--nav-bg-scrolled);
  border-bottom-color: var(--border);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}

.logomark-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.logomark-grid {
  flex-shrink: 0;
  display: block;
  width: 21px;
  height: 21px;
}

.logomark-grid rect {
  fill: var(--logo-dot);
  transition: opacity 0.25s;
}

.logomark-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--text-primary);
  line-height: 1;
}

.logomark-dot {
  color: var(--accent);
  transition: color 0.3s;
}

.logomark-suffix {
  font-weight: 400;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #a855f7);
  box-shadow: 0 2px 14px rgba(99, 102, 241, 0.3), inset 0 1px 0 hsla(0, 0%, 100%, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.4);
}

.nav-cta svg {
  width: 13px;
  height: 13px;
}

.hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* mobile drawer */
.drawer {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px 22px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.drawer.open {
  display: flex;
}

.drawer .nav-link {
  font-size: 15px;
  padding: 13px 12px;
  border-radius: 10px;
}

.drawer-cta {
  margin-top: 10px;
  justify-content: center;
  height: 44px;
  font-size: 14px;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 148px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  background-image: radial-gradient(circle, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 10%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 10%, #000 30%, transparent 80%);
}

.hero::after {
  background: var(--hero-glow);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--accent) 0, var(--accent-secondary) 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  margin: 0 auto 40px;
  max-width: 500px;
  line-height: 1.6;
}

/* search */
.search-wrapper {
  max-width: 580px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 10;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: text;
}

.search-bar.focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-md);
}

.search-bar > svg {
  color: var(--text-muted);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  line-height: 1;
}

.search-animated-placeholder {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.search-animated-placeholder.hidden {
  display: none;
}

.typing-cursor {
  display: inline-block;
  width: 1.5px;
  height: 17px;
  background: var(--accent);
  margin-left: 1px;
  border-radius: 1px;
  animation: blink 1s step-end infinite;
}

.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.trust-number {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.trust-dot {
  opacity: 0.3;
  font-size: 10px;
}

/* ---------------- Ad slot ---------------- */
.ad-slot {
  max-width: 1280px;
  margin: 0 auto 36px;
  padding: 0 24px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  width: 100%;
  height: 100px;
}

.ad-placeholder-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ---------------- Category pills ---------------- */
.category-pills-wrapper {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
}

.category-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.category-pill {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid transparent;
  transition: all 0.18s;
  white-space: nowrap;
  cursor: pointer;
}

.category-pill:hover {
  color: var(--text-primary);
  background: var(--bg-inset);
}

.category-pill.active {
  color: #fff;
  background: var(--accent);
  font-weight: 600;
}

/* ---------------- Tool grid ---------------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tool-card {
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: block;
  position: relative;
  overflow: hidden;
  animation: cardIn 0.32s ease-out both;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-subtle) 0, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  border-radius: inherit;
}

.tool-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-3px);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.tool-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
}

.badge-ai {
  background: var(--badge-ai-bg);
  color: var(--badge-ai-color);
}

.badge-free {
  background: var(--badge-free-bg);
  color: var(--badge-free-color);
}

.badge-paid {
  background: var(--badge-paid-bg);
  color: var(--badge-paid-color);
}

.tool-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.tool-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.tool-cat svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.8;
}

/* ---------------- Section headers ---------------- */
.section-header {
  margin-bottom: 32px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--trend-color);
  padding: 3px 9px;
  background: var(--badge-free-bg);
  border-radius: 999px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--trend-color);
  animation: livePulse 2s ease-in-out infinite;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.text-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}

.text-link:hover {
  gap: 8px;
}

.text-link svg {
  width: 14px;
  height: 14px;
}

/* ---------------- Popular / trending ---------------- */
.popular-section {
  padding: 72px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.popular-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.popular-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.popular-rank {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 26px;
  opacity: 0.35;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.popular-icon-wrapper {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.popular-info {
  flex: 1;
  min-width: 0;
}

.popular-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.popular-trend {
  color: var(--trend-color);
  font-weight: 600;
}

/* ---------------- Features / why ---------------- */
.why-section {
  padding: 72px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.feature-card {
  padding: 28px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.7;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------------- Inner page hero ---------------- */
.page-hero {
  position: relative;
  padding: 130px 24px 44px;
  overflow: hidden;
}

.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.page-hero::before {
  background-image: radial-gradient(circle, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 25%, transparent 80%);
}

.page-hero::after {
  background: var(--hero-glow);
}

.page-hero > .section-container {
  position: relative;
  z-index: 1;
}

.page-hero-inner {
  max-width: 760px;
}

.page-hero h1 {
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin: 10px 0 14px;
  text-wrap: balance;
}

.page-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------------- Toolbar (tools page) ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.toolbar .search-wrapper {
  flex: 1;
  min-width: 240px;
  max-width: none;
  margin: 0;
}

.toolbar .search-bar {
  height: 46px;
  border-radius: 12px;
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
}

.toolbar .search-input {
  font-size: 14px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  height: 46px;
  padding: 0 38px 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--card-bg);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, color 0.2s;
}

.select-wrap select:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.select-wrap svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  pointer-events: none;
  color: var(--text-muted);
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.result-bar b {
  color: var(--text-primary);
  font-weight: 600;
}

.tools-section {
  padding: 8px 0 72px;
}

.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-inset);
  transform: translateY(-1px);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #a855f7);
  box-shadow: 0 2px 14px rgba(99, 102, 241, 0.3), inset 0 1px 0 hsla(0, 0%, 100%, 0.12);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #a855f7);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 15px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
}

.empty h3 {
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty p {
  font-size: 13.5px;
  margin-bottom: 20px;
}

/* ---------------- Categories page ---------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cat-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-subtle) 0, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  border-radius: inherit;
}

.cat-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-3px);
}

.cat-card:hover::before {
  opacity: 1;
}

.cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.cat-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.cat-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.cat-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.cat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.cat-meta .count {
  color: var(--accent);
  font-weight: 600;
}

/* ---------------- Tool detail ---------------- */
.detail-wrap {
  padding: 24px 0 80px;
}

.detail-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.detail-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.detail-head h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.detail-tagline {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.55;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.detail-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.prose h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.72;
  margin-bottom: 12px;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.feature-list li {
  display: flex;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid var(--card-border);
  border-radius: 11px;
  background: var(--card-bg);
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-list .fi {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--badge-free-bg);
  color: var(--badge-free-color);
  margin-top: 1px;
}

.feature-list .fi svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.side-card {
  padding: 22px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  position: sticky;
  top: 80px;
}

.side-card + .side-card {
  margin-top: 12px;
  position: static;
}

.side-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.spec-list {
  display: grid;
  gap: 11px;
  margin-bottom: 18px;
}

.spec-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.spec-list dt {
  color: var(--text-muted);
}

.spec-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.related-section {
  padding: 48px 0 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

/* ---------------- Forms ---------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
  padding: 8px 0 80px;
}

.form-card {
  padding: 28px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
}

.form-card h2 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.form-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field label .req {
  color: var(--accent);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-page);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  color: var(--text-primary);
}

.field textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2363636e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.field .err {
  font-size: 11.5px;
  color: var(--error);
  display: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
}

.field.has-error .err {
  display: block;
}

.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

.consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex: none;
}

.consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.form-success {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: var(--badge-free-bg);
  border: 1px solid rgba(52, 211, 153, 0.25);
  margin-bottom: 18px;
}

.form-success.show {
  display: flex;
}

.form-success .ok {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  color: #04120c;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}

.form-success .ok svg {
  width: 12px;
  height: 12px;
  stroke-width: 3.5;
}

.form-success strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 3px;
  color: var(--text-primary);
}

.form-success p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.info-stack {
  display: grid;
  gap: 12px;
}

.info-card {
  display: flex;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  transition: border-color 0.2s, transform 0.2s;
}

.info-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-subtle);
  color: var(--accent);
  flex: none;
}

.info-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.info-card h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.info-card p,
.info-card a {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

.info-card a:hover {
  color: var(--accent);
}

/* ---------------- FAQ ---------------- */
.faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--border-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.22s;
  line-height: 1;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------------- About ---------------- */
.about-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.about-visual {
  position: relative;
  aspect-ratio: 4 / 3.4;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.about-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(129, 140, 248, 0.35), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(192, 132, 252, 0.28), transparent 55%);
}

.about-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}

.about-visual .mark-lg {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 10px;
}

.about-visual .mark-lg i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--logo-dot);
  display: block;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.stats-strip div {
  padding: 22px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stats-strip div:last-child {
  border-right: 0;
}

.stats-strip strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stats-strip span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.value-card {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
}

.value-card .n {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.value-card h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 7px;
}

.value-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.prose-block p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
}

/* ---------------- CTA band ---------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  padding: 48px 40px;
  text-align: center;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(129, 140, 248, 0.14), transparent 70%);
  pointer-events: none;
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.cta-band p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logomark-text {
  font-size: 16px;
}

.footer-brand p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 14px 0 16px;
  max-width: 280px;
}

.footer-col-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.footer-col-list {
  display: grid;
  gap: 9px;
}

.footer-col-link {
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: color 0.18s;
}

.footer-col-link:hover {
  color: var(--text-primary);
}

.footer-friends {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-friends-label {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-friends a {
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-friends a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted);
}

.footer-bottom nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-bottom a:hover {
  color: var(--text-primary);
}

.footer-email {
  color: var(--text-secondary);
}

.footer-email:hover {
  color: var(--accent);
}

/* ---------------- Reveal ---------------- */
.reveal {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Only hide when JS is confirmed active, so no-JS visitors still see content */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------------- Animations ---------------- */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; row-gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .hero { padding: 120px 20px 64px; }
  .category-pills-wrapper { padding: 0 20px; }
  .section-container { padding: 0 20px; }
  .popular-section, .why-section { padding: 56px 0; }
  .detail-body { grid-template-columns: 1fr; gap: 28px; }
  .side-card { position: static; }
  .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta.desktop-only { display: none; }
  .hamburger { display: flex; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .about-visual { order: -1; max-width: 460px; }
  .value-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip div:nth-child(2) { border-right: 0; }
  .stats-strip div:nth-child(1), .stats-strip div:nth-child(2) { border-bottom: 1px solid var(--border); }
  .page-hero { padding: 108px 20px 36px; }
}

@media (max-width: 860px) {
  .hero { padding: 110px 20px 56px; }
  .hero-title { letter-spacing: -0.04em; }
  .hero-subtitle { font-size: 15px; margin-bottom: 32px; }
  .search-wrapper { max-width: 100%; width: 100%; padding: 0; }
  .search-bar { height: 50px; width: 100%; }
  .trust-strip { gap: 8px; font-size: 12px; }
  .popular-section, .why-section { padding: 48px 0; }
  .section-title { font-size: 22px; }
  .ad-slot { padding: 0 20px; }
}

@media (max-width: 768px) {
  .hero { padding: 100px 16px 48px; }
  .category-pills-wrapper { padding: 0 16px; margin-bottom: 20px; }
  .section-container { padding: 0 16px; }
  .ad-slot { padding: 0 16px; margin-bottom: 28px; }
  .footer-top { padding: 40px 16px 32px; grid-template-columns: 1fr 1fr; }
  .footer-bottom { padding: 16px 16px 22px; }
  .detail-head { flex-direction: column; gap: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .page-hero { padding: 100px 16px 32px; }
}

@media (max-width: 640px) {
  .hero { padding: 88px 16px 40px; }
  .hero-title { font-size: clamp(36px, 9vw, 48px); letter-spacing: -0.04em; line-height: 1.05; }
  .hero-subtitle { font-size: 14px; margin-bottom: 28px; max-width: 100%; }
  .hero-eyebrow { font-size: 11px; padding: 4px 12px; margin-bottom: 16px; }
  .search-wrapper { margin-bottom: 24px; width: 100%; }
  .search-bar { height: 48px; padding: 0 14px; border-radius: 14px; gap: 10px; }
  .search-input { font-size: 16px; }
  .search-animated-placeholder { font-size: 14px; }
  .trust-strip { font-size: 11px; gap: 6px; }
  .trust-dot { display: none; }
  .category-pill { padding: 6px 14px; font-size: 12px; }
  .category-pills-wrapper { padding: 0 12px; }
  .category-pills { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .category-pills::-webkit-scrollbar { display: none; }
  .tool-card { padding: 14px; }
  .tool-name { font-size: 13px; }
  .tool-desc { font-size: 12px; }
  .popular-section, .why-section { padding: 40px 0; }
  .section-title { font-size: 20px; }
  .feature-card { padding: 22px; }
  .cta-band { padding: 32px 20px; }
  .cat-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .hero { padding: 84px 14px 36px; }
  .section-container { padding: 0 14px; }
  .section-title { font-size: 18px; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .ad-placeholder { height: 80px; }
}

@media (max-width: 390px) {
  .hero { padding: 80px 12px 32px; }
  .hero-title { font-size: clamp(30px, 8vw, 40px); }
  .search-bar { height: 46px; padding: 0 12px; }
  .trust-strip { font-size: 10px; gap: 4px; }
  .category-pills-wrapper { padding: 0 10px; }
  .tool-card { padding: 12px 14px; }
}

/* ---------------- Additions used by the rebuilt pages ---------------- */
.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;
}

.section-block {
  padding-bottom: 72px;
}

.category-pills.left {
  justify-content: flex-start;
  scrollbar-width: none;
}

.category-pills.left::-webkit-scrollbar {
  display: none;
}

.pill-count {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.category-pill.active .pill-count {
  opacity: 0.85;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 11px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.chip button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
}

.chip button:hover {
  color: var(--text-primary);
}

.tool-card:focus-visible,
.cat-card:focus-visible,
.popular-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.detail-body .prose ul {
  margin-top: 6px;
}

.stars {
  color: var(--badge-paid-color);
  letter-spacing: 0.06em;
}

.footer-brand .logomark-link {
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  .category-pills.left {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .result-bar {
    font-size: 12px;
  }
}

/* ---------------- Page-level additions ---------------- */
.detail-page {
  padding-top: 100px;
  padding-bottom: 80px;
}

.consent {
  font-weight: 400;
}

.prose-block h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.side-card .btn-block + .btn-block {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .detail-page {
    padding-top: 88px;
    padding-bottom: 56px;
  }
}

/* ---------------- Ad slot refinement ---------------- */
.ad-placeholder {
  height: 84px;
  gap: 12px;
  padding: 0 20px;
  flex-wrap: wrap;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.ad-placeholder:hover {
  border-color: var(--card-hover-border);
  background: var(--bg-elevated);
}

.ad-placeholder-label {
  opacity: 0.45;
}

.ad-placeholder-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.2s;
}

.ad-placeholder-link:hover {
  color: var(--accent-secondary);
}

@media (max-width: 480px) {
  .ad-placeholder {
    height: 76px;
    gap: 6px;
    flex-direction: column;
    justify-content: center;
  }
}

/* ---------------- Polish pass ---------------- */
.field label.consent {
  font-weight: 400;
}

.detail-body .prose {
  max-width: 70ch;
}

@media (max-width: 640px) {
  .trust-dot {
    display: inline;
    opacity: 0.35;
  }

  .trust-strip {
    gap: 7px;
    row-gap: 3px;
  }

  .toolbar .select-wrap {
    flex: 1;
    min-width: 0;
  }

  .toolbar .select-wrap select {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-card {
    padding: 14px;
  }

  .tool-badge {
    font-size: 9px;
    padding: 2px 6px;
  }
}

@media (max-width: 360px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Card alignment + toolbar wrap fix ---------------- */
.tool-card {
  display: flex;
  flex-direction: column;
}

.tool-card .tool-cat {
  margin-top: auto;
  padding-top: 10px;
}

.cat-card {
  display: flex;
  flex-direction: column;
}

.cat-card .cat-meta {
  margin-top: auto;
}

@media (max-width: 640px) {
  .toolbar .select-wrap {
    flex: 1 1 auto;
    min-width: 132px;
  }
}
