/*
Theme Name: SaaS Toolify
Description: AI tools directory theme for saas.com.ai. Toolify-style listing, search and category browsing.
Version: 0.1.0
Author: Claude Code
*/

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7fb;
  --border: #e7e7ef;
  --ink: #14141f;
  --muted: #6b6b80;
  --accent: #6d28d9;
  --accent-soft: #f3edff;
  --cta: #16a34a;
  --cta-hover: #128a3e;
  --up: #16a34a;
  --down: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,20,31,.06), 0 8px 24px rgba(20,20,31,.06);
  --shadow-lg: 0 12px 40px rgba(20,20,31,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.header-search { flex: 1; max-width: 520px; }
.header-search form { display: flex; }
.header-search input {
  width: 100%; height: 42px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-soft); font-size: 15px; outline: none;
}
.header-search input:focus { border-color: var(--accent); background: #fff; }
.header-nav { display: flex; gap: 18px; font-weight: 600; font-size: 14px; color: var(--muted); }
.header-nav a:hover { color: var(--ink); }

/* Hero */
.hero { text-align: center; padding: 64px 0 36px; }
.hero h1 { font-size: 44px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 auto 28px; max-width: 620px; }
.hero-search { max-width: 620px; margin: 0 auto; display: flex; gap: 10px; }
.hero-search input {
  flex: 1; height: 54px; padding: 0 20px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 999px; outline: none; box-shadow: var(--shadow);
}
.hero-search input:focus { border-color: var(--accent); }
.hero-search button {
  height: 54px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer;
}
.hero-stats { margin-top: 18px; color: var(--muted); font-size: 14px; }
.hero-stats b { color: var(--ink); }

/* Category chips */
.cat-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 28px; }
.cat-chip {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; font-size: 14px; font-weight: 600; color: var(--muted); transition: .15s;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cat-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Mobile: one swipeable row so the tool list shows immediately, not pushed down by 22 wrapped chips */
@media (max-width: 700px) {
  .cat-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cat-bar::-webkit-scrollbar { display: none; }
  .cat-chip { flex: 0 0 auto; }
  .archive-head { padding: 22px 0 10px; }
  .archive-head h1 { font-size: 25px; }
  .archive-head p { font-size: 14px; }
  .hero { padding: 36px 0 20px; }
  .hero h1 { font-size: 30px; }
}

/* Section */
.section { padding: 18px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 24px; letter-spacing: -.02em; margin: 0; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--accent); }

/* Tool grid */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px){ .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .tool-grid { grid-template-columns: 1fr; } }

.tool-card {
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: .18s;
}
.tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #dcd6f5; }
.tool-card-top { display: flex; align-items: center; gap: 12px; }
.tool-logo {
  width: 48px; height: 48px; border-radius: 12px; flex: 0 0 48px;
  border: 1px solid var(--border); background: #fff;
  display: grid; place-items: center; font-weight: 800; color: var(--accent); font-size: 20px; overflow: hidden;
}
.tool-logo img { width: 100%; height: 100%; object-fit: cover; }
.tool-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.tool-rank { font-size: 12px; color: var(--muted); }
.tool-desc { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.tool-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-top: auto; }
.visits { font-weight: 700; color: var(--ink); }
.growth.up { color: var(--up); }
.growth.down { color: var(--down); }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-tags span { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); }

/* Buttons */
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 10px; border: 0;
  background: var(--cta); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(22,163,74,.28); transition: .15s;
}
.btn-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }

/* Single tool */
.tool-hero { display: flex; gap: 24px; align-items: flex-start; padding: 40px 0 24px; border-bottom: 1px solid var(--border); }
.tool-hero .tool-logo { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 20px; font-size: 34px; }
.tool-hero h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.02em; }
.tool-hero .lede { color: var(--muted); font-size: 17px; margin: 0 0 16px; }
.tool-hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; padding: 24px 0; }
.stat { }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 800; }
.tool-body { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: 24px 0 60px; }
@media (max-width: 880px){ .tool-body { grid-template-columns: 1fr; } .tool-hero { flex-direction: column; } }
.prose { font-size: 16px; color: #2a2a3a; }
.sidebar-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar-card h3 { margin: 0 0 12px; font-size: 15px; }

/* Archive layout */
.archive-head { padding: 40px 0 20px; }
.archive-head h1 { font-size: 34px; letter-spacing: -.02em; margin: 0 0 8px; }
.archive-head p { color: var(--muted); margin: 0; }
.sort-bar { display: flex; gap: 8px; padding: 12px 0 24px; }
.sort-bar a { font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; }
.sort-bar a.active { background: var(--accent-soft); color: var(--accent); }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 40px 0; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; color: var(--muted); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Article */
.article { max-width: 820px; }
.article-head { padding: 40px 0 16px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--accent); }
.article-head h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; }
.byline { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.byline b { color: var(--ink); }
.article-body { font-size: 17px; line-height: 1.7; color: #23232f; }
.article-body h2 { font-size: 26px; letter-spacing: -.02em; margin: 36px 0 12px; }
.article-body h3 { font-size: 20px; margin: 28px 0 8px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body img { border-radius: 10px; margin: 16px 0; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.article-body th, .article-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.article-body th { background: var(--bg-soft); font-weight: 700; }
/* Article tool entry cards */
.tool-entry { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 24px 0; transition: box-shadow .18s, border-color .18s, transform .18s; }
.tool-entry:hover { box-shadow: var(--shadow-lg); border-color: #dcd6f5; transform: translateY(-2px); }
.tool-entry-head { display: flex; align-items: center; gap: 14px; }
.tool-entry-head .tool-logo { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; font-size: 22px; }
.tool-entry-meta { flex: 1; min-width: 0; }
.tool-entry-meta h3 { margin: 0; font-size: 20px; }
.tool-entry-meta h3 a { color: var(--ink); text-decoration: none; }
.tool-entry-meta h3 a:hover { color: var(--accent); }
.entry-visit { font-size: 13px; color: var(--muted); font-weight: 600; display: block; margin-top: 2px; }
.entry-visit .growth.up { color: var(--up); }
.entry-visit .growth.down { color: var(--down); }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0 6px; }
@media (max-width: 600px){ .proscons { grid-template-columns: 1fr; } }
.proscons h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.proscons .pros h4 { color: var(--up); }
.proscons .cons h4 { color: var(--down); }
.proscons ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.proscons li { margin: 3px 0; }
.best-for { font-size: 14.5px; background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin: 8px 0 0; }

/* Quick-pick TL;DR box */
.quickpick { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--bg-soft); padding: 18px 20px; margin: 24px 0; }
.quickpick h2 { margin: 0 0 10px !important; font-size: 18px !important; }
.quickpick ul { margin: 0; padding-left: 18px; }
.quickpick li { margin: 5px 0; }

/* Buttons: polish + animation */
.btn-cta { letter-spacing: .01em; }
.btn-cta:hover { box-shadow: 0 10px 22px rgba(22,163,74,.36); }
.btn-cta:active { transform: translateY(0); }
/* Override article link styles so CTA stays a clean green button (not a purple underlined link) */
.article-body a.btn-cta,
.article-body a.btn-cta:hover,
.article-body a.btn-cta:visited { color: #fff; text-decoration: none; }
.article-cta { flex: 0 0 auto; height: 42px; padding: 0 20px; font-size: 14px; font-weight: 700; border-radius: 10px; white-space: nowrap; }
.article-cta:hover { transform: translateY(-1px); }
.btn-cta .cta-ico { width: 15px; height: 15px; flex: 0 0 15px; }

.faq-q { font-weight: 700; margin: 18px 0 4px; }
.author-box { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 40px 0; background: var(--bg-soft); }
.author-box img { border-radius: 50%; width: 56px; height: 56px; }
.author-box strong { font-size: 16px; }
.author-box p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.article-cta { display:inline-flex; margin-left:auto; }

/* AI Tool Finder widget */
#saas-finder { position: fixed; right: 22px; bottom: 22px; z-index: 200; font-family: inherit; }
.sf-btn {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #9333ea); color: #fff;
  display: grid; place-items: center; margin-left: auto;
  box-shadow: 0 10px 28px rgba(109,40,217,.45); transition: transform .15s, box-shadow .15s;
}
.sf-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 34px rgba(109,40,217,.55); }
#saas-finder.open .sf-btn { transform: scale(.9); opacity: .85; }

.sf-panel {
  position: absolute; right: 0; bottom: 76px; width: 360px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: .18s;
}
#saas-finder.open .sf-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.sf-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--accent), #9333ea);
}
.sf-head span { display: inline-flex; align-items: center; gap: 8px; }
.sf-close { background: transparent; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; opacity: .85; }
.sf-close:hover { opacity: 1; }
.sf-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 50vh; min-height: 120px; overflow-y: auto; background: var(--bg-soft); }
.sf-msg { font-size: 14px; line-height: 1.5; padding: 9px 13px; border-radius: 12px; max-width: 85%; }
.sf-bot { background: #fff; border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.sf-user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.sf-cards { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.sf-card { display: flex; align-items: center; gap: 11px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; transition: .15s; }
.sf-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.sf-card img, .sf-card .sf-ph { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.sf-card-t { min-width: 0; }
.sf-card-t strong { display: block; font-size: 14px; color: var(--ink); }
.sf-card-t span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.sf-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: #fff; }
.sf-input { flex: 1; height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; outline: none; }
.sf-input:focus { border-color: var(--accent); }
.sf-form button { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; cursor: pointer; transition: .15s; }
.sf-form button:hover { background: #5b21b6; }
@media (max-width: 480px) { #saas-finder { right: 14px; bottom: 14px; } .sf-panel { bottom: 72px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ============ BLOG ============ */
.blog-head { padding: 48px 0 8px; max-width: 720px; }
.blog-head h1 { font-size: 40px; letter-spacing: -.03em; margin: 0 0 10px; line-height: 1.08; }
.blog-head p { color: var(--muted); font-size: 18px; margin: 0; }
.blog-cat-bar { padding: 18px 0 4px; }
.blog-empty { color: var(--muted); padding: 40px 0; }

/* Blog grid + cards */
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 24px 0 48px; }
@media (max-width: 980px){ .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .post-list { grid-template-columns: 1fr; gap: 18px; } }

.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .18s, transform .18s, border-color .18s; }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #dcd6f5; }
.post-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-grad { display: grid; place-items: center; position: relative; }
.post-thumb-grad::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 80% 10%, rgba(255,255,255,.28), transparent 55%); }
.post-thumb-grad .pt-glyph { font-size: 52px; font-weight: 800; color: rgba(255,255,255,.92); text-shadow: 0 2px 12px rgba(0,0,0,.18); }
.post-card-body { display: flex; flex-direction: column; gap: 9px; padding: 18px; flex: 1; }
.post-badge { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); padding: 4px 9px; border-radius: 6px; }
.post-badge.lg { font-size: 12px; padding: 6px 12px; margin-bottom: 4px; }
.pc-title { font-size: 18px; font-weight: 700; line-height: 1.32; letter-spacing: -.01em; color: var(--ink); }
.pc-excerpt { font-size: 14px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .post-meta { margin-top: auto; padding-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* Featured hero card (spans full row) */
.post-list.has-feature .post-card.feature { grid-column: 1 / -1; flex-direction: row; }
.post-card.feature .post-thumb { flex: 0 0 52%; aspect-ratio: auto; }
.post-card.feature .post-card-body { padding: 32px 36px; justify-content: center; gap: 12px; }
.post-card.feature .pc-title { font-size: 30px; line-height: 1.18; }
.post-card.feature .pc-excerpt { font-size: 16px; -webkit-line-clamp: 4; }
@media (max-width: 760px){ .post-list.has-feature .post-card.feature { flex-direction: column; } .post-card.feature .post-thumb { flex: none; aspect-ratio: 16/9; } .post-card.feature .post-card-body { padding: 18px; } .post-card.feature .pc-title { font-size: 22px; } }

/* ============ SINGLE POST ============ */
.reading-progress { position: sticky; top: 64px; left: 0; height: 3px; z-index: 49; background: transparent; }
.reading-progress #readbar { display: block; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), #9333ea); transition: width .1s linear; }

.post-hero { padding: 8px 0 0; }
.post-hero-inner { max-width: 820px; padding-top: 28px; }
.post-hero .breadcrumb { margin-bottom: 14px; }
.post-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.025em; margin: 10px 0 16px; }
.post-hero .byline { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.post-hero .byline img { width: 36px; height: 36px; border-radius: 50%; }
.post-hero .byline .dot { opacity: .5; }
.post-banner { margin: 28px 0 8px; border-radius: 18px; overflow: hidden; aspect-ratio: 21 / 9; box-shadow: var(--shadow); }
.post-banner img { width: 100%; height: 100%; object-fit: cover; }
.post-banner-grad { display: grid; place-items: center; position: relative; }
.post-banner-grad::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 85% 5%, rgba(255,255,255,.25), transparent 55%); }
.post-banner-grad span { font-size: 88px; font-weight: 800; color: rgba(255,255,255,.92); text-shadow: 0 3px 18px rgba(0,0,0,.2); }
@media (max-width: 760px){ .post-hero h1 { font-size: 29px; } .post-banner { aspect-ratio: 16/9; border-radius: 12px; } .post-banner-grad span { font-size: 60px; } }

/* Layout: TOC sidebar + content */
.post-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 48px; justify-content: center; padding: 36px 20px 24px; align-items: start; }
@media (max-width: 1040px){ .post-layout { grid-template-columns: minmax(0, 820px); justify-content: center; } .post-toc { display: none; } }
.post-main { min-width: 0; }
.post-main .article-body { max-width: none; }

.post-toc { position: relative; }
.toc-sticky { position: sticky; top: 96px; }
.toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
#toc { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--border); }
#toc a { font-size: 13.5px; line-height: 1.4; color: var(--muted); padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; transition: .15s; }
#toc a:hover { color: var(--ink); }
#toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-cta { margin-top: 22px; padding: 16px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; }
.toc-cta p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.toc-cta .article-cta { display: inline-flex; margin: 0; height: 40px; }

/* Related AI tools box (monetisation) */
.related-tools { margin: 44px 0 8px; padding: 26px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, var(--accent-soft), #fff 70%); }
.related-tools h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -.01em; }
.rt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px){ .rt-grid { grid-template-columns: 1fr; } }
.rt-card { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; transition: .15s; }
.rt-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.rt-card .tool-logo { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; font-size: 18px; }
.rt-info { flex: 1; min-width: 0; }
.rt-info strong { display: block; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-vis { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.rt-go { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--cta); }

/* Related posts */
.related-posts { margin: 52px 0 20px; }
.related-posts h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 20px; }

/* Inline article image (real CC photo) */
.post-inline-img { margin: 26px 0; }
.post-inline-img img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.post-inline-img figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.post-inline-img figcaption a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* FAQ polish */
.article-body h2 + .faq-q { margin-top: 14px; }
.faq-q { font-weight: 700; font-size: 17px; margin: 22px 0 6px; color: var(--ink); }
.faq-q::before { content: "Q "; color: var(--accent); font-weight: 800; }

/* ---- Unified search results (AI tools + blog articles) ---- */
.search-group { margin: 8px 0 34px; }
.search-group-title {
  font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; display: flex; align-items: center; gap: 8px;
}
.search-group-title span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700;
}
.search-more { margin: 16px 0 0; }
.search-more a { font-size: 14px; font-weight: 600; color: var(--accent); }
.search-more a:hover { text-decoration: underline; }

/* ---- Blog page search box ---- */
.blog-search { display: flex; gap: 8px; margin: 18px auto 0; max-width: 520px; }
.blog-search input {
  flex: 1; padding: 11px 18px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-soft); font-size: 15px; outline: none;
}
.blog-search input:focus { border-color: var(--accent); background: #fff; }
.blog-search button {
  padding: 11px 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
}
.blog-search button:hover { background: #5b21b6; }
