/* ==========================================================================
   AI Tools Guidance — design system
   Tokens → base → layout → components → templates → tools → utilities
   ========================================================================== */

@font-face { font-family: "Jakarta"; src: url("../fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
	/* Colour */
	--ink-900: #0b1324;   /* headings, primary text */
	--ink-700: #2b3550;   /* body text */
	--ink-500: #5b6683;   /* secondary text */
	--ink-300: #a3abc2;   /* disabled, placeholders */
	--line: #e4e7f0;
	--line-strong: #cfd4e3;
	--surface: #ffffff;
	--surface-2: #f6f7fb;
	--surface-3: #eef0f8;

	--brand: #4f46e5;      /* indigo 600 */
	--brand-ink: #3730a3;  /* hover / pressed */
	--brand-soft: #eef0ff;
	--violet: #7c3aed;
	--violet-soft: #f3edff;
	--teal: #0d9488;
	--teal-soft: #e6f7f5;
	--amber: #b45309;
	--amber-soft: #fff6e5;
	--danger: #c0262d;
	--danger-soft: #fdeeee;
	--success: #15803d;
	--success-soft: #eaf7ee;

	--grad: linear-gradient(135deg, #4f46e5 0%, #6d4aed 55%, #7c3aed 100%);
	--grad-soft: radial-gradient(1200px 520px at 85% -10%, #e9e7ff 0%, rgba(233, 231, 255, 0) 60%), radial-gradient(900px 480px at -10% 10%, #e8f3ff 0%, rgba(232, 243, 255, 0) 55%);

	/* Type */
	--font-head: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--fs-xs: .78rem;
	--fs-sm: .875rem;
	--fs-md: 1rem;
	--fs-lg: 1.125rem;
	--fs-h4: 1.125rem;
	--fs-h3: clamp(1.15rem, 1.05rem + .4vw, 1.35rem);
	--fs-h2: clamp(1.55rem, 1.3rem + 1vw, 2.15rem);
	--fs-h1: clamp(2rem, 1.55rem + 2vw, 3.25rem);

	/* Space, shape, depth */
	--s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
	--r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
	--sh-1: 0 1px 2px rgba(11, 19, 36, .06), 0 1px 1px rgba(11, 19, 36, .04);
	--sh-2: 0 6px 20px -6px rgba(11, 19, 36, .12), 0 2px 6px rgba(11, 19, 36, .05);
	--sh-3: 0 24px 48px -16px rgba(43, 36, 140, .25), 0 6px 16px rgba(11, 19, 36, .06);
	--ring: 0 0 0 3px rgba(79, 70, 229, .28);

	--wrap: 1200px;
	--narrow: 760px;
	--header-h: 68px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.65; color: var(--ink-700); background: var(--surface); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--ink-900); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 var(--s3); font-weight: 750; }
h1 { font-size: var(--fs-h1); letter-spacing: -.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.25rem; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: #dcdaff; }
button, input, select, textarea { font: inherit; color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink-900); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.section { padding-block: var(--s7); }
@media (min-width: 900px) { .section { padding-block: var(--s8); } }
.section-tight { padding-block: var(--s6); }
.section-tint { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s6); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-sub { color: var(--ink-500); margin: var(--s2) 0 0; max-width: 60ch; }
.eyebrow { font-family: var(--font-head); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin: 0 0 var(--s2); }

/* ---------- Buttons, chips, tags ---------- */
.btn { --bg: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 1.15rem; border-radius: var(--r-pill); border: 1px solid transparent; background: var(--bg); font-family: var(--font-head); font-weight: 650; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 38px; padding: 0 .95rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px -4px rgba(79, 70, 229, .55); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink-900); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-ink); }
.btn-light:hover { color: var(--brand); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .5); background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-900); cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.chip-row { list-style: none; padding: 0; margin: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: .45em; padding: .45rem .8rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--ink-700); font-size: var(--fs-sm); font-weight: 550; text-decoration: none; transition: border-color .15s, color .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip .aig-icon { color: var(--brand); }
.chip-sm { padding: .3rem .65rem; font-size: var(--fs-xs); }
.tag { display: inline-flex; align-items: center; padding: .18rem .55rem; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-ink); font-size: var(--fs-xs); font-weight: 650; text-decoration: none; letter-spacing: .01em; }
.tag:hover { color: var(--brand); }
.tag-soft { background: var(--teal-soft); color: var(--teal); }
.link-arrow { display: inline-flex; align-items: center; gap: .35em; font-family: var(--font-head); font-weight: 650; font-size: var(--fs-sm); text-decoration: none; }
.link-arrow .aig-icon { transition: transform .15s var(--ease); }
.link-arrow:hover .aig-icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: var(--s5); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink-900); flex-shrink: 0; }
.brand-mark { color: var(--brand); display: inline-flex; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.06rem; letter-spacing: -.02em; }
.brand-name b { font-weight: 800; }
.brand-logo { max-height: 40px; width: auto; }
.primary-nav { margin-left: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.nav-list > li { position: relative; }
.nav-list > li > a, .sub-toggle { display: inline-flex; align-items: center; gap: .3em; padding: .5rem .75rem; border-radius: var(--r-sm); color: var(--ink-700); font-weight: 550; font-size: .94rem; text-decoration: none; background: none; border: 0; cursor: pointer; }
.nav-list > li > a:hover, .sub-toggle:hover, .sub-toggle[aria-expanded="true"] { color: var(--ink-900); background: var(--surface-3); }
.sub-toggle::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .25rem; }
.mega { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(680px, 92vw); display: none; grid-template-columns: 1fr 190px; gap: var(--s4); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.mega-tools { width: min(440px, 92vw); grid-template-columns: 1fr; }
.has-sub.is-open .mega { display: grid; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mega-grid a { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--r-sm); color: var(--ink-700); text-decoration: none; font-size: .92rem; font-weight: 520; }
.mega-grid a .aig-icon { color: var(--brand); flex-shrink: 0; }
.mega-grid a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.mega-side { border-left: 1px solid var(--line); padding-left: var(--s4) !important; }
.mega-side a { display: block; padding: .4rem 0; color: var(--ink-500); font-size: .9rem; text-decoration: none; }
.mega-side a:hover { color: var(--brand); }
/* WordPress menus (when a Primary menu is assigned) */
.nav-list .sub-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; list-style: none; margin: 0; padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-3); display: none; }
.nav-list li:hover > .sub-menu, .nav-list li:focus-within > .sub-menu { display: block; }
.nav-list .sub-menu a { display: block; padding: .45rem .6rem; border-radius: var(--r-sm); color: var(--ink-700); text-decoration: none; font-size: .92rem; }
.nav-list .sub-menu a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.header-actions { display: flex; align-items: center; gap: var(--s2); }
.nav-toggle { display: none; }
.search-panel { border-top: 1px solid var(--line); background: var(--surface); padding-block: var(--s4); }

@media (max-width: 1020px) {
	/* backdrop-filter would trap the fixed mobile menu inside the 68px header */
	.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
	.header-cta { display: none; }
	.nav-toggle { display: inline-grid; }
	.primary-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--surface); padding: var(--s4) 16px var(--s7); overflow-y: auto; display: none; margin: 0; }
	.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
	body.nav-open .primary-nav { display: block; }
	body.nav-open { overflow: hidden; }
	.header-actions { margin-left: auto; }
	.nav-list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-list > li { border-bottom: 1px solid var(--line); }
	.nav-list > li > a, .sub-toggle { width: 100%; justify-content: space-between; padding: .9rem .25rem; font-size: 1.05rem; }
	.mega, .mega-tools { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: 0 0 var(--s3); grid-template-columns: 1fr; }
	.mega-side { border-left: 0; padding-left: .6rem !important; }
	.nav-list .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 var(--s3); }
}

/* ---------- Search form ---------- */
.search-form, .hero-search, .filter-input { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: .3rem .35rem .3rem 1rem; transition: border-color .15s, box-shadow .15s; }
.search-form:focus-within, .hero-search:focus-within, .filter-input:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.search-form .aig-icon, .hero-search .aig-icon, .filter-input .aig-icon { color: var(--ink-500); flex-shrink: 0; }
.search-form input, .hero-search input, .filter-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .55rem 0; }
.search-form input:focus-visible, .hero-search input:focus-visible, .filter-input input:focus-visible { box-shadow: none; }
.filter-input { padding-right: 1rem; }
.search-inline { max-width: 560px; margin: var(--s5) auto 0; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-soft), var(--surface); padding-block: var(--s7) var(--s8); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line); }
.hero-grid { display: grid; gap: var(--s7); align-items: center; grid-template-columns: minmax(0, 1fr); }
.hero-grid > *, .why > *, .footer-grid > * { min-width: 0; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } .hero { padding-block: 88px 104px; } }
.hero-title { max-width: 16ch; }
.hero-lead { font-size: var(--fs-lg); color: var(--ink-500); max-width: 52ch; margin-bottom: var(--s5); }
.hero-search { max-width: 620px; padding: .4rem .45rem .4rem 1.15rem; box-shadow: var(--sh-2); }
.hero-search input { font-size: 1rem; }
.hero-visual { position: relative; min-height: 340px; display: none; }
@media (min-width: 980px) { .hero-visual { display: block; } }
.hv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.hv-main { position: relative; margin: 30px 34px 34px; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.hv-bar { display: flex; gap: 6px; margin-bottom: var(--s2); }
.hv-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.hv-row { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border-radius: var(--r-md); background: var(--surface-2); }
.hv-row b { display: block; font-family: var(--font-head); color: var(--ink-900); font-size: .95rem; margin-bottom: 8px; }
.hv-row i { display: block; height: 7px; width: 220px; max-width: 100%; border-radius: 4px; background: var(--line); margin-bottom: 6px; }
.hv-row i.short { width: 130px; }
.hv-row > div { flex: 1; }
.hv-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.hv-violet { background: var(--violet-soft); color: var(--violet); }
.hv-teal { background: var(--teal-soft); color: var(--teal); }
.hv-float { position: absolute; display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1rem; font-family: var(--font-head); font-weight: 650; font-size: .88rem; color: var(--ink-900); }
.hv-float .aig-icon { color: var(--brand); }
.hv-f1 { top: 0; right: 0; }
.hv-f2 { bottom: 0; left: 0; }

@media (prefers-reduced-motion: no-preference) {
	.hv-f1 { animation: aig-float 7s ease-in-out infinite; }
	.hv-f2 { animation: aig-float 8s ease-in-out -2s infinite; }
}
@keyframes aig-float { 50% { transform: translateY(-8px); } }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), var(--violet-soft)); }
.card-body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s4) var(--s5); flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: var(--s2); }
.card-title { font-size: 1.05rem; line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.card-title a { color: var(--ink-900); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card-title a:hover { color: var(--brand); }
.card .tag, .card .link-arrow { position: relative; z-index: 1; }
.card-excerpt { color: var(--ink-500); font-size: var(--fs-sm); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: var(--s2); display: flex; align-items: center; gap: .45rem; color: var(--ink-500); font-size: var(--fs-xs); }
.card-tool .card-media { aspect-ratio: 16 / 8; }
.card-compact .card-body { padding: var(--s5); }
.card-compact .card-title { font-size: 1.12rem; }
.featured { margin-bottom: var(--s5); }
.card-feature { display: grid; }
@media (min-width: 860px) { .card-feature { grid-template-columns: 1.3fr 1fr; } .card-feature .card-media { aspect-ratio: auto; min-height: 320px; } .card-feature .card-body { padding: var(--s6); justify-content: center; } .card-feature .card-title { font-size: var(--fs-h2); } }

/* ---------- Categories ---------- */
.cat-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1020px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--s3); align-items: center; padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; height: 100%; }
.cat-card:hover { border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-2px); }
.cat-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.cat-grid li:nth-child(3n+2) .cat-ico { background: var(--violet-soft); color: var(--violet); }
.cat-grid li:nth-child(3n) .cat-ico { background: var(--teal-soft); color: var(--teal); }
.cat-name { font-family: var(--font-head); font-weight: 700; color: var(--ink-900); font-size: .97rem; line-height: 1.3; }
.cat-count { font-size: var(--fs-xs); color: var(--ink-500); }

/* ---------- Free tool cards ---------- */
.tool-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
.tool-card { position: relative; display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; overflow: hidden; }
.tool-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: transparent; }
.tool-card:hover::before { opacity: 1; }
.tool-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .7); margin-bottom: var(--s2); }
.tool-name { font-family: var(--font-head); font-weight: 750; color: var(--ink-900); font-size: 1.05rem; }
.tool-desc { color: var(--ink-500); font-size: var(--fs-sm); }
.tool-go { margin-top: auto; padding-top: var(--s2); display: inline-flex; align-items: center; gap: .35em; color: var(--brand); font-family: var(--font-head); font-weight: 650; font-size: var(--fs-sm); }

/* ---------- Why / FAQ / CTA ---------- */
.why { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .why { grid-template-columns: .9fr 1.1fr; align-items: start; } }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 640px) { .why-list { grid-template-columns: 1fr 1fr; } }
.why-list li { display: flex; gap: var(--s3); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.why-list li > span { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.why-list h3 { font-size: 1rem; margin-bottom: .3rem; }
.why-list p { font-size: var(--fs-sm); color: var(--ink-500); margin: 0; }
.faq { margin-top: var(--s6); display: grid; gap: var(--s3); text-align: left; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 var(--s5); transition: border-color .15s; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s4) 0; font-family: var(--font-head); font-weight: 700; color: var(--ink-900); display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-500); padding-bottom: var(--s4); margin: 0; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s6); border-radius: var(--r-xl); background: var(--grad); color: #e9e8ff; box-shadow: var(--sh-3); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 65%); }
@media (min-width: 900px) { .cta-band { padding: var(--s7); } }
.cta-band h2 { color: #fff; margin-bottom: var(--s2); }
.cta-band p { margin: 0; max-width: 52ch; }
.cta-actions { display: flex; gap: var(--s3); flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- Page heroes, breadcrumbs ---------- */
.page-hero, .tool-hero { background: var(--grad-soft), var(--surface-2); border-bottom: 1px solid var(--line); padding-block: var(--s6) var(--s6); }
@media (min-width: 900px) { .page-hero { padding-block: var(--s7); } }
.page-hero h1, .tool-hero h1 { margin-bottom: var(--s2); }
.page-hero-sm h1 { font-size: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem); }
.page-hero-row { display: flex; gap: var(--s4); align-items: flex-start; }
.page-hero-ico { width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .7); }
@media (max-width: 600px) { .page-hero-ico { display: none; } }
.page-lead { color: var(--ink-500); font-size: var(--fs-lg); max-width: 64ch; margin: 0; }
.page-lead p:last-child { margin: 0; }
.aig-crumbs { font-size: var(--fs-xs); color: var(--ink-500); margin-bottom: var(--s4); }
.aig-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.aig-crumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--ink-300); }
.aig-crumbs a { color: var(--ink-500); text-decoration: none; }
.aig-crumbs a:hover { color: var(--brand); }
.aig-crumbs .separator { color: var(--ink-300); margin: 0 .2rem; }
.archive-tools { margin-top: var(--s5); display: grid; gap: var(--s3); }
.archive-tools .filter-input { max-width: 420px; }
.filter-empty, .dir-count { color: var(--ink-500); font-size: var(--fs-sm); }
.empty { text-align: center; }
.empty .chip-row { justify-content: center; }

/* ---------- Directory controls ---------- */
.dir-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; }
.dir-controls .grow { flex: 1 1 260px; }
.select select { appearance: none; min-height: 42px; padding: 0 2.2rem 0 .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface) 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='%235b6683' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center; cursor: pointer; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: var(--r-pill); }
.seg button { border: 0; background: transparent; padding: .45rem .85rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-500); cursor: pointer; }
.seg button.is-on { background: var(--surface); color: var(--ink-900); box-shadow: var(--sh-1); }
.dir-count { margin: var(--s4) 0; }
.dir-item[hidden] { display: none; }

/* ---------- Article ---------- */
.article-hero { padding-block: var(--s6) var(--s5); background: var(--grad-soft), var(--surface); }
.article-title { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 3rem); margin: var(--s3) 0 var(--s4); }
.byline { display: flex; align-items: center; gap: var(--s3); }
.byline-avatar, .author-box img { border-radius: 50%; }
.byline-name { font-weight: 650; color: var(--ink-900); text-decoration: none; }
.byline-dates { font-size: var(--fs-xs); color: var(--ink-500); display: flex; flex-wrap: wrap; gap: .35rem; }
.article-figure { margin: 0 auto var(--s6); max-width: 1040px; }
.article-figure img { width: 100%; border-radius: var(--r-xl); box-shadow: var(--sh-2); aspect-ratio: 16 / 9; object-fit: cover; }
.article-layout { display: grid; gap: var(--s6); padding-bottom: var(--s6); }
@media (min-width: 1100px) { .article-layout { grid-template-columns: 240px minmax(0, var(--narrow)); justify-content: center; } }
.toc { align-self: start; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); background: var(--surface-2); }
@media (min-width: 1100px) { .toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - 120px); overflow: auto; background: transparent; border: 0; border-left: 2px solid var(--line); border-radius: 0; padding: 0 0 0 var(--s4); } }
.toc-h { font-family: var(--font-head); font-weight: 700; color: var(--ink-900); margin-bottom: var(--s2); }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.toc a { color: var(--ink-500); text-decoration: none; line-height: 1.4; display: block; }
.toc a:hover, .toc a.is-active { color: var(--brand); }
.toc .toc-sub { padding-left: .8rem; font-size: .82rem; }
.article-layout:not(:has(.toc:not([hidden]))) { grid-template-columns: minmax(0, var(--narrow)); justify-content: center; }
.article-foot { padding-bottom: var(--s7); display: grid; gap: var(--s5); }
.author-box { display: flex; gap: var(--s4); padding: var(--s5); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.author-name { font-family: var(--font-head); font-weight: 750; color: var(--ink-900); margin-bottom: .2rem; }
.author-box p:last-child { margin: 0; font-size: var(--fs-sm); color: var(--ink-500); }

/* Prose (post and page content, including legacy content) */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink-700); min-width: 0; }
.prose > * + * { margin-top: 0; }
.prose h2 { margin-top: var(--s7); margin-bottom: var(--s3); font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem); }
.prose h3 { margin-top: var(--s6); font-size: 1.25rem; }
.prose h4 { margin-top: var(--s5); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--brand); }
.prose img { border-radius: var(--r-md); margin-block: var(--s5); }
.prose figure { margin: var(--s5) 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--ink-500); text-align: center; margin-top: var(--s2); }
.prose blockquote { margin: var(--s5) 0; padding: var(--s4) var(--s5); border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink-900); }
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .65rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-family: var(--font-head); color: var(--ink-900); }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-3); padding: .12em .4em; border-radius: 6px; }
.prose pre { background: var(--ink-900); color: #e5e7f0; padding: var(--s4); border-radius: var(--r-md); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose a { font-weight: 550; }
.prose iframe { max-width: 100%; }
.prose .wp-block-button__link { background: var(--brand); color: #fff; border-radius: var(--r-pill); padding: .65rem 1.2rem; text-decoration: none; }
.page-links, .comments { margin-top: var(--s6); }

/* ---------- Pagination ---------- */
.pagination { margin-top: var(--s6); }
.nav-links { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }
.page-numbers { min-width: 42px; height: 42px; padding: 0 .8rem; display: inline-grid; place-items: center; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--ink-700); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.page-numbers.current { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: #b9c0d6; padding-top: var(--s7); font-size: var(--fs-sm); }
.site-footer a { color: #d9ddeb; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--s6); padding-bottom: var(--s6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.brand-invert, .brand-invert .brand-name { color: #fff; }
.brand-invert .brand-mark { color: #a5b4fc; }
.footer-brand p { margin: var(--s4) 0 0; max-width: 38ch; }
.footer-mail { display: flex; align-items: center; gap: .45rem; }
.footer-social { list-style: none; padding: 0; margin: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.footer-social a { display: inline-block; padding: .3rem .7rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r-pill); font-size: var(--fs-xs); }
.footer-h { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: var(--s4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; align-items: center; }
.footer-base p { margin: 0; }
.legal-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s4); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .toc, .cta-band { display: none; } }

/* "Try a free tool" box rendered under articles by the AIG Free Tools plugin */
.aig-try { padding: var(--s5); border-radius: var(--r-lg); background: linear-gradient(135deg, var(--brand-soft), var(--violet-soft)); border: 1px solid #e2defd; }
.aig-try-h { font-family: var(--font-head); font-weight: 800; color: var(--ink-900); margin: 0 0 var(--s3); }
.aig-try ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
@media (min-width: 720px) { .aig-try ul { grid-template-columns: 1fr 1fr; } }
.aig-try a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; }
.aig-try a:hover { border-color: var(--brand); }
.aig-try strong { font-family: var(--font-head); color: var(--ink-900); }
.aig-try span { color: var(--ink-500); font-size: var(--fs-sm); }

/* Comments */
.comments { padding-bottom: var(--s7); }
.comment-list { list-style: none; padding: 0; display: grid; gap: var(--s4); }
.comment-list .children { list-style: none; padding-left: var(--s5); }
.comment-body { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); }
.comment-meta { font-size: var(--fs-xs); color: var(--ink-500); }
.comment-form { display: grid; gap: var(--s3); }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-900); margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; max-width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: .7rem .85rem; background: var(--surface); }
.comment-form input:focus, .comment-form textarea:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
.comment-form .submit { background: var(--brand); color: #fff; border: 0; border-radius: var(--r-pill); min-height: 44px; padding: 0 1.2rem; font-family: var(--font-head); font-weight: 650; cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: var(--fs-sm); }
.comment-form-cookies-consent label { font-weight: 400; }

/* Tool cards with an image carried over from the previous design */
.tool-img { display: block; margin: calc(-1 * var(--s5)) calc(-1 * var(--s5)) var(--s3); aspect-ratio: 16 / 8; overflow: hidden; background: var(--surface-3); }
.tool-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.tool-card:hover .tool-img img { transform: scale(1.03); }
.tool-img + .tool-ico { margin-top: calc(-1 * var(--s5) - 24px); position: relative; border: 3px solid var(--surface); box-sizing: content-box; }
.site-footer .brand-logo { max-height: 44px; width: auto; }
.card-media img.is-default { opacity: .92; }
.tool-img-ph { background: var(--grad), var(--grad-soft); background-blend-mode: normal; }

/* ==========================================================================
   Elementor kit isolation
   Elementor's global "kit" stylesheet (loaded while Elementor stays active for
   legacy pages) restyles every <button>, body text and headings. These rules
   use `html body` (+1 specificity) so the theme's own components win, while
   Elementor-built content inside .builder-content keeps its own styling.
   ========================================================================== */
html body { font-family: var(--font-body); color: var(--ink-700); font-size: var(--fs-md); line-height: 1.65; }
html body :where(h1, h2, h3, h4, h5, h6):not(.builder-content *):not(.elementor *) { font-family: var(--font-head); color: var(--ink-900); }
html body :is(.btn, .icon-btn, .sub-toggle, .seg button, .aig-btn, .aig-chip, .aig-tabs button, .comment-form .submit, .faq summary) {
	font-family: var(--font-head); text-transform: none; letter-spacing: normal; line-height: 1.2; text-decoration: none; box-shadow: none; transition: background .15s, border-color .15s, color .15s;
}
html body .btn { min-height: 44px; padding: 0 1.15rem; border-radius: var(--r-pill); border: 1px solid transparent; font-weight: 650; font-size: var(--fs-sm); background: var(--surface); color: var(--ink-900); }
html body .btn-sm { min-height: 38px; padding: 0 .95rem; }
html body .btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 14px -4px rgba(79, 70, 229, .55); }
html body .btn-primary:hover, html body .btn-primary:focus { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
html body .btn-ghost { background: var(--surface); color: var(--ink-900); border-color: var(--line-strong); }
html body .btn-light { background: #fff; color: var(--brand-ink); border-color: #fff; }
html body .btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
html body .icon-btn { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-900); display: inline-grid; place-items: center; }
html body .icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
html body .sub-toggle { background: none; border: 0; padding: .5rem .75rem; border-radius: var(--r-sm); color: var(--ink-700); font-weight: 550; font-size: .94rem; font-family: var(--font-body); }
html body .sub-toggle:hover, html body .sub-toggle[aria-expanded="true"] { background: var(--surface-3); color: var(--ink-900); }
html body .seg button { background: transparent; border: 0; padding: .45rem .85rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-500); }
html body .seg button.is-on { background: var(--surface); color: var(--ink-900); box-shadow: var(--sh-1); }
html body .faq summary { background: none; padding: var(--s4) 0; color: var(--ink-900); font-weight: 700; }
html body .aig-btn { min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-900); font-weight: 650; font-size: .9rem; }
html body .aig-btn-sm { min-height: 34px; padding: 0 .8rem; font-size: .8rem; }
html body .aig-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
html body .aig-btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
html body .aig-btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
html body .aig-chip { background: var(--surface); border: 1px solid var(--line); color: var(--ink-700); border-radius: 999px; padding: .32rem .7rem; font-size: .82rem; font-weight: 550; font-family: var(--font-body); }
html body .aig-tabs button { background: none; border: 0; padding: .38rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--ink-500); }
html body .aig-tabs button.is-on { background: var(--surface); color: var(--ink-900); }
html body :is(.search-form, .hero-search, .filter-input) input { background: transparent; border: 0; box-shadow: none; padding: .55rem 0; color: var(--ink-900); font-family: var(--font-body); font-size: 1rem; min-height: 0; }
html body .select select { font-family: var(--font-body); color: var(--ink-900); font-size: .95rem; }
html body :is(.aig-textarea, .aig-field input, .aig-field select, .aig-field textarea) { font-family: var(--font-body); font-size: .97rem; color: var(--ink-900); border: 1px solid var(--line-strong); border-radius: 12px; background-color: var(--surface); }
html body .site-footer a { color: #d9ddeb; }
html body .site-footer a:hover { color: #fff; }
html body .site-footer .footer-h { color: #fff; }

/* Pages still built with Elementor */
.builder-content { min-height: 40vh; }
html body .nav-toggle { display: none; }
@media (max-width: 1020px) { html body .nav-toggle { display: inline-grid; } }
html body .nav-list > li > a { font-family: var(--font-body); font-weight: 550; font-size: .94rem; color: var(--ink-700); }
html body .nav-list > li > a:hover { color: var(--ink-900); }
html body .mega-grid a, html body .mega-side a { font-family: var(--font-body); }

/* ==========================================================================
   Legacy Elementor pages
   Pages still built with Elementor (AI tools, About, etc.) were designed for
   the previous dark site style. Give their content back that dark context —
   scoped to the Elementor page body only — so text keeps its contrast.
   Palette copied from the previous design's Additional CSS.
   ========================================================================== */
[data-elementor-type="wp-page"] {
	--primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #818cf8; --secondary: #8b5cf6; --accent: #06b6d4;
	--bg-dark: #0a0a1a; --bg-card: #12122a; --bg-card-hover: #1a1a35; --bg-surface: #16163a;
	--text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b;
	--border: rgba(99, 102, 241, .2); --radius: 12px; --radius-lg: 20px;
	--font-primary: var(--font-body);
	background: linear-gradient(135deg, #0a0a1a 0%, #12122a 50%, #1a0a2e 100%);
	color: var(--text-secondary);
	padding-block: var(--s6);
}
html body [data-elementor-type="wp-page"] :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title) { color: var(--text-primary); font-family: var(--font-head); }
html body [data-elementor-type="wp-page"] :is(p, li, .elementor-text-editor, .elementor-icon-list-text) { color: var(--text-secondary); }
html body [data-elementor-type="wp-page"] a:not(.elementor-button):not([class*="btn"]) { color: var(--primary-light); }
html body [data-elementor-type="wp-page"] strong { color: var(--text-primary); }
/* The theme title block shown above Elementor pages that have no H1 */
.aig-builder-hero + [data-elementor-type="wp-page"], .aig-builder-hero ~ * [data-elementor-type="wp-page"] { margin-top: 0; }
/* Keep legacy Elementor content inside the site's content width */
[data-elementor-type="wp-page"] { padding-inline: max(16px, calc((100% - var(--wrap)) / 2 + 24px)); }
[data-elementor-type="wp-page"] .elementor-section.elementor-section-stretched { width: 100% !important; left: 0 !important; }
