/*
Theme Name: SwapMyAI
Theme URI: https://swapmyai.example.com
Author: SwapMyAI
Author URI: https://swapmyai.example.com
Description: AI tools comparison & directory theme for SwapMyAI — Compare. Switch. Get More from AI. Built for the SwapMyAI Core plugin (Turso DB + AI publishing). Covers Home, Compare, Alternatives, Categories, Tool Profiles, Pricing, Guides & Tips, About.
Version: 1.9.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swapmyai
Tags: directory, comparison, ai-tools, purple, blue, responsive
*/

/* =========================================================
   1. TOKENS / RESET
========================================================= */
:root {
  --smai-primary: #6c4cf1;
  --smai-primary-dark: #5a3ae0;
  --smai-blue: #4a6cf7;
  --smai-navy: #191553;
  --smai-ink: #1e1b4b;
  --smai-body: #5b6079;
  --smai-muted: #8a8fa8;
  --smai-lav: #f3f0ff;
  --smai-lav-2: #e9e4ff;
  --smai-sky: #e8edff;
  --smai-border: #e7e3f6;
  --smai-white: #ffffff;
  --smai-green: #22c55e;
  --smai-gold: #f5a623;
  --smai-grad: linear-gradient(90deg, #7c5cfc 0%, #4a6cf7 100%);
  --smai-grad-soft: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
  --smai-grad-hero: linear-gradient(120deg, #f2efff 0%, #e8edff 55%, #ede9fe 100%);
  --smai-shadow: 0 12px 32px rgba(83, 63, 205, 0.10);
  --smai-shadow-lg: 0 24px 60px rgba(60, 45, 160, 0.16);
  --smai-radius: 16px;
  --smai-radius-sm: 10px;
  --smai-container: 1180px;
  --smai-font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--smai-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--smai-body);
  background: var(--smai-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--smai-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--smai-primary-dark); }
h1, h2, h3, h4, h5, h6 { color: var(--smai-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
figure { margin: 0; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--smai-blue); outline-offset: 2px; }

.smai-container { max-width: var(--smai-container); margin: 0 auto; padding: 0 24px; }
.smai-section { padding: 72px 0; }
.smai-section--lav { background: var(--smai-grad-hero); }
/* v1.4.0: tighter top rhythm for stacked home sections. */
.smai-section--snug { padding-top: 40px; }
/* v1.4.0: tool profile pages start closer to the header. */
.smai-section--tool { padding-top: 34px; }
.smai-section--tool .smai-breadcrumb { margin-bottom: 14px; }
.smai-section-head { max-width: 640px; margin-bottom: 36px; }
.smai-section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; flex-wrap: wrap; }
.smai-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--smai-primary); background: #fff; border: 1px solid var(--smai-lav-2); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.smai-section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 8px; }
.smai-section-head .smai-sub { font-size: 17px; margin: 0; }
/* v1.4.0: view-all links become site-matched pill buttons. */
.smai-viewall {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; white-space: nowrap; font-size: 14.5px;
  background: var(--smai-lav); color: var(--smai-primary);
  border: 1px solid var(--smai-lav-2); border-radius: 999px;
  padding: 9px 18px;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.smai-viewall:hover {
  background: var(--smai-primary); border-color: var(--smai-primary); color: #fff;
  box-shadow: 0 8px 20px rgba(108, 76, 241, .25);
}
.smai-screen-reader-text, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* =========================================================
   2. BUTTONS / CHIPS
========================================================= */
.smai-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; line-height: 1.2; color: #fff;
  background: var(--smai-grad); box-shadow: 0 8px 20px rgba(93, 76, 240, .28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  text-decoration: none; white-space: nowrap;
}
.smai-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(93, 76, 240, .36); color: #fff; filter: brightness(1.04); }
.smai-btn--ghost { background: #fff; color: var(--smai-ink); border: 1.5px solid var(--smai-border); box-shadow: none; }
.smai-btn--ghost:hover { border-color: var(--smai-primary); color: var(--smai-primary); }
.smai-btn--navy { background: var(--smai-navy); box-shadow: 0 8px 20px rgba(25, 21, 83, .3); }
.smai-btn--white { background: #fff; color: var(--smai-navy); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
/* v1.5.0 fix: the generic .smai-btn:hover forced color:#fff, which turned
   the label of white buttons ("Start Exploring Now", "Start Comparing Now")
   invisible on their white background. White buttons now keep navy text and
   get a soft lavender tint on hover instead. */
.smai-btn--white:hover, .smai-btn--white:focus-visible { background: #f4f2ff; color: var(--smai-navy); filter: none; }
.smai-btn--sm { padding: 8px 16px; font-size: 13.5px; border-radius: 10px; }
.smai-btn--lg { padding: 15px 28px; font-size: 16px; }
.smai-btn .smai-arrow { transition: transform .15s ease; }
.smai-btn:hover .smai-arrow { transform: translateX(3px); }

.smai-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--smai-border); color: var(--smai-ink);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s ease; text-decoration: none;
}
.smai-chip:hover { border-color: var(--smai-primary); color: var(--smai-primary); }
.smai-chip.is-active { background: var(--smai-navy); color: #fff; border-color: var(--smai-navy); }

/* v1.5.0: FREE / PAID pricing chips (cards + archive filter chips). */
.smai-chip--free { background: #e8f7ef; border-color: #b9e6d0; color: #0c8a5f; }
.smai-chip--free:hover { border-color: #0c8a5f; color: #0c8a5f; }
.smai-chip--paid { background: #fef3e2; border-color: #f3d9a4; color: #b45309; }
.smai-chip--paid:hover { border-color: #b45309; color: #b45309; }
.smai-chip--free.is-active { background: #0c8a5f; border-color: #0c8a5f; color: #fff; }
.smai-chip--paid.is-active { background: #b45309; border-color: #b45309; color: #fff; }
.smai-tool-tags .smai-chip--free,
.smai-tool-tags .smai-chip--paid { font-size: 11.5px; padding: 5px 11px; text-transform: uppercase; letter-spacing: .05em; }
/* v1.5.0: pricing-focus chips on article (guide) cards. */
.smai-article-card__chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 10px; }
.smai-article-card__chips .smai-chip { font-size: 11px; padding: 4px 10px; pointer-events: none; text-transform: uppercase; letter-spacing: .05em; }

/* =========================================================
   3. HEADER / NAV
========================================================= */
.smai-header { position: sticky; top: 0; z-index: 999; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--smai-border); }
.smai-header__inner { display: flex; align-items: center; gap: 16px; min-height: 74px; }
.smai-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--smai-navy); letter-spacing: -0.02em; }
.smai-logo:hover { color: var(--smai-navy); }
.smai-logo em { font-style: normal; background: var(--smai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.smai-logo img.custom-logo { max-height: 40px; width: auto; }
.smai-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.smai-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.smai-nav a { display: block; padding: 10px 10px; border-radius: 10px; color: var(--smai-ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
/* v1.5.0: hovering or visiting a menu item now highlights it with the
   site's dark navy instead of the pale lavender wash (text stays white). */
.smai-nav a:hover, .smai-nav a:focus-visible,
.smai-nav .current-menu-item > a, .smai-nav .current-menu-ancestor > a,
.smai-nav .current_page_item > a, .smai-nav .current_page_ancestor > a,
.smai-nav li.is-current > a, .smai-nav a.is-current { background: var(--smai-navy); color: #fff; }
.smai-nav .menu-item-has-children > a::after { content: "▾"; font-size: 10px; margin-left: 5px; opacity: .6; }
.smai-nav .sub-menu { display: none; position: absolute; background: #fff; border: 1px solid var(--smai-border); border-radius: 12px; box-shadow: var(--smai-shadow-lg); padding: 8px; min-width: 210px; flex-direction: column; }
.smai-nav li { position: relative; }
.smai-nav li:hover > .sub-menu { display: flex; }
.smai-nav .sub-menu a { padding: 9px 12px; font-weight: 500; }
.smai-header__search { position: relative; margin-left: auto; flex: 0 1 210px; min-width: 0; }
.smai-header__search input {
  width: 100%; min-width: 0; padding: 10px 14px 10px 38px; border-radius: 999px; border: 1.5px solid var(--smai-border);
  background: #f8f7fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%238a8fa8' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px center no-repeat;
  font-size: 13.5px; color: var(--smai-ink); transition: all .2s ease;
}
.smai-header__search input:focus { border-color: var(--smai-primary); outline: none; background-color: #fff; }
.smai-search-pop { position: absolute; top: calc(100% + 10px); right: 0; width: 320px; background: #fff; border: 1px solid var(--smai-border); border-radius: 14px; box-shadow: var(--smai-shadow-lg); padding: 8px; display: none; max-height: 380px; overflow: auto; }
.smai-search-pop.is-open { display: block; }
.smai-search-pop a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--smai-ink); font-weight: 600; font-size: 14px; }
.smai-search-pop a:hover { background: var(--smai-lav); }
.smai-search-pop .smai-pop-empty { padding: 14px; text-align: center; color: var(--smai-muted); font-size: 13.5px; margin: 0; }
.smai-header__cta { flex-shrink: 0; }
.smai-nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.smai-nav-toggle span { display: block; width: 22px; height: 2.4px; background: var(--smai-navy); margin: 5px auto; border-radius: 2px; transition: all .2s ease; }

/* =========================================================
   4. HERO (HOME)
========================================================= */
/* v1.2.0: mockup hero background — soft gradient + flowing wave lines
   (blobs are ::before/::after below) */
.smai-hero {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='940' height='640' viewBox='0 0 940 640' fill='none'%3E%3Cpath d='M-20 96C160 28 356 156 560 92 728 40 836 60 964 108' stroke='%23C9B8F6' stroke-opacity='.5' stroke-width='2'/%3E%3Cpath d='M-20 176C170 108 366 236 570 172 738 120 846 140 974 188' stroke='%23C9B8F6' stroke-opacity='.42' stroke-width='2'/%3E%3Cpath d='M-20 266C180 198 376 326 580 262 748 210 856 230 984 278' stroke='%23BDC4FB' stroke-opacity='.45' stroke-width='2'/%3E%3Cpath d='M-20 366C190 298 386 426 590 362 758 310 866 330 994 378' stroke='%23BDC4FB' stroke-opacity='.36' stroke-width='2'/%3E%3Cpath d='M-20 476C200 408 396 536 600 472 768 420 876 440 1004 488' stroke='%23C9B8F6' stroke-opacity='.3' stroke-width='2'/%3E%3Cpath d='M-20 586C210 518 406 646 610 582 778 530 886 550 1014 598' stroke='%23C9B8F6' stroke-opacity='.24' stroke-width='2'/%3E%3C/svg%3E") no-repeat right -90px top -50px / 940px 640px,
    var(--smai-grad-hero);
  position: relative; overflow: hidden; padding: 72px 0 84px;
}
.smai-hero::before, .smai-hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none;
}
.smai-hero::before { width: 460px; height: 460px; background: #c7b8ff; top: -160px; right: -80px; }
.smai-hero::after { width: 380px; height: 380px; background: #b9cbff; bottom: -180px; left: -110px; }
.smai-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.smai-hero h1 { font-size: clamp(38px, 5.2vw, 58px); margin: 0 0 6px; color: var(--smai-navy); }
.smai-hero h1 em { font-style: normal; background: var(--smai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.smai-hero__tagline { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; color: var(--smai-primary); margin: 0 0 16px; letter-spacing: -0.02em; }
.smai-hero__lead { font-size: 17px; max-width: 480px; margin-bottom: 26px; }
.smai-compare-bar { display: flex; gap: 10px; background: #fff; border: 1px solid var(--smai-border); box-shadow: var(--smai-shadow); border-radius: 16px; padding: 8px; max-width: 520px; }
.smai-compare-bar input { flex: 1; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8fa8' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat; padding-left: 36px; font-size: 14.5px; color: var(--smai-ink); min-width: 0; }
.smai-compare-bar input:focus { outline: none; }
.smai-popular { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 13.5px; color: var(--smai-muted); font-weight: 600; }
.smai-popular .smai-chip { font-size: 12.5px; padding: 6px 12px; }

/* floating tool cards */
.smai-hero__visual { position: relative; height: 340px; }
.smai-swap-bubble {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 108px; height: 108px; border-radius: 50%; background: #fff; box-shadow: var(--smai-shadow-lg);
  display: flex; align-items: center; justify-content: center; color: var(--smai-blue); z-index: 3;
}
.smai-tool-float {
  position: absolute; width: 112px; height: 118px; background: #fff; border-radius: 18px;
  box-shadow: var(--smai-shadow-lg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; font-weight: 700; font-size: 14px; color: var(--smai-ink); z-index: 2;
  animation: smai-float 6s ease-in-out infinite;
}
.smai-tool-float:nth-child(odd) { animation-delay: -3s; }
@keyframes smai-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.smai-tool-float--tl { left: 4%; top: 2%; }
.smai-tool-float--tr { right: 2%; top: 0; }
.smai-tool-float--bl { left: 0; bottom: 4%; }
.smai-tool-float--br { right: 4%; bottom: 0; }
.smai-tile { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: #fff; background: var(--smai-grad); flex-shrink: 0; }
.smai-tile img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; }
.smai-tile--lg { width: 64px; height: 64px; font-size: 24px; }
.smai-tile--lg img { width: 42px; height: 42px; }
/* v1.2.0: real brand icons — white tile, crisp logo */
.smai-tile--brand { background: #fff; border: 1px solid var(--smai-border); }
.smai-hero-logo { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.smai-hero-logo img { width: 46px; height: 46px; object-fit: contain; }

/* feature strip */
.smai-features { border-bottom: 1px solid var(--smai-border); background: #fff; padding: 26px 0; }
.smai-features__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.smai-feature { display: flex; align-items: center; gap: 14px; }
.smai-feature__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--smai-lav); display: flex; align-items: center; justify-content: center; color: var(--smai-primary); flex-shrink: 0; }
.smai-feature h3 { font-size: 15.5px; margin: 0; }
.smai-feature p { font-size: 12.5px; margin: 0; color: var(--smai-muted); }

/* =========================================================
   5. TOOL CARDS / GRIDS
========================================================= */
.smai-grid { display: grid; gap: 22px; }
.smai-grid > * { min-width: 0; }
.smai-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.smai-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.smai-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.smai-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Front page: tool strip + "why choose" wrapper (replaces the old inline 2.4fr/1fr style) */
.smai-tools-why { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); align-items: start; }

.smai-card { background: #fff; border: 1px solid var(--smai-border); border-radius: var(--smai-radius); box-shadow: var(--smai-shadow); transition: transform .18s ease, box-shadow .18s ease; }
.smai-card:hover { transform: translateY(-4px); box-shadow: var(--smai-shadow-lg); }

.smai-tool-card { padding: 26px 18px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.smai-tool-card .smai-tile { margin: 0 auto; }
.smai-tool-card h3 { font-size: 16.5px; margin: 0; }
.smai-tool-card .smai-tool-tag { font-size: 12px; color: var(--smai-muted); margin: 0; min-height: 18px; }
.smai-tool-card .smai-btn { margin-top: auto; }
.smai-tool-card__rating { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--smai-ink); }
.smai-star { color: var(--smai-gold); }

/* why choose */
.smai-why { padding: 30px; border-radius: 20px; background: var(--smai-grad); color: #fff; box-shadow: var(--smai-shadow-lg); }
.smai-why h3 { color: #fff; font-size: 20px; margin-bottom: 16px; }
.smai-why ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.smai-why li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; font-weight: 500; }
.smai-why li svg { flex-shrink: 0; margin-top: 2px; }
.smai-why .smai-btn { width: 100%; }

/* =========================================================
   6. ARTICLE CARDS
========================================================= */
.smai-article-card { overflow: hidden; display: flex; flex-direction: column; }
.smai-article-card__img { aspect-ratio: 16/9; background: var(--smai-grad-soft); display: flex; align-items: center; justify-content: center; color: var(--smai-primary); overflow: hidden; }
.smai-article-card__img img { width: 100%; height: 100%; object-fit: cover; }
.smai-article-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.smai-article-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--smai-muted); font-weight: 600; }
.smai-article-card h3 { font-size: 17px; margin: 0; }
.smai-article-card h3 a { color: var(--smai-ink); }
.smai-article-card h3 a:hover { color: var(--smai-primary); }
.smai-article-card .smai-readmore { margin-top: auto; font-weight: 700; font-size: 14px; }

/* =========================================================
   7. CTA BANNER
========================================================= */
.smai-cta { background: linear-gradient(120deg, #211d5e 0%, #4331a8 60%, #5a3ae0 100%); border-radius: 24px; padding: 30px 52px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; box-shadow: var(--smai-shadow-lg); position: relative; overflow: hidden; }
.smai-cta::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(124, 92, 252, .35); filter: blur(60px); right: -60px; top: -100px; }
.smai-cta h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); margin-bottom: 6px; }
.smai-cta p { margin: 0; color: #cfc9f4; }
.smai-cta__robot { font-size: 64px; flex-shrink: 0; position: relative; z-index: 1; }

/* =========================================================
   8. PAGE BANNERS (inner pages)
========================================================= */
/* v1.2.0: mockup page-banner background (wave lines + slightly deeper band) */
.smai-banner {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='940' height='640' viewBox='0 0 940 640' fill='none'%3E%3Cpath d='M-20 96C160 28 356 156 560 92 728 40 836 60 964 108' stroke='%23C9B8F6' stroke-opacity='.5' stroke-width='2'/%3E%3Cpath d='M-20 176C170 108 366 236 570 172 738 120 846 140 974 188' stroke='%23C9B8F6' stroke-opacity='.42' stroke-width='2'/%3E%3Cpath d='M-20 266C180 198 376 326 580 262 748 210 856 230 984 278' stroke='%23BDC4FB' stroke-opacity='.45' stroke-width='2'/%3E%3Cpath d='M-20 366C190 298 386 426 590 362 758 310 866 330 994 378' stroke='%23BDC4FB' stroke-opacity='.36' stroke-width='2'/%3E%3Cpath d='M-20 476C200 408 396 536 600 472 768 420 876 440 1004 488' stroke='%23C9B8F6' stroke-opacity='.3' stroke-width='2'/%3E%3Cpath d='M-20 586C210 518 406 646 610 582 778 530 886 550 1014 598' stroke='%23C9B8F6' stroke-opacity='.24' stroke-width='2'/%3E%3C/svg%3E") no-repeat right -140px top -90px / 780px 540px,
    linear-gradient(115deg, #efeafd 0%, #e6e0ff 55%, #e3ecff 100%);
  padding: 54px 0 58px; position: relative; overflow: hidden; border-bottom: 1px solid var(--smai-border);
}
.smai-banner::after { content: ""; position: absolute; width: 340px; height: 340px; background: #cdbaff; filter: blur(80px); opacity: .5; border-radius: 50%; right: -60px; top: -120px; }
.smai-banner__grid { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.smai-banner h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 6px; color: var(--smai-navy); }
.smai-banner .smai-sub { font-size: 17px; margin: 0; max-width: 560px; }
.smai-banner__icon { width: 88px; height: 88px; border-radius: 24px; background: #fff; box-shadow: var(--smai-shadow); display: flex; align-items: center; justify-content: center; color: var(--smai-primary); font-size: 40px; flex-shrink: 0; }
.smai-breadcrumb { font-size: 13.5px; color: var(--smai-muted); margin-bottom: 18px; font-weight: 600; }
.smai-breadcrumb a { color: var(--smai-muted); }
.smai-breadcrumb a:hover { color: var(--smai-primary); }
.smai-breadcrumb span[aria-current] { color: var(--smai-primary); }
/* v1.2.0: deep purple band (Compare / Alternatives pages, per mockup).
   Placed after ALL base .smai-banner* / breadcrumb rules so overrides win. */
.smai-banner--deep {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='940' height='640' viewBox='0 0 940 640' fill='none'%3E%3Cpath d='M-20 96C160 28 356 156 560 92 728 40 836 60 964 108' stroke='%23FFFFFF' stroke-opacity='.28' stroke-width='2'/%3E%3Cpath d='M-20 176C170 108 366 236 570 172 738 120 846 140 974 188' stroke='%23FFFFFF' stroke-opacity='.22' stroke-width='2'/%3E%3Cpath d='M-20 266C180 198 376 326 580 262 748 210 856 230 984 278' stroke='%23FFFFFF' stroke-opacity='.2' stroke-width='2'/%3E%3Cpath d='M-20 366C190 298 386 426 590 362 758 310 866 330 994 378' stroke='%23FFFFFF' stroke-opacity='.16' stroke-width='2'/%3E%3Cpath d='M-20 476C200 408 396 536 600 472 768 420 876 440 1004 488' stroke='%23FFFFFF' stroke-opacity='.13' stroke-width='2'/%3E%3Cpath d='M-20 586C210 518 406 646 610 582 778 530 886 550 1014 598' stroke='%23FFFFFF' stroke-opacity='.1' stroke-width='2'/%3E%3C/svg%3E") no-repeat right -140px top -90px / 780px 540px,
    linear-gradient(115deg, #7a63f0 0%, #6a51ec 55%, #5a3ae0 100%);
  border-bottom-color: transparent;
}
.smai-banner--deep h1 { color: #fff; }
.smai-banner--deep .smai-sub { color: rgba(255,255,255,.92); }
.smai-banner--deep .smai-breadcrumb,
.smai-banner--deep .smai-breadcrumb a { color: rgba(255,255,255,.8); }
.smai-banner--deep .smai-breadcrumb a:hover { color: #fff; }
.smai-banner--deep .smai-breadcrumb span[aria-current] { color: #fff; }
.smai-banner--deep .smai-banner__icon { background: rgba(255,255,255,.15); box-shadow: none; color: #fff; }
.smai-banner--deep::after { background: #b9a8ff; opacity: .4; }

/* =========================================================
   9. COMPARE ENGINE
========================================================= */
.smai-compare-selects { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--smai-border); box-shadow: var(--smai-shadow); border-radius: 18px; padding: 18px; max-width: 860px; margin: 0 auto; }
.smai-compare-selects select { appearance: none; padding: 12px 40px 12px 16px; border-radius: 12px; border: 1.5px solid var(--smai-border); background: #f8f7fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6079' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center no-repeat; font-weight: 600; color: var(--smai-ink); font-size: 14px; min-width: 160px; cursor: pointer; }
.smai-compare-selects select:focus { border-color: var(--smai-primary); outline: none; }

.smai-cmp-table-wrap { background: #fff; border: 1px solid var(--smai-border); border-radius: 18px; box-shadow: var(--smai-shadow); overflow: hidden; overflow-x: auto; }
table.smai-cmp-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.smai-cmp-table th, .smai-cmp-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #efecf9; font-size: 14.5px; vertical-align: middle; }
.smai-cmp-table thead th { background: var(--smai-navy); color: #fff; font-size: 15px; font-weight: 700; }
.smai-cmp-table thead th:first-child { background: var(--smai-navy); }
.smai-cmp-table tbody th { color: var(--smai-ink); font-weight: 700; width: 220px; background: #faf9fe; }
.smai-cmp-table td { color: var(--smai-body); }
.smai-cmp-table tbody tr:last-child th, .smai-cmp-table tbody tr:last-child td { border-bottom: 0; }
.smai-cmp-table .smai-col-head { display: flex; align-items: center; gap: 10px; }
.smai-cmp-table .smai-col-head .smai-tile { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
.smai-cmp-table .smai-col-head .smai-tile img { width: 22px; height: 22px; }
.smai-cmp-yes { color: var(--smai-green); }
.smai-cmp-no { color: #cbd0e0; }
.smai-cmp-price { font-weight: 800; color: var(--smai-ink); }
.smai-cmp-verdict { background: var(--smai-lav); border-radius: 14px; padding: 24px 28px; margin-top: 24px; font-size: 15px; }
.smai-cmp-verdict h3 { margin-bottom: 6px; font-size: 17px; }
.smai-cmp-verdict p { margin: 0; }

/* =========================================================
   10. ALTERNATIVES
========================================================= */
.smai-alt-search { display: flex; gap: 10px; background: #fff; border: 1px solid var(--smai-border); box-shadow: var(--smai-shadow); border-radius: 16px; padding: 8px; max-width: 640px; margin: 0 auto 8px; }
.smai-alt-search input { flex: 1; border: 0; padding-left: 36px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8fa8' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat; font-size: 14.5px; color: var(--smai-ink); min-width: 0; }
.smai-alt-search input:focus { outline: none; }
.smai-alt-hint { text-align: center; font-size: 13px; color: var(--smai-muted); margin-bottom: 36px; }

.smai-alt-card { padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.smai-alt-card h3 { font-size: 16px; margin: 0; }
.smai-alt-card h3 a { color: var(--smai-ink); }
.smai-alt-card .smai-alt-count { font-size: 12.5px; color: var(--smai-muted); font-weight: 600; margin: 0; }
.smai-alt-card .smai-btn { margin-top: 10px; }

.smai-alt-list { display: grid; gap: 16px; }
.smai-alt-row { display: flex; align-items: center; gap: 18px; padding: 18px 22px; flex-wrap: wrap; }
.smai-alt-row .smai-tile { width: 54px; height: 54px; }
.smai-alt-row__info { flex: 1; min-width: 220px; }
.smai-alt-row__info h3 { font-size: 17px; margin: 0 0 3px; }
.smai-alt-row__info h3 a { color: var(--smai-ink); }
.smai-alt-row__info p { margin: 0; font-size: 13.5px; }
.smai-alt-row__match { display: inline-flex; align-items: center; gap: 6px; background: #ecfdf3; color: #15803d; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.smai-alt-row__price { font-weight: 800; color: var(--smai-ink); font-size: 14px; min-width: 110px; text-align: right; }
.smai-alt-row .smai-btn { flex-shrink: 0; }

/* =========================================================
   11. CATEGORIES
========================================================= */
.smai-cat-card { padding: 26px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.smai-cat-card__icon { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; }
.smai-cat-card h3 { font-size: 16px; margin: 0; }
.smai-cat-card h3 a { color: var(--smai-ink); }
.smai-cat-card p { margin: 0; font-size: 12.5px; color: var(--smai-muted); font-weight: 600; }

/* =========================================================
   12. TOOL DETAIL PAGE
========================================================= */
.smai-tool-hero { display: flex; gap: 34px; background: #fff; border: 1px solid var(--smai-border); border-radius: 22px; box-shadow: var(--smai-shadow); padding: 38px; align-items: flex-start; flex-wrap: wrap; }
.smai-tool-hero__logo { width: 132px; height: 132px; border-radius: 28px; background: var(--smai-lav); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.smai-tool-hero__logo img { width: 72px; height: 72px; object-fit: contain; }
.smai-tool-hero__logo .smai-tile { width: 84px; height: 84px; font-size: 34px; border-radius: 22px; }
.smai-tool-hero__main { flex: 1; min-width: 280px; }
.smai-tool-hero__main h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 4px; }
.smai-tool-hero__main .smai-tool-tagline { font-size: 16px; margin: 0 0 12px; }
.smai-tool-rating { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--smai-ink); margin-bottom: 14px; font-size: 14.5px; }
.smai-tool-rating .smai-star { font-size: 17px; }
.smai-tool-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.smai-tool-tags .smai-chip { pointer-events: none; font-size: 12.5px; }
.smai-tool-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.smai-quickfacts { background: var(--smai-navy); color: #fff; border-radius: 18px; padding: 24px 26px; min-width: 250px; }
.smai-quickfacts h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.smai-quickfacts dl { margin: 0; display: grid; gap: 11px; }
.smai-quickfacts .smai-qf { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; }
.smai-quickfacts dt { color: #b6b1e6; }
.smai-quickfacts dd { margin: 0; font-weight: 700; text-align: right; }

.smai-tabs { display: flex; gap: 8px; margin: 38px 0 26px; overflow-x: auto; padding-bottom: 4px; }
/* v1.4.0: decorated pill tabs. */
.smai-tab-btn {
  background: #fff; border: 1.5px solid var(--smai-border); border-radius: 999px;
  padding: 11px 22px; font-weight: 700; color: var(--smai-body);
  cursor: pointer; font-size: 14.5px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(83, 63, 205, .06);
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.smai-tab-btn:hover { border-color: var(--smai-primary); color: var(--smai-primary); transform: translateY(-1px); }
.smai-tab-btn.is-active {
  background: var(--smai-grad); border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px rgba(108, 76, 241, .35);
}
.smai-tab-panel { display: none; }
.smai-tab-panel.is-active { display: block; animation: smai-fadein .25s ease; }
@keyframes smai-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.smai-proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.smai-pc-box { border-radius: 16px; padding: 24px 26px; border: 1px solid var(--smai-border); }
.smai-pc-box--pros { background: #f4fcf7; border-color: #cdeeda; }
.smai-pc-box--cons { background: #fef7f2; border-color: #f8ddd0; }
.smai-pc-box h3 { font-size: 16px; margin-bottom: 12px; }
.smai-pc-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.smai-pc-box li { display: flex; gap: 9px; font-size: 14px; align-items: flex-start; }
.smai-pc-box--pros li::before { content: "✔"; color: var(--smai-green); font-weight: 800; flex-shrink: 0; }
.smai-pc-box--cons li::before { content: "✕"; color: #e05d3d; font-weight: 800; flex-shrink: 0; }

.smai-feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.smai-feature-list li { list-style: none; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.smai-feature-list li::before { content: "✦"; color: var(--smai-primary); font-weight: 800; }

/* =========================================================
   13. PRICING PAGE
========================================================= */
.smai-price-card { padding: 28px 26px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.smai-price-card.is-popular { border: 2px solid var(--smai-primary); box-shadow: var(--smai-shadow-lg); }
.smai-price-card.is-popular::before { content: "MOST POPULAR"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--smai-grad); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 5px 14px; border-radius: 999px; }
.smai-price-card__head { display: flex; align-items: center; gap: 12px; }
.smai-price-card__head h3 { margin: 0; font-size: 17px; }
.smai-price-card__head .smai-plan-by { font-size: 12px; color: var(--smai-muted); margin: 0; }
.smai-price-card__price { font-size: 30px; font-weight: 800; color: var(--smai-ink); }
.smai-price-card__price small { font-size: 13.5px; color: var(--smai-muted); font-weight: 600; }
.smai-price-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; flex: 1; }
.smai-price-card li { display: flex; gap: 8px; align-items: flex-start; }
.smai-price-card li::before { content: "✔"; color: var(--smai-green); font-weight: 800; flex-shrink: 0; }
.smai-price-card .smai-btn { margin-top: 6px; }

.smai-pricing-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--smai-border); border-radius: 18px; box-shadow: var(--smai-shadow); }
table.smai-price-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.smai-price-table th, .smai-price-table td { padding: 14px 18px; border-bottom: 1px solid #efecf9; font-size: 14px; text-align: left; }
.smai-price-table thead th { background: var(--smai-navy); color: #fff; }
.smai-price-table tbody th { background: #faf9fe; color: var(--smai-ink); font-weight: 700; }
.smai-price-table td.smai-pt-price { font-weight: 800; color: var(--smai-ink); }

/* =========================================================
   14. GUIDES / SINGLE ARTICLE
========================================================= */
.smai-guide-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
/* v1.4.0: tools archive search + results note. */
.smai-tool-search { margin: 0 0 26px; max-width: none; }
.smai-archive-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-weight: 600; color: var(--smai-ink); font-size: 14.5px;
  background: #fff; border: 1px dashed var(--smai-lav-2); border-radius: 12px;
  padding: 12px 18px; margin: 0 0 24px;
}
.smai-archive-note a { font-weight: 700; }
.smai-toc { background: var(--smai-lav); border: 1px solid var(--smai-lav-2); border-radius: 16px; padding: 22px 26px; margin: 26px 0; }
.smai-toc h3 { font-size: 15px; margin-bottom: 10px; }
.smai-toc ol { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
.smai-article-body { font-size: 16.5px; line-height: 1.8; max-width: 780px; }
.smai-article-body h2 { font-size: 24px; margin-top: 1.6em; }
.smai-article-body h3 { font-size: 19px; margin-top: 1.4em; }
.smai-article-body img { border-radius: 14px; }
.smai-article-body blockquote { border-left: 4px solid var(--smai-primary); background: var(--smai-lav); margin: 1.4em 0; padding: 14px 22px; border-radius: 0 12px 12px 0; font-style: italic; }
.smai-article-meta { display: flex; gap: 16px; align-items: center; color: var(--smai-muted); font-size: 13.5px; font-weight: 600; flex-wrap: wrap; }

/* =========================================================
   15. ABOUT / MISC PAGES
========================================================= */
.smai-about-mission { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.smai-about-mission__media { background: var(--smai-grad-soft); border-radius: 22px; min-height: 300px; display: flex; align-items: center; justify-content: center; color: var(--smai-primary); font-size: 60px; box-shadow: var(--smai-shadow); }
.smai-checklist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.smai-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; color: var(--smai-ink); }
.smai-checklist li::before { content: "✔"; color: #fff; background: var(--smai-green); border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; margin-top: 2px; }

.smai-content { max-width: 780px; }
.smai-error-404 { text-align: center; padding: 90px 0; }
.smai-error-404 h1 { font-size: 72px; background: var(--smai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =========================================================
   16. FOOTER
========================================================= */
.smai-footer { background: var(--smai-navy); color: #c9c6ea; margin-top: 0; }
.smai-footer a { color: #c9c6ea; }
.smai-footer a:hover { color: #fff; }
.smai-footer__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; padding: 58px 0 40px; }
.smai-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.smai-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.smai-footer__brand p { margin: 12px 0 0; font-size: 14px; }
.smai-footer .smai-logo { color: #fff; }
.smai-footer .smai-logo em { background: linear-gradient(90deg, #a78bfa, #60a5fa); -webkit-background-clip: text; background-clip: text; }
.smai-socials { display: flex; gap: 10px; margin-bottom: 22px; }
.smai-socials a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease; }
.smai-socials a:hover { background: var(--smai-primary); color: #fff; }
.smai-newsletter { display: flex; gap: 8px; flex-wrap: wrap; }
.smai-newsletter input { flex: 1; min-width: 0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; }
.smai-newsletter input::placeholder { color: #8f8bc0; }
.smai-newsletter input:focus { outline: none; border-color: var(--smai-primary); }
/* v1.8.0: reCAPTCHA widget inside the footer newsletter form - the v2
   checkbox wraps onto its own row and scales down on narrow footers. */
.smai-newsletter .g-recaptcha { flex-basis: 100%; margin: 10px 0 0 !important; transform-origin: 0 0; }
.smai-newsletter .smai-rc-v3 { flex-basis: 100%; }
@media (max-width: 420px) { .smai-newsletter .g-recaptcha { transform: scale(.86); } }
.smai-newsletter-msg { font-size: 13px; margin: 10px 0 0; min-height: 18px; color: #a7f3d0; }
.smai-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.smai-footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* =========================================================
   17. RESPONSIVE
   Tiers cascade: 1080 -> 860 -> 560 -> 420. Later tiers
   override earlier ones; base rules below apply everywhere.
========================================================= */

/* ---- WordPress content safety (any viewport) ---- */
.smai-article-body { overflow-wrap: break-word; }
.smai-article-body iframe,
.smai-article-body video,
.smai-article-body embed { max-width: 100%; }
.smai-article-body pre { overflow-x: auto; }
.smai-article-body .wp-block-table { display: block; width: 100%; overflow-x: auto; }
.smai-article-body table { max-width: 100%; }

/* ---- Archive pagination (the_posts_pagination) ---- */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 36px; }
.pagination .nav-links .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--smai-border);
  border-radius: 10px; background: #fff; color: var(--smai-ink); font-weight: 700; font-size: 14px;
}
.pagination .nav-links a.page-numbers:hover { border-color: var(--smai-primary); color: var(--smai-primary); }
.pagination .nav-links .page-numbers.current { background: var(--smai-navy); border-color: var(--smai-navy); color: #fff; }
.pagination .nav-links .dots { border: 0; background: none; }

/* ---- Sticky header vs the WP admin bar (logged-in views) ---- */
body.admin-bar .smai-header { top: var(--wp-admin--admin-bar--height, 32px); }
body.admin-bar .smai-nav { top: calc(var(--wp-admin--admin-bar--height, 32px) + 74px); max-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px) - 74px); }

/* ---- Tier 1: small desktops - long menus need the search gone first ---- */
@media (max-width: 1280px) {
  .smai-header__search { display: none; }
  .smai-nav a { padding: 10px 9px; font-size: 13.5px; }
}

/* ---- Tier 2: tablets ---- */
@media (max-width: 1080px) {
  .smai-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .smai-features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Tier 3: large phones / small tablets ---- */
@media (max-width: 860px) {
  .smai-hero__grid { grid-template-columns: 1fr; }
  .smai-hero__visual { height: 300px; max-width: 480px; margin: 0 auto; width: 100%; }
  .smai-grid--4, .smai-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smai-tools-why { grid-template-columns: 1fr; }
  .smai-footer__grid { grid-template-columns: 1fr 1fr; }
  .smai-about-mission { grid-template-columns: 1fr; }
  .smai-proscons, .smai-feature-list { grid-template-columns: 1fr; }
  .smai-nav { position: fixed; inset: 74px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 18px 24px 26px; border-bottom: 1px solid var(--smai-border); box-shadow: var(--smai-shadow-lg); display: none; max-height: calc(100vh - 74px); overflow: auto; }
  .smai-nav.is-open { display: flex; }
  .smai-nav ul { flex-direction: column; }
  .smai-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 14px; }
  .smai-nav-toggle { display: block; }
  .smai-header__inner { gap: 10px; }
  .smai-header__cta { margin-left: auto; }
  /* spacing + section tuning */
  .smai-section { padding: 60px 0; }
  .smai-section--snug { padding-top: 32px; }
  .smai-section--tool { padding-top: 28px; }
  .smai-hero { padding: 52px 0 64px; }
  .smai-hero__grid { gap: 34px; }
  .smai-banner { padding: 46px 0 50px; }
  .smai-footer__grid { padding: 44px 0 34px; }
  .smai-about-mission { gap: 26px; }
  .smai-about-mission__media { min-height: 220px; font-size: 44px; }
  .smai-tool-hero { gap: 22px; }
  .smai-tool-hero__logo { width: 96px; height: 96px; border-radius: 22px; }
  .smai-tool-hero__logo img { width: 54px; height: 54px; }
  .smai-tool-hero__logo .smai-tile { width: 62px; height: 62px; font-size: 26px; border-radius: 16px; }
  .smai-quickfacts { min-width: 0; width: 100%; }
  .smai-price-card__price { font-size: 26px; }
  .smai-cmp-verdict { padding: 18px 20px; }
  .smai-cta { flex-direction: column; text-align: center; padding: 26px 28px; }
}

/* ---- Tier 4: phones ---- */
@media (max-width: 560px) {
  .smai-container { padding: 0 20px; }
  .smai-section { padding: 52px 0; }
  .smai-section--snug { padding-top: 28px; }
  .smai-section--tool { padding-top: 24px; }
  .smai-banner { padding: 38px 0 42px; }
  .smai-banner h1 { font-size: 27px; }
  .smai-banner .smai-sub { font-size: 15px; }
  .smai-banner__icon { width: 64px; height: 64px; border-radius: 18px; font-size: 30px; }
  .smai-section-head h2 { font-size: 24px; }
  /* grids: logo strips stay 2-up, everything else stacks */
  .smai-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smai-grid--2, .smai-grid--3, .smai-grid--4 { grid-template-columns: 1fr; }
  /* feature strip */
  .smai-features { padding: 16px 0; }
  .smai-features__grid { grid-template-columns: 1fr; gap: 14px; }
  /* compare + search bars */
  .smai-compare-bar { flex-direction: column; }
  .smai-compare-bar .smai-btn { width: 100%; }
  .smai-compare-selects { width: 100%; }
  .smai-compare-selects select { min-width: 0; width: 100%; }
  .smai-alt-search { flex-direction: column; }
  .smai-alt-search .smai-btn { width: 100%; }
  /* tool profile */
  .smai-tool-hero { padding: 22px 18px; gap: 18px; border-radius: 18px; }
  .smai-tool-hero__logo { width: 78px; height: 78px; border-radius: 18px; }
  .smai-tool-hero__logo img { width: 44px; height: 44px; }
  .smai-tool-hero__logo .smai-tile { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }
  .smai-tool-hero__cta .smai-btn { flex: 1 1 auto; justify-content: center; }
  .smai-quickfacts { padding: 18px; }
  .smai-pc-box { padding: 18px; }
  .smai-tabs { margin: 26px 0 20px; }
  .smai-tab-btn { padding: 9px 16px; font-size: 13.5px; }
  /* cards */
  .smai-tool-card { padding: 20px 12px 16px; }
  .smai-cat-card { padding: 20px 16px; }
  .smai-article-card__body { padding: 16px 16px 18px; }
  .smai-price-card { padding: 20px 18px; }
  .smai-why { padding: 24px 20px; }
  .smai-alt-row { padding: 16px; gap: 12px; }
  .smai-alt-row__info { min-width: 0; flex: 1 1 100%; }
  .smai-alt-row__price { min-width: 0; text-align: left; }
  .smai-alt-row .smai-btn { width: 100%; }
  /* tables */
  .smai-cmp-table th, .smai-cmp-table td { padding: 12px 14px; }
  .smai-price-table th, .smai-price-table td { padding: 12px 14px; }
  .smai-cmp-verdict { padding: 16px 18px; }
  /* misc */
  .smai-cta { padding: 22px 20px; }
  .smai-cta__robot { font-size: 48px; }
  .smai-toc { padding: 16px 18px; }
  /* v1.2.0: mobile footer — Quick Links + Top Categories side by side */
  .smai-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; padding: 40px 0 30px; }
  .smai-footer__grid > div:first-child,
  .smai-footer__grid > div:last-child { grid-column: 1 / -1; }
  .smai-error-404 { padding: 56px 0; }
  .smai-error-404 h1 { font-size: 56px; }
}

/* ---- Tier 5: small phones ---- */
@media (max-width: 420px) {
  .smai-container { padding: 0 18px; }
  .smai-header__cta { display: none; }
  .smai-hero { padding: 44px 0 52px; }
  .smai-hero h1 { font-size: 34px; }
  .smai-hero__tagline { font-size: 24px; }
  .smai-section { padding: 46px 0; }
  .smai-tool-card h3 { font-size: 15px; }
  .smai-article-card h3 { font-size: 15.5px; }
  .smai-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   21. v1.6.0 ADDENDUM
   Compact home tool cards, AI-alternatives promo card,
   alternatives page two-column layout, flush home CTA.
   Placed AFTER the responsive tiers so these overrides win
   at every viewport.
========================================================= */

/* ---- Compact tool cards (home "Popular AI Tools") ---- */
.smai-tool-card--compact { padding: 16px 16px 14px; text-align: left; align-items: stretch; gap: 12px; }
.smai-tool-card--compact .smai-tool-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.smai-tool-card--compact .smai-tile { margin: 0; width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }
.smai-tool-card--compact .smai-tile img { width: 30px; height: 30px; }
.smai-tool-card--compact .smai-tool-card__id { min-width: 0; flex: 1; }
.smai-tool-card--compact h3 { font-size: 15.5px; margin: 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smai-tool-card--compact h3 a { color: var(--smai-ink); }
.smai-tool-card--compact .smai-tool-card__rating { font-size: 12.5px; margin-top: 3px; }
.smai-tool-card--compact .smai-tool-card__reviews { color: var(--smai-muted); font-weight: 600; }
.smai-tool-card--compact .smai-tool-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.smai-tool-card--compact .smai-tool-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.smai-tool-card--compact .smai-btn { margin-top: 0; flex-shrink: 0; }

/* ---- Home side column: Why Choose + AI Alternatives promo ---- */
.smai-tools-why__side { display: grid; gap: 22px; align-content: start; min-width: 0; }
.smai-alt-promo { background: #fff; border: 1px solid var(--smai-border); border-radius: 20px; padding: 30px; box-shadow: var(--smai-shadow); }
.smai-alt-promo__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--smai-grad); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.smai-alt-promo h3 { font-size: 20px; margin: 0 0 10px; color: var(--smai-ink); }
.smai-alt-promo p { font-size: 14.5px; color: var(--smai-muted); margin: 0 0 18px; }
.smai-alt-promo .smai-btn { width: 100%; }

/* ---- Alternatives page: directory picker + two-column layout ---- */
.smai-alt-picker { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: -20px auto 42px; font-size: 13.5px; color: var(--smai-muted); }
.smai-alt-picker label { font-weight: 600; }
.smai-alt-picker select {
  appearance: none; padding: 11px 40px 11px 16px; border-radius: 12px; border: 1.5px solid var(--smai-border);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6079' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center no-repeat;
  font-weight: 600; color: var(--smai-ink); font-size: 14px; min-width: 240px; cursor: pointer; box-shadow: var(--smai-shadow);
}
.smai-alt-picker select:focus { border-color: var(--smai-primary); outline: none; }
.smai-alt-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.smai-alt-source { padding: 30px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; position: sticky; top: 96px; }
.smai-alt-source__label { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--smai-muted); }
.smai-alt-source__logo { width: 92px; height: 92px; border-radius: 22px; background: var(--smai-lav); display: flex; align-items: center; justify-content: center; }
.smai-alt-source__logo .smai-tile { width: 62px; height: 62px; font-size: 26px; border-radius: 16px; }
.smai-alt-source h2 { font-size: 22px; margin: 0; }
.smai-alt-source h2 a { color: var(--smai-ink); }
.smai-alt-source__rating { justify-content: center; }
.smai-alt-source__tagline { font-size: 13.5px; color: var(--smai-muted); margin: 0; }
.smai-alt-source .smai-btn { margin-top: 4px; }

/* ---- Home CTA merges into the footer ----
   padding-bottom: 0 kills the gap above the footer; the banner keeps
   its top rounded corners only. Declared after every media query so
   the responsive .smai-section padding overrides never reintroduce
   the gap on smaller screens. */
.smai-cta-flush { padding-bottom: 0; }
.smai-cta-flush .smai-cta { border-radius: 24px 24px 0 0; box-shadow: none; }


/* ---- v1.7.0: A-Z assortment chip row ----
   Alphabet filter for the tools directory, guides archive and
   category archives. Sits under the category / FREE-PAID chips. */
.smai-az-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 30px; }
.smai-guide-filters + .smai-az-row { margin-top: -16px; }
.smai-chip--az { min-width: 36px; justify-content: center; padding: 6px 10px; font-size: 12.5px; font-weight: 700; }

/* ---- v1.7.0: plan details on the alternatives source card ----
   Compact mirror of the tool profile's Pricing tab. */
.smai-alt-source__plans { width: 100%; display: grid; gap: 6px; text-align: left; }
.smai-alt-source__plans-title { margin: 4px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--smai-muted); }
.smai-alt-plan { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--smai-border); border-radius: 12px; background: var(--smai-lav); }
.smai-alt-plan__name { font-size: 13px; font-weight: 700; color: var(--smai-ink); }
.smai-alt-plan__price { font-size: 13px; font-weight: 800; color: var(--smai-primary); white-space: nowrap; }
.smai-alt-plan__price small { font-size: 11px; color: var(--smai-muted); font-weight: 600; }

/* ---- v1.7.0: contact form (rendered by Core on /contact/) ---- */
.smai-contact-form { margin-top: 30px; padding: 28px 26px; border: 1px solid var(--smai-border); border-radius: 18px; background: #fff; box-shadow: var(--smai-shadow); }
.smai-contact-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.smai-field { display: flex; flex-direction: column; gap: 6px; }
.smai-field--full { grid-column: 1 / -1; }
.smai-field label { font-size: 13px; font-weight: 700; color: var(--smai-ink); }
.smai-field input[type="text"], .smai-field input[type="email"], .smai-field textarea {
  border: 1px solid var(--smai-border); border-radius: 10px; padding: 11px 13px;
  font: inherit; font-size: 14px; color: var(--smai-ink); background: #fff; width: 100%;
}
.smai-field input:focus, .smai-field textarea:focus { outline: 2px solid var(--smai-primary); outline-offset: 1px; border-color: var(--smai-primary); }
.smai-field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.smai-contact-notice { grid-column: 1 / -1; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.smai-contact-notice--ok { background: #e8f9ef; color: #177245; border: 1px solid #b9ecd0; }
.smai-contact-notice--err { background: #fdecec; color: #b3261e; border: 1px solid #f6c8c5; }

/* ---- Responsive for the v1.7.0 blocks ---- */
@media (max-width: 640px) {
  .smai-contact-form { padding: 22px 18px; }
  .smai-contact-form__grid { grid-template-columns: 1fr; }
}

/* ---- Responsive for the v1.6.0 blocks ---- */
@media (max-width: 860px) {
  .smai-alt-layout { grid-template-columns: 1fr; }
  .smai-alt-source { position: static; }
  .smai-alt-picker { margin: -14px auto 34px; }
}
@media (max-width: 560px) {
  .smai-tool-card--compact .smai-tool-card__foot { flex-direction: column; align-items: stretch; }
  .smai-tool-card--compact .smai-tool-tags { justify-content: flex-start; }
  .smai-alt-promo { padding: 24px 20px; }
  .smai-cta-flush .smai-cta { border-radius: 18px 18px 0 0; }
}
