/* MustUseAI — playful, vibrant, human design system. No frameworks, pure CSS. */
:root {
  --bg: #fffdf8;
  --surface: #ffffff;
  --ink: #26224a;
  --muted: #6f6a85;
  --border: #f1eaf7;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --amber: #f59e0b;
  --teal: #14b8a6;
  --rose: #f43f5e;
  --grad: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 48%, #ec4899 100%);
  --grad-warm: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
  --grad-cool: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --radius: 22px;
  --shadow: 0 12px 32px rgba(124, 58, 237, 0.1);
  --shadow-hover: 0 22px 50px rgba(124, 58, 237, 0.22);
  --font-head: "Nunito", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--ink); }
a { color: #6d28d9; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { font-family: var(--font-head); font-weight: 900; font-size: 1.35rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 12px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; font-weight: 900;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.45);
  transition: transform 0.25s;
}
.logo:hover .logo-mark { transform: rotate(-10deg) scale(1.06); }
.nav-links { display: flex; gap: 2px; margin-left: 6px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 9px 13px; border-radius: 999px; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: #f6effc; text-decoration: none; }
.nav-search { margin-left: auto; position: relative; }
.nav-search input {
  border: 2px solid var(--border); border-radius: 999px; padding: 9px 16px 9px 40px;
  width: 210px; font-size: 0.9rem; font-family: var(--font-body); background: #fff; outline: none; transition: 0.2s;
}
.nav-search input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); width: 250px; }
.nav-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.search-results {
  position: absolute; top: 112%; right: 0; width: 330px; max-height: 390px; overflow: auto;
  background: #fff; border: 2px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-hover);
  display: none; z-index: 60;
}
.search-results a { display: block; padding: 11px 16px; color: var(--ink); font-size: 0.9rem; border-bottom: 1px solid #f6f1fb; }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: #faf5ff; text-decoration: none; }
.search-results .sr-type { font-size: 0.7rem; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: 0.08em; }
.menu-btn { display: none; margin-left: auto; background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: 8px 13px; font-size: 1.15rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, #4338ca 0%, #7c3aed 42%, #d946ef 75%, #ec4899 100%);
  color: #fff; padding: 76px 0 84px; position: relative; overflow: hidden;
}
.hero-shapes span { position: absolute; border-radius: 50%; opacity: 0.35; filter: blur(2px); animation: floaty 7s ease-in-out infinite; }
.hero-shapes .s1 { width: 130px; height: 130px; background: #fde68a; top: 8%; left: 4%; }
.hero-shapes .s2 { width: 70px; height: 70px; background: #6ee7b7; bottom: 12%; left: 12%; animation-delay: -2s; }
.hero-shapes .s3 { width: 190px; height: 190px; background: #f9a8d4; top: -40px; right: 6%; animation-delay: -4s; }
.hero-shapes .s4 { width: 56px; height: 56px; background: #bfdbfe; bottom: 20%; right: 22%; animation-delay: -1s; }
.hero-shapes .s5 { width: 34px; height: 34px; background: #fff; top: 22%; right: 38%; opacity: 0.5; animation-delay: -3s; border-radius: 8px; transform: rotate(20deg); }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-22px) rotate(8deg); } }
.hero-inner { display: flex; align-items: center; gap: 48px; position: relative; z-index: 1; }
.hero-copy { flex: 1.2; min-width: 0; }
.hero-kicker {
  display: inline-block; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.01em; color: #fff; font-weight: 900; }
.hero h1 .hl { background: linear-gradient(90deg, #fde68a, #fdba74); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: #f3e8ff; font-size: 1.14rem; max-width: 600px; margin: 0 0 30px; }
.hero-search { position: relative; max-width: 580px; }
.hero-search input {
  width: 100%; border: 0; border-radius: 999px; padding: 19px 26px 19px 58px;
  font-size: 1.05rem; font-family: var(--font-body); background: #fff; color: var(--ink);
  outline: none; box-shadow: 0 18px 44px rgba(30, 10, 70, 0.35);
}
.hero-search input::placeholder { color: #a09bb8; }
.hero-search input:focus { box-shadow: 0 18px 44px rgba(30, 10, 70, 0.35), 0 0 0 5px rgba(255, 255, 255, 0.35); }
.hero-search .icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  border-radius: 999px; padding: 9px 17px; font-size: 0.87rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.94); transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 12px rgba(30, 10, 70, 0.18);
}
.chip::before { margin-right: 7px; }
.chip:hover { text-decoration: none; transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 20px rgba(30, 10, 70, 0.28); }
.chips .chip:nth-child(1) { color: #1d4ed8; } .chips .chip:nth-child(1)::before { content: "✍️"; }
.chips .chip:nth-child(2) { color: #7c3aed; } .chips .chip:nth-child(2)::before { content: "🎨"; }
.chips .chip:nth-child(3) { color: #db2777; } .chips .chip:nth-child(3)::before { content: "🎬"; }
.chips .chip:nth-child(4) { color: #b45309; } .chips .chip:nth-child(4)::before { content: "🎙️"; }
.chips .chip:nth-child(5) { color: #0f766e; } .chips .chip:nth-child(5)::before { content: "💻"; }
.chips .chip:nth-child(6) { color: #e11d48; } .chips .chip:nth-child(6)::before { content: "⚡"; }
.hero-mascot { flex: 0 0 340px; display: flex; justify-content: center; }
.mascot-blob {
  background: #fff; border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%;
  padding: 26px; box-shadow: 0 24px 60px rgba(30, 10, 70, 0.35);
  animation: floaty 6s ease-in-out infinite; line-height: 0;
}
.mascot-blob img { width: 290px; height: auto; border-radius: 40% 60% 55% 45% / 45% 45% 55% 55%; }

/* ---------- Sections & cards ---------- */
.section { padding: 64px 0 10px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 34px; }
.section-head h2 { font-size: 1.9rem; margin: 0 0 10px; font-weight: 900; }
.section-head .lede { color: var(--muted); margin: 0; font-size: 1.05rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-6px) rotate(-0.4deg); box-shadow: var(--shadow-hover); }
.card:hover a.card-title { text-decoration: none; }
.brand-mark { font-family: var(--font-head); font-size: 1.4rem; font-weight: 900; letter-spacing: -0.01em; }
.card-title { color: var(--ink); font-size: 1.18rem; font-weight: 800; margin: 10px 0 6px; display: block; font-family: var(--font-head); }
.card-tag { color: var(--muted); font-size: 0.94rem; margin: 0 0 16px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.price { font-weight: 700; font-size: 0.92rem; color: var(--ink); background: #f6f1fd; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.stars { color: var(--amber); font-size: 0.92rem; letter-spacing: 0.08em; font-weight: 700; white-space: nowrap; }
.card-brand { display: block; text-decoration: none; }
.card-brand:hover { text-decoration: none; }
.tool-logo { height: 46px; width: auto; max-width: 170px; object-fit: contain; }
.badge {
  position: absolute; top: 18px; right: 18px; background: var(--grad-warm); color: #fff;
  font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; padding: 6px 13px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.45); font-family: var(--font-head);
}
.cat-link { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #7c3aed; margin-top: 12px; display: inline-block; }

/* ---------- Category tiles (colorful, per-category) ---------- */
.cat-tiles .card { border: 0; color: #fff; min-height: 190px; }
.cat-tiles .card .card-title { color: #fff; font-size: 1.35rem; }
.cat-tiles .card .card-tag { color: rgba(255, 255, 255, 0.88); }
.cat-tiles .card .card-meta .price { background: rgba(255, 255, 255, 0.22); color: #fff; }
.cat-tiles .card .card-meta a { color: #fff; font-weight: 800; }
.cat-tiles .card::before {
  font-size: 2.4rem; line-height: 1; width: 68px; height: 68px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.22); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; backdrop-filter: blur(2px);
}
.cat-tiles .card:nth-child(1) { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.cat-tiles .card:nth-child(1)::before { content: "✍️"; }
.cat-tiles .card:nth-child(2) { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.cat-tiles .card:nth-child(2)::before { content: "🎨"; }
.cat-tiles .card:nth-child(3) { background: linear-gradient(135deg, #ec4899, #f472b6); }
.cat-tiles .card:nth-child(3)::before { content: "🎬"; }
.cat-tiles .card:nth-child(4) { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.cat-tiles .card:nth-child(4)::before { content: "🎙️"; }
.cat-tiles .card:nth-child(5) { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.cat-tiles .card:nth-child(5)::before { content: "💻"; }
.cat-tiles .card:nth-child(6) { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.cat-tiles .card:nth-child(6)::before { content: "⚡"; }

/* ---------- Tool page ---------- */
.crumbs { font-size: 0.87rem; color: var(--muted); margin: 28px 0 12px; font-weight: 500; }
.crumbs a { color: var(--muted); }
.tool-hero {
  background: #fff; border: 2px solid var(--border); border-radius: 28px;
  padding: 34px 36px; margin-bottom: 8px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.tool-hero::after {
  content: ""; position: absolute; top: -70px; right: -70px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 70%); border-radius: 50%;
}
.tool-head { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; position: relative; z-index: 1; }
.tool-head .brand-mark { font-size: 2.3rem; }
.tool-head h1 { margin: 2px 0 0; font-size: 2.2rem; font-weight: 900; letter-spacing: -0.01em; }
.tool-head .tagline { color: var(--muted); font-size: 1.1rem; margin: 8px 0 0; }
.verdict-box {
  background: linear-gradient(135deg, #fdf4ff, #eff6ff); border: 2px dashed #c4b5fd;
  border-radius: var(--radius); padding: 24px 28px; margin: 28px 0; position: relative;
}
.verdict-box::before { content: "💡"; font-size: 1.6rem; position: absolute; top: -20px; left: 26px; background: #fff; border-radius: 50%; padding: 4px; box-shadow: var(--shadow); }
.verdict-box h2 { margin: 6px 0 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: #7c3aed; font-weight: 900; }
.verdict-box p { margin: 0; font-size: 1.04rem; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.pros-cons .col { border-radius: var(--radius); padding: 22px 24px; border: 2px solid; }
.pros-cons .pros { background: #f0fdf4; border-color: #bbf7d0; }
.pros-cons .cons { background: #fff7ed; border-color: #fed7aa; }
.pros-cons h3 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 900; }
.pros-cons ul { margin: 0; padding-left: 20px; }
.pros-cons li { margin-bottom: 8px; }
.pros-cons .pros h3 { color: #15803d; }
.pros-cons .cons h3 { color: #c2410c; }
.spec-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0 32px; background: #fff; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.spec-table th, .spec-table td { text-align: left; padding: 14px 20px; border-bottom: 2px solid #f6f1fb; font-size: 0.95rem; }
.spec-table th { background: var(--grad); color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--font-head); border-bottom: 0; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table tr:nth-child(even) td { background: #fdfaff; }
.cta-row { margin: 34px 0; text-align: center; }
.btn-cta {
  display: inline-block; background: var(--grad); color: #fff !important; font-weight: 900; font-family: var(--font-head);
  font-size: 1.15rem; padding: 17px 52px; border-radius: 999px; box-shadow: 0 14px 32px rgba(139, 92, 246, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover { text-decoration: none; transform: translateY(-3px) scale(1.03) rotate(-0.5deg); box-shadow: 0 20px 44px rgba(236, 72, 153, 0.5); }
.price-note { font-size: 0.86rem; color: var(--muted); text-align: center; margin-top: 12px; }
.faq { margin: 12px 0 32px; }
.faq details { background: #fff; border: 2px solid var(--border); border-radius: 16px; padding: 16px 20px; margin-bottom: 12px; transition: border-color 0.2s; }
.faq details[open] { border-color: #c4b5fd; }
.faq summary { font-weight: 800; cursor: pointer; font-family: var(--font-head); }
.faq summary::marker { color: var(--pink); }
.faq p { margin: 10px 0 4px; color: var(--muted); }

/* ---------- Vs showdown ---------- */
.showdown {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: var(--grad); border-radius: 28px; padding: 40px 28px; margin: 26px 0 34px; position: relative; overflow: hidden;
}
.showdown::before, .showdown::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.14);
}
.showdown::before { width: 220px; height: 220px; top: -80px; left: -60px; }
.showdown::after { width: 160px; height: 160px; bottom: -60px; right: -40px; }
.fighter {
  background: #fff; border-radius: 20px; padding: 20px 34px; font-family: var(--font-head);
  font-weight: 900; font-size: 1.5rem; box-shadow: 0 14px 30px rgba(30, 10, 70, 0.3); position: relative; z-index: 1;
}
.fighter a { color: var(--ink); }
.fighter a:hover { text-decoration: none; }
.vs-burst {
  width: 92px; height: 92px; border-radius: 50%; background: var(--grad-warm); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head);
  font-weight: 900; font-size: 1.5rem; box-shadow: 0 12px 28px rgba(30, 10, 70, 0.4);
  border: 4px solid #fff; transform: rotate(-8deg); position: relative; z-index: 1;
  animation: floaty 5s ease-in-out infinite;
}
.vs-table td:first-child, .vs-table th:first-child { font-weight: 800; color: var(--muted); width: 24%; }
.vs-table thead th:nth-child(2) { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.vs-table thead th:nth-child(3) { background: linear-gradient(135deg, #ec4899, #f59e0b); }
.vs-table td:nth-child(2) { background: #eff6ff; }
.vs-table td:nth-child(3) { background: #fdf2f8; }

/* ---------- Category page hero ---------- */
.cat-hero { text-align: center; padding: 56px 0 10px; }
.cat-hero .cat-emoji { font-size: 3rem; }
.cat-hero h1 { font-size: 2.4rem; font-weight: 900; margin: 10px 0 8px; }
.cat-hero p { color: var(--muted); max-width: 700px; margin: 0 auto 8px; }
.cat-hero .count { display: inline-block; background: var(--grad); color: #fff; font-weight: 800; font-size: 0.85rem; padding: 7px 18px; border-radius: 999px; margin-top: 10px; }

/* ---------- Newsletter / content / footer / 404 ---------- */
.newsletter {
  background: var(--grad); border-radius: 28px; padding: 44px 34px; margin: 56px 0; text-align: center;
  color: #fff; position: relative; overflow: hidden; box-shadow: 0 20px 50px rgba(124, 58, 237, 0.35);
}
.newsletter::before { content: "✉️"; font-size: 3rem; display: block; margin-bottom: 6px; }
.newsletter h2 { margin: 0 0 10px; color: #fff; font-size: 1.7rem; font-weight: 900; }
.newsletter p { color: #f3e8ff; margin: 0 0 20px; }
.newsletter form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter input { flex: 1; border: 0; border-radius: 999px; padding: 14px 22px; font-size: 0.96rem; font-family: var(--font-body); outline: none; min-width: 0; }
.btn { background: #fff; color: #7c3aed; border: 0; border-radius: 999px; padding: 14px 30px; font-weight: 900; font-family: var(--font-head); font-size: 0.98rem; cursor: pointer; transition: transform 0.2s; }
.btn:hover { transform: scale(1.05); }
.prose { max-width: 780px; }
.prose h1 { font-size: 2.1rem; font-weight: 900; }
.prose h2 { margin-top: 36px; font-weight: 900; }
.prose .page-emoji { font-size: 2.6rem; }
footer { margin-top: 80px; border-top: 2px solid var(--border); background: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding: 48px 0 32px; }
.foot-grid h4 { margin: 0 0 14px; font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 900; }
.foot-grid a { display: block; color: var(--muted); font-size: 0.93rem; margin-bottom: 9px; font-weight: 500; }
.foot-grid a:hover { color: #7c3aed; }
.foot-brand p { color: var(--muted); font-size: 0.93rem; max-width: 300px; }
.foot-mascot { width: 74px; height: auto; border-radius: 38% 62% 55% 45% / 48% 42% 58% 52%; background: #f6f0ff; padding: 6px; margin-bottom: 12px; }
.foot-base { border-top: 2px solid var(--border); padding: 20px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.error-page { text-align: center; padding: 70px 20px; }
.error-page img { width: 190px; height: auto; border-radius: 42% 58% 55% 45% / 46% 44% 56% 54%; background: #f6f0ff; padding: 14px; margin-bottom: 10px; }
.error-page h1 { font-size: 3.4rem; font-weight: 900; margin: 10px 0 6px; }
.error-page p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { flex-direction: column; text-align: center; gap: 36px; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero p.sub { margin-left: auto; margin-right: auto; }
  .hero-search { width: 100%; }
  .hero .chips { justify-content: center; }
  .hero-mascot { flex: none; }
  .mascot-blob img { width: 220px; }
}
@media (max-width: 860px) {
  .nav-links, .nav-search { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: #fffdf8; border-bottom: 2px solid var(--border); padding: 12px 20px 18px; margin: 0; z-index: 55; }
  .nav-search.open { display: block; position: absolute; top: 68px; left: 0; right: 0; padding: 10px 20px 16px; background: #fffdf8; border-bottom: 2px solid var(--border); z-index: 55; }
  .nav-search.open input { width: 100%; }
  .nav-search.open .search-results { left: 20px; right: 20px; width: auto; }
  .pros-cons { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .newsletter form { flex-direction: column; }
  .hero { padding: 56px 0 64px; }
  .showdown { gap: 12px; padding: 30px 18px; }
  .fighter { font-size: 1.15rem; padding: 14px 22px; }
  .vs-burst { width: 70px; height: 70px; font-size: 1.15rem; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .tool-head h1 { font-size: 1.75rem; }
  .tool-hero { padding: 26px 22px; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Whole-card clickable (stretched link) ---------- */
.stretched-link::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
}
.card .cat-link { position: relative; z-index: 2; }

/* ---------- Stats bar + filter pills ---------- */
.stats-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
  padding: 12px 28px; margin: 0 auto 24px; max-width: 660px;
  box-shadow: var(--shadow); font-weight: 600; color: var(--muted); font-size: 0.95rem;
}
.stats-bar strong { color: var(--ink); font-family: var(--font-head); font-weight: 900; font-size: 1.05rem; }
.stats-bar .dot { color: var(--pink); font-weight: 900; }
.pills { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.pill {
  border: 2px solid var(--border); background: var(--surface); color: var(--ink);
  font-family: var(--font-head); font-weight: 800; font-size: 0.92rem;
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.pill:hover { transform: translateY(-2px); border-color: #c4b5fd; box-shadow: var(--shadow); }
.pill.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35); }
.pill-count { opacity: 0.65; font-size: 0.82rem; margin-left: 5px; font-weight: 700; }
.empty-state { text-align: center; color: var(--muted); font-weight: 600; font-size: 1.02rem; padding: 28px 10px; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px;
  padding: 8px 12px; font-size: 1.05rem; cursor: pointer; line-height: 1;
  transition: transform 0.2s; flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(-14deg) scale(1.08); }

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #151226;
  --surface: #211c40;
  --ink: #f1edfb;
  --muted: #b3abd4;
  --border: #342c5e;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  --shadow-hover: 0 22px 50px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] a { color: #a78bfa; }
[data-theme="dark"] .nav { background: rgba(21, 18, 38, 0.92); }
[data-theme="dark"] .nav-links a:hover { background: #2b2450; color: var(--ink); }
[data-theme="dark"] .nav-search input { background: #211c40; border-color: var(--border); color: var(--ink); }
[data-theme="dark"] .nav-search input::placeholder { color: #8b84a8; }
[data-theme="dark"] .search-results { background: #241e47; border-color: var(--border); }
[data-theme="dark"] .search-results a { color: var(--ink); border-color: #342c5e; }
[data-theme="dark"] .search-results a:hover { background: #2e2657; }
[data-theme="dark"] .menu-btn { background: #211c40; border-color: var(--border); color: var(--ink); }
[data-theme="dark"] .nav-links.open, [data-theme="dark"] .nav-search.open { background: #151226; }
[data-theme="dark"] .price { background: #2e2657; }
[data-theme="dark"] .cat-link { color: #a78bfa; }
[data-theme="dark"] .tool-hero { background: var(--surface); }
[data-theme="dark"] .verdict-box { background: linear-gradient(135deg, #2a2352, #1d2a52); border-color: #4c4390; }
[data-theme="dark"] .verdict-box::before { background: #211c40; }
[data-theme="dark"] .pros-cons .pros { background: #14291f; border-color: #1f4d33; }
[data-theme="dark"] .pros-cons .cons { background: #2e1f16; border-color: #5c3a22; }
[data-theme="dark"] .pros-cons .pros h3 { color: #6ee7b7; }
[data-theme="dark"] .pros-cons .cons h3 { color: #fdba74; }
[data-theme="dark"] .spec-table { background: var(--surface); }
[data-theme="dark"] .spec-table th, [data-theme="dark"] .spec-table td { border-color: #342c5e; }
[data-theme="dark"] .spec-table tr:nth-child(even) td { background: #241e47; }
[data-theme="dark"] .faq details { background: var(--surface); }
[data-theme="dark"] .faq summary::marker { color: #f0abfc; }
[data-theme="dark"] .vs-table td:nth-child(2) { background: #1d2a52; }
[data-theme="dark"] .vs-table td:nth-child(3) { background: #3a1f33; }
[data-theme="dark"] footer { background: #100d24; }
[data-theme="dark"] .foot-grid a:hover { color: #a78bfa; }
[data-theme="dark"] .foot-mascot { background: #2b2450; }
[data-theme="dark"] .error-page img { background: #2b2450; }
[data-theme="dark"] .tool-logo { background: rgba(255, 255, 255, 0.94); border-radius: 12px; padding: 6px 10px; }
[data-theme="dark"] .hero-search input::placeholder { color: #8b84a8; }

/* ---------- New directory features (appended, playful) ---------- */
/* Filter row: pills + category select */
.filter-row { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-row .pills { margin-bottom: 0; }
.cat-select {
  font-family: var(--font-head); font-weight: 800; font-size: 0.92rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
  padding: 9px 18px; cursor: pointer; outline: none; max-width: 240px;
  transition: border-color 0.18s;
}
.cat-select:hover { border-color: #c4b5fd; }
.pill-saved.active { background: var(--grad-warm); box-shadow: 0 8px 20px rgba(236, 72, 153, 0.35); }

/* Save/bookmark button on cards (sits in the meta row, above the stretched link) */
.card .save-btn {
  position: relative; z-index: 2; background: transparent; border: 0;
  font-size: 1.1rem; line-height: 1; padding: 4px 6px; cursor: pointer;
  transition: transform 0.18s; flex-shrink: 0;
}
.card .save-btn:hover { transform: scale(1.3) rotate(-8deg); }
.card .save-btn[aria-pressed="true"] { transform: scale(1.1); }

/* Recently-added note */
.added-note {
  display: inline-block; align-self: flex-start; font-size: 0.78rem; font-weight: 700; color: #b45309;
  background: #fef3c7; border-radius: 999px; padding: 3px 12px; margin-top: 10px;
}

/* Category index page */
.browse-link { font-weight: 800; color: #7c3aed; }

/* Category hero icon */
.cat-hero-icon { font-size: 3.4rem; line-height: 1; }

/* Editorial content on category pages */
.editorial { max-width: 780px; margin: 26px auto 0; }
.editorial-lede { font-size: 1.08rem; color: var(--ink); font-weight: 500; }
.editorial h2 { font-family: var(--font-head); font-weight: 900; font-size: 1.45rem; margin: 34px 0 14px; }
.editorial > p:last-child { margin-bottom: 0; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.why-list li {
  background: var(--surface); border: 2px solid var(--border); border-radius: 16px;
  padding: 13px 18px 13px 48px; position: relative; font-weight: 500; box-shadow: var(--shadow);
}
.why-list li::before { content: "✅"; position: absolute; left: 16px; top: 13px; }
.faq-list details { background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 16px 20px; margin-bottom: 12px; }
.faq-list details[open] { border-color: #c4b5fd; }
.faq-list summary { font-weight: 800; cursor: pointer; font-family: var(--font-head); }
.faq-list summary::marker { color: var(--pink); }
.faq-list p { margin: 10px 0 4px; color: var(--muted); }

/* ---------- Dark theme variants for new features ---------- */
[data-theme="dark"] .cat-select { background: #211c40; border-color: #342c5e; color: var(--ink); }
[data-theme="dark"] .added-note { background: #3a2c12; color: #fbbf24; }
[data-theme="dark"] .browse-link { color: #a78bfa; }
[data-theme="dark"] .why-list li { background: var(--surface); }
[data-theme="dark"] .faq-list details { background: var(--surface); }
[data-theme="dark"] .faq-list summary::marker { color: #f0abfc; }

/* ---------- Mobile tweaks for new features ---------- */
@media (max-width: 640px) {
  .filter-row { flex-direction: column; }
  .cat-select { width: 100%; max-width: 320px; }
}

/* ---------- Homepage tabs ---------- */
.tabs {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.tab {
  border: 2px solid var(--border); background: var(--surface); color: var(--ink);
  font-family: var(--font-head); font-weight: 900; font-size: 1.02rem;
  padding: 12px 30px; border-radius: 999px; cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.tab:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c4b5fd; }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 26px rgba(139, 92, 246, 0.4); }
.tab-panel[hidden] { display: none; }
.tabs-section { padding-top: 56px; }
.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;
}

/* ---------- Small category cards (/categories/) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cat-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 20px;
  padding: 22px; position: relative; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.cat-card-top { text-decoration: none; display: block; }
.cat-card-top:hover { text-decoration: none; }
.cat-card-icon {
  font-size: 1.9rem; width: 58px; height: 58px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f5f3ff, #fdf2f8); margin-bottom: 12px;
}
.cat-card-name { font-family: var(--font-head); font-weight: 900; font-size: 1.12rem; color: var(--ink); display: block; }
.cat-card-desc {
  color: var(--muted); font-size: 0.9rem; margin: 6px 0 16px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-card-foot { display: flex; align-items: center; justify-content: space-between; }
.count-pill {
  font-weight: 800; font-size: 0.82rem; color: var(--ink); background: #f6f1fd;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Compare page ---------- */
.compare-app {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px; max-width: 860px; margin: 0 auto;
}
.compare-step { margin-bottom: 26px; }
.compare-label { font-family: var(--font-head); font-weight: 900; font-size: 1.05rem; margin: 0 0 14px; display: block; }
.compare-step .cat-select { max-width: 320px; width: 100%; }
.cmp-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cmp-tool {
  display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--border);
  border-radius: 16px; padding: 14px 16px; cursor: pointer; transition: border-color 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.cmp-tool:hover { border-color: #c4b5fd; }
.cmp-tool:has(input:checked) { border-color: var(--violet); box-shadow: 0 8px 22px rgba(139, 92, 246, 0.25); background: #faf7ff; }
.cmp-tool:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.cmp-tool input { accent-color: #7c3aed; width: 18px; height: 18px; margin-bottom: 6px; cursor: pointer; }
.cmp-tool-name { font-family: var(--font-head); font-weight: 900; font-size: 1.02rem; }
.cmp-tool-tag { font-size: 0.83rem; color: var(--muted); }
.btn-compare {
  background: var(--grad); color: #fff; border: 0; border-radius: 999px;
  font-family: var(--font-head); font-weight: 900; font-size: 1.02rem;
  padding: 14px 38px; cursor: pointer; transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.4); display: block; margin: 6px auto 0;
}
.btn-compare:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); }
.btn-compare:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.cmp-table-wrap { overflow-x: auto; margin-top: 30px; border-radius: 18px; }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--surface); }
.cmp-table th, .cmp-table td {
  border: 2px solid var(--border); padding: 14px 16px; vertical-align: top;
  font-size: 0.92rem; text-align: left;
}
.cmp-table thead th { background: linear-gradient(135deg, #f5f3ff, #fdf2f8); font-size: 1rem; }
.cmp-table tbody th[scope="row"] { font-family: var(--font-head); font-weight: 900; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; width: 130px; background: var(--surface); }
.cmp-table td ul { margin: 0; padding-left: 18px; }
.cmp-table td li { margin-bottom: 4px; }
.cmp-head-name { font-family: var(--font-head); font-weight: 900; font-size: 1.15rem; }
.cmp-head-cat { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cmp-rating { color: var(--amber); font-weight: 800; white-space: nowrap; }
.btn-visit {
  display: inline-block; background: var(--grad-cool); color: #fff !important; font-weight: 800;
  padding: 10px 22px; border-radius: 999px; font-size: 0.9rem; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35); transition: transform 0.18s;
}
.btn-visit:hover { text-decoration: none; transform: translateY(-2px); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 860px; margin: 0 auto; }
.chip-link {
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
  padding: 9px 20px; font-weight: 700; font-size: 0.9rem; color: var(--ink);
  transition: transform 0.18s, border-color 0.18s;
}
.chip-link:hover { text-decoration: none; transform: translateY(-2px); border-color: #c4b5fd; }

/* ---------- News ---------- */
.news-list { display: grid; gap: 18px; max-width: 780px; margin: 0 auto; }
.news-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 20px;
  padding: 26px 28px; position: relative; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card a { text-decoration: none; }
.news-date { font-size: 0.82rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 8px; }
.news-title { font-family: var(--font-head); font-weight: 900; font-size: 1.35rem; color: var(--ink); display: block; margin-bottom: 8px; }
.news-excerpt { color: var(--muted); margin: 0 0 12px; }
.news-more { font-weight: 800; color: #7c3aed; }
.article { max-width: 760px; margin: 10px auto 0; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; margin: 10px 0 22px; }
.article-body p { font-size: 1.06rem; margin: 0 0 18px; color: var(--ink); }
.back-link { display: inline-block; margin-top: 14px; font-weight: 800; }
.more-news { max-width: 780px; margin: 60px auto 0; }
.more-news h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 18px; text-align: center; }
.news-more-card {
  display: block; background: var(--surface); border: 2px solid var(--border);
  border-radius: 16px; padding: 18px 22px; transition: transform 0.18s;
}
.news-more-card:hover { text-decoration: none; transform: translateY(-3px); }
.news-title-sm { font-family: var(--font-head); font-weight: 800; color: var(--ink); display: block; }

/* ---------- Dark theme for corrections round 2 ---------- */
[data-theme="dark"] .tab { background: #211c40; border-color: #342c5e; }
[data-theme="dark"] .cat-card-icon { background: linear-gradient(135deg, #241e47, #3a1f33); }
[data-theme="dark"] .count-pill { background: #2e2657; }
[data-theme="dark"] .compare-app { background: var(--surface); }
[data-theme="dark"] .cmp-tool:has(input:checked) { background: #241e47; }
[data-theme="dark"] .cmp-table thead th { background: #241e47; }
[data-theme="dark"] .cmp-table tbody th[scope="row"] { background: var(--surface); }
[data-theme="dark"] .news-more { color: #a78bfa; }

/* ---------- Mobile for corrections round 2 ---------- */
@media (max-width: 640px) {
  .tabs { gap: 8px; }
  .tab { padding: 10px 20px; font-size: 0.94rem; }
  .compare-app { padding: 24px 18px; }
  .cmp-tools { grid-template-columns: 1fr 1fr; }
}
