/*
Theme Name: CoreAIWeb
Theme URI: https://coreaiweb.com/
Author: CoreAIWeb
Author URI: https://coreaiweb.com/
Description: Lightweight, mobile-first theme for CoreAIWeb — free online tools with no signup. Dark navy header, indigo accents, card-based tool and category layouts. Built to pair with the companion "coreai-tools" plugin (CPT "tool", taxonomy "tool_category"); degrades gracefully when the plugin is inactive.
Version: 1.0.12
Requires at least: 6.0
Tested up to: 6.8
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: coreaiweb
Tags: tools, minimal, responsive, light, custom-colors
*/

/* ============================================================
   CoreAIWeb 1.0.6 — mobile-first SaaS theme stylesheet.
   Base styles target the phone. Enhancements step up at
   640px, 900px and 1200px. Spacing follows a 4/8/16/24/32/
   48/64/96 px rhythm; type scales with fluid clamp().
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
  --indigo-darker: #3730a3;
  --indigo-soft: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --violet: #7c3aed;

  --navy: #0f172a;
  --navy-2: #1e293b;
  --navy-3: #334155;

  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-strong: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --green: #16a34a;
  --green-soft: #f0fdf4;
  --green-border: #bbf7d0;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-border: #fecaca;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 8px rgba(15, 23, 42, .08);
  --shadow-indigo: 0 8px 24px rgba(79, 70, 229, .30);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Spacing rhythm (4px base unit) — section padding, card gaps and
     component rhythm all derive from these so the page breathes evenly. */
  --space-1: .25rem;  /* 4px  */
  --space-2: .5rem;   /* 8px  */
  --space-3: .75rem;  /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-5: 1.5rem;  /* 24px */
  --space-6: 2rem;    /* 32px */
  --space-7: 3rem;    /* 48px */
  --space-8: 4rem;    /* 64px */
  --space-9: 6rem;    /* 96px */

  /* Letter-spacing */
  --tracking-tight: -0.02em;
  --tracking-label: .06em;
  --tracking-eyebrow: .1em;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* hard guard: the page never scrolls sideways */
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }

ul, ol { padding: 0; }

img, svg, video, canvas, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

img, video, canvas { display: block; }

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Fluid, professional type scale */
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.02em; color: var(--text-strong); text-wrap: balance; }

h1 { font-size: clamp(1.9rem, 1.45rem + 2.4vw, 2.6rem); font-weight: 800; margin: .5rem 0 1rem; }
h2 { font-size: clamp(1.4rem, 1.22rem + 0.9vw, 1.75rem); font-weight: 750; margin: 2rem 0 .75rem; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 .5rem; }

p { margin: .65rem 0; }

ul, ol { margin: .65rem 0 .65rem 1.4rem; }
li { margin: .3rem 0; }

code, kbd, samp {
  font-family: var(--mono);
  font-size: .86em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .1em .42em;
  word-break: break-word;
}

pre {
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.55;
  background: var(--navy);
  color: #e2e8f0;
  border: 1px solid var(--navy-2);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  overflow-x: auto;
}
pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: inherit; }

blockquote {
  border-left: 4px solid var(--indigo-200);
  background: var(--indigo-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .9rem 1.15rem;
  margin: 1.25rem 0;
  color: var(--text);
}
blockquote p:first-child { margin-top: 0; }
blockquote p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---------- 3. Accessible focus ---------- */
:focus { outline: none; }

:focus-visible {
  outline: 2.5px solid var(--indigo);
  outline-offset: 3px;
  /* No border-radius override here: the outline follows each element's
     own radius in modern browsers, and forcing one would square off
     the cards' corners while focused. */
}

/* Indigo is invisible on navy — use a light ring on dark surfaces */
.site-header :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.cta-banner :focus-visible,
.mobile-drawer :focus-visible {
  outline-color: var(--indigo-200);
}

::selection { background: var(--indigo-200); color: var(--text-strong); }

/* ---------- 4. Layout primitives ---------- */
.page-wrap { display: block; }

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.page-main {
  min-width: 0;
  padding: 1.5rem 0 3rem;
}

/* WHITE-GAP FIX (1.0.6): on the front page the full-bleed hero is the
   first child of .page-main, so this top padding showed a ~24px band of
   body background between the sticky header and the hero. Zero it only
   on the front page — inner pages (breadcrumbs + H1) keep the spacing. */
body.home .page-main { padding-top: 0; }

/* Sidebar is a phone-hidden enhancement; it appears at 900px */
.sidebar { display: none; }

/* ---------- 5. Utilities ---------- */
.muted { color: var(--muted); }

.lede {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
  margin: .5rem 0 1.5rem;
}

.term-description { color: var(--muted); max-width: 72ch; margin: .25rem 0 1.5rem; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus-visible {
  position: fixed !important;
  top: .75rem; left: .75rem;
  z-index: 1000;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .8rem 1.2rem;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Ad slots render nothing until an AdSense ID is set — they must
   take up zero space when empty. */
.ad-slot { min-height: 0; }
.ad-slot:empty { display: none; }

/* The "anchor" slot (rendered after the footer) becomes a fixed
   bottom bar on phones once it is populated; it stays hidden on
   larger screens where a bottom banner would be intrusive. */
.ad-slot.ad-anchor {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 120;
  background: #fff;
  border-top: 1px solid var(--border);
  margin: 0;
  max-width: none;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  font-family: var(--font);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(180deg, #5d55f2 0%, var(--indigo) 100%);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
}
.btn:hover {
  background: linear-gradient(180deg, #5650f0 0%, var(--indigo-dark) 100%);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-indigo);
}
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

/* Disabled / loading states — buttons never look clickable when they aren't */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}
.btn.is-loading { cursor: progress; }

.btn-secondary {
  background: #e8edf5;
  color: var(--navy);
  border-color: var(--border);
}
.btn-secondary:hover { background: #dbe3ef; color: var(--navy); box-shadow: var(--shadow); }

.btn-ghost {
  background: transparent;
  color: #e2e8f0;
  border-color: var(--navy-3);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--navy-2); color: #fff; box-shadow: none; }

.btn-small {
  min-height: 44px;
  padding: .55rem 1rem;
  font-size: .88rem;
  border-radius: 10px;
}

/* ---------- 7. Form controls ---------- */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: .72rem .9rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}

textarea { min-height: 130px; resize: vertical; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  cursor: pointer;
}

input::placeholder, textarea::placeholder { color: #94a3b8; opacity: 1; }

input:hover, textarea:hover, select:hover { border-color: #a5b4fc; }

input:focus, textarea:focus, select:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .16);
  outline: none;
}

input[type="checkbox"], input[type="radio"] {
  width: 1.1rem; height: 1.1rem;
  accent-color: var(--indigo);
  flex-shrink: 0;
}

input[type="range"] { width: 100%; accent-color: var(--indigo); padding: 0; border: 0; }

input[type="color"] {
  width: 56px; height: 42px;
  padding: 3px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

label { font-weight: 600; font-size: .92rem; color: var(--text-strong); }

/* ---------- 8. Site header ---------- */
.site-header {
  background: rgba(13, 20, 38, .9);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200; /* above the drawer overlay so the toggle stays usable */
  box-shadow: 0 2px 16px rgba(2, 6, 23, .45);
}
/* Gradient hairline under the header — the premium seam. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 2%, rgba(129, 140, 248, .65) 30%, rgba(196, 181, 253, .65) 50%, rgba(103, 232, 249, .55) 70%, transparent 98%);
  pointer-events: none;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  margin-right: auto;
  padding: .35rem .2rem;
}
.logo:hover { text-decoration: none; color: #fff; }
.logo svg {
  flex: none;
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, .5));
  transition: transform .22s var(--ease);
}
.logo:hover svg { transform: scale(1.07) rotate(-4deg); }

/* Desktop nav: hidden on phones, the drawer takes over */
.main-nav { display: none; }

/* Icon search link in the header — always a 44px+ tap target */
.search-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.search-toggle svg { display: block; }

/* Hamburger: 44px+ tap target, phone/tablet only */
.nav-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  color: #e2e8f0;
  background: transparent;
  border: 1.5px solid var(--navy-3);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-toggle:hover { background: var(--navy-2); color: #fff; }
.nav-toggle[aria-expanded="true"] { background: var(--navy-2); color: #fff; border-color: var(--indigo); }

/* ---------- 9. Mobile drawer (driven by js/theme.js) ----------
   States: nav#mobile-drawer.is-open, button.nav-toggle[aria-expanded],
   body.drawer-open (overlay + scroll lock). The drawer is a real
   slide-in panel from the right edge with a dimming overlay. */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: 300;
  width: min(340px, 88vw);
  height: 100dvh;
  background: var(--navy-2);
  border-left: 1px solid var(--navy-3);
  box-shadow: -16px 0 48px rgba(2, 6, 23, .45);
  padding: 4.5rem 0 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;

  transform: translateX(103%);
  visibility: hidden;
  transition: transform .32s var(--ease), visibility 0s linear .32s;
}
.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .32s var(--ease), visibility 0s;
}

.drawer-close {
  position: absolute;
  top: 1rem; right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: #e2e8f0;
  background: transparent;
  border: 1.5px solid var(--navy-3);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.drawer-close:hover { background: var(--navy-3); color: #fff; }

.drawer-links { display: flex; flex-direction: column; }
.drawer-links a {
  display: flex;
  align-items: center;
  min-height: 52px; /* >=44px tap targets */
  padding: .8rem 1.5rem;
  color: #e2e8f0;
  font-size: 1.02rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  /* Start slightly offset + transparent; the .is-open rules below
     bring each link in with a stagger for a polished entrance. */
  transform: translateX(18px);
  opacity: 0;
  transition: transform .34s var(--ease), opacity .34s var(--ease),
    background-color .15s var(--ease), color .15s var(--ease);
}
.drawer-links a:first-child { border-top: 1px solid rgba(148, 163, 184, .14); }
.drawer-links a:hover { background: var(--navy-3); color: #fff; text-decoration: none; }
.drawer-links a::after {
  content: "\203A";
  margin-left: auto;
  color: var(--indigo-200);
  font-size: 1.3rem;
  line-height: 1;
}

/* Staggered link entrance while the drawer opens. Delays live only on
   the open state so closing stays snappy. */
.mobile-drawer.is-open .drawer-links a { transform: none; opacity: 1; }
.mobile-drawer.is-open .drawer-links a:nth-child(1) { transition-delay: .03s; }
.mobile-drawer.is-open .drawer-links a:nth-child(2) { transition-delay: .06s; }
.mobile-drawer.is-open .drawer-links a:nth-child(3) { transition-delay: .09s; }
.mobile-drawer.is-open .drawer-links a:nth-child(4) { transition-delay: .12s; }
.mobile-drawer.is-open .drawer-links a:nth-child(5) { transition-delay: .15s; }
.mobile-drawer.is-open .drawer-links a:nth-child(6) { transition-delay: .18s; }
.mobile-drawer.is-open .drawer-links a:nth-child(7) { transition-delay: .21s; }
.mobile-drawer.is-open .drawer-links a:nth-child(8) { transition-delay: .24s; }
.mobile-drawer.is-open .drawer-links a:nth-child(9) { transition-delay: .27s; }
.mobile-drawer.is-open .drawer-links a:nth-child(10) { transition-delay: .30s; }
.mobile-drawer.is-open .drawer-links a:nth-child(11) { transition-delay: .33s; }
.mobile-drawer.is-open .drawer-links a:nth-child(12) { transition-delay: .36s; }

/* Dimming overlay: always rendered, faded in/out with the drawer so
   BOTH open and close animate smoothly (theme.js toggles
   body.drawer-open). Purely visual — theme.js closes via Escape /
   toggle / close button / link tap. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 150; /* below .site-header (200), above page content */
  background: rgba(2, 6, 23, .55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s var(--ease), visibility 0s linear .28s;
}
body.drawer-open { overflow: hidden; }
body.drawer-open::before {
  opacity: 1;
  visibility: visible;
  transition: opacity .28s var(--ease);
}

/* ---------- 10. Hero (full-bleed dark aurora) ----------
   The hero sits inside .container, so it bleeds to the viewport
   edges with exact negative margins: (100vw - 100%) / 2 equals
   half the scrollbar-free gutter, so no horizontal overflow.
   1.0.6: de-templated — deep-navy aurora base + drifting color
   blobs (::before) + fading grid texture (::after), instead of the
   flat saturated purple gradient. Stays dark in both themes. */
.hero.hero-bleed {
  margin-left: calc((100% - 100vw) / 2);
  margin-right: calc((100% - 100vw) / 2);
  padding: 3.5rem calc((100vw - 100%) / 2 + var(--space-4)) 3rem;
  background-color: #0a0f24; /* flat fallback under the layered art */
  background: linear-gradient(180deg, #121a3d 0%, #0a0f24 72%);
  color: #fff;
  text-align: center;
  overflow: hidden;
  position: relative;
  isolation: isolate; /* contain the ::before/::after glow layers */
}
/* Aurora color blobs — slow drift for depth. */
.hero.hero-bleed::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 0;
  background:
    radial-gradient(620px 400px at 14% 18%, rgba(99, 102, 241, .38), transparent 65%),
    radial-gradient(720px 440px at 86% 12%, rgba(139, 92, 246, .32), transparent 65%),
    radial-gradient(600px 420px at 50% 108%, rgba(34, 211, 238, .17), transparent 65%),
    radial-gradient(420px 300px at 78% 78%, rgba(236, 72, 153, .12), transparent 65%);
  filter: blur(12px);
  animation: hero-aurora 20s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes hero-aurora {
  from { transform: translate3d(-2.5%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 2%, 0) scale(1.07); }
}
/* Fading blueprint grid texture. */
.hero.hero-bleed::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .09) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 85% 72% at 50% 28%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 72% at 50% 28%, #000 25%, transparent 78%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero.hero-bleed::before { animation: none; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

/* Anchor target for the CTA "Get Started Free" button — keep clear of
   the sticky header when jumping to it. */
#tool-categories { scroll-margin-top: calc(var(--header-h) + 1.25rem); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: .44rem 1.05rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: var(--space-5);
  color: #e8edf9;
  box-shadow: 0 2px 14px rgba(2, 6, 23, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}
/* Live pulse dot — the badge feels alive. */
.hero-badge .dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .55);
  animation: badge-pulse 2.4s ease-out infinite;
}
@keyframes badge-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-badge .dot { animation: none; }
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 1.8rem + 3.8vw, 3.5rem); /* ~3.5rem on desktop */
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1rem;
  text-shadow: 0 2px 24px rgba(2, 6, 23, .5);
  text-wrap: balance;
}
/* Gradient accent words inside the H1. */
.hero h1 .h-accent { color: #c4b5fd; } /* fallback for old browsers */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 .h-accent {
    background: linear-gradient(94deg, #a5b4fc 0%, #c4b5fd 42%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.hero-sub {
  color: #b9c4dd;
  font-size: clamp(1.04rem, 1rem + .5vw, 1.22rem);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 1.6rem;
  text-wrap: pretty;
}

/* Search: stacked full-width on phones, inline pill on larger screens */
.hero-search {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: .45rem;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  padding: .85rem 1.1rem;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}
.hero-search input:hover { border: 0; }
.hero-search input:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, .22); }
.hero-search .btn { width: 100%; }
.search-page-form { margin: 1.5rem 0; }

/* ---------- 11. Hero stats — 4 consistent tiles ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
}
.hstat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem .75rem;
  text-align: center;
}
.hstat .v {
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: 1.15;
}
.hstat .l {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: .3rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ---------- 12. Section titles ---------- */
h2.section-title,
.faq.faq-accordion > h2 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: clamp(1.4rem, 1.24rem + .9vw, 1.8rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  margin: var(--space-7) 0 var(--space-5);
}
h2.section-title::before,
.faq.faq-accordion > h2::before {
  content: "";
  flex: none;
  width: 6px;
  height: 1.6em;
  border-radius: 999px;
  background: linear-gradient(180deg, #818cf8, #7c3aed 60%, #22d3ee);
  box-shadow: 0 2px 10px rgba(99, 102, 241, .45);
}

/* ---------- 13. Category cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr; /* single column on phones */
  gap: var(--space-4);
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  color: var(--text);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  /* Per-category accent (set by .cat-{slug} below); indigo fallback. */
  --cat: #6366f1;
}
.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--indigo-200);
  border-color: color-mix(in srgb, var(--cat) 45%, transparent);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
/* One accent per category — kills the "same purple everywhere" template feel. */
.cat-card.cat-text        { --cat: #0ea5e9; }
.cat-card.cat-image       { --cat: #8b5cf6; }
.cat-card.cat-pdf         { --cat: #f43f5e; }
.cat-card.cat-seo         { --cat: #f59e0b; }
.cat-card.cat-dev         { --cat: #06b6d4; }
.cat-card.cat-calculators { --cat: #10b981; }
.cat-card.cat-utility     { --cat: #6366f1; }
.cat-card.cat-css         { --cat: #3b82f6; }
.cat-card.cat-security    { --cat: #f97316; }
.cat-card.cat-youtube     { --cat: #ef4444; }
.cat-card.cat-downloads   { --cat: #14b8a6; }
.cat-icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--indigo-soft);
  background: color-mix(in srgb, var(--cat) 13%, transparent);
  color: var(--indigo);
  color: var(--cat);
  margin-bottom: .5rem;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cat-icon svg { width: 24px; height: 24px; flex: none; }
.cat-card:hover .cat-icon {
  background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 55%, #7c3aed));
  color: #fff;
  transform: scale(1.06) rotate(-4deg);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--cat) 40%, transparent);
}
.cat-card h3 { font-size: 1.05rem; margin: 0; transition: color .18s var(--ease); }
.cat-card:hover h3 { color: var(--indigo-dark); color: var(--cat); }
.cat-card p { font-size: .86rem; color: var(--muted); margin: 0; }

/* ---------- 14. Tool cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr; /* single column on phones */
  gap: var(--space-3);
}

.tool-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .95rem 1.05rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.tool-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
.tool-card strong {
  display: block;
  font-size: .96rem;
  font-weight: 650;
  color: var(--text-strong);
  line-height: 1.35;
}
.tool-card .tool-desc {
  display: block;
  margin-top: .25rem;
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- 15. Blog post cards ----------
   .post-art is decorative CSS-gradient art; the document SVG
   inside .post-art-icon sits on top of it. */
.post-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--indigo-200);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.post-art {
  flex: none;
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(420px 200px at 80% 0%, rgba(255, 255, 255, .22), transparent 60%),
    linear-gradient(135deg, var(--indigo) 0%, var(--violet) 60%, #2563eb 100%);
}
.post-art-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, .35));
}
.post-art-icon svg { width: 52px; height: 52px; flex: none; }

.post-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  padding: 1.25rem 1.35rem 1.35rem;
}
.post-body h3 { font-size: 1.12rem; margin: 0; color: var(--text-strong); transition: color .18s var(--ease); }
.post-card:hover .post-body h3 { color: var(--indigo-dark); }
.post-excerpt { font-size: .92rem; color: var(--muted); margin: 0; }

.read-more {
  font-size: .9rem;
  font-weight: 700;
  color: var(--indigo);
  margin-top: .35rem;
}
.post-card:hover .read-more { text-decoration: underline; }

.post-body time {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ---------- 16. Steps (How it works) ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  overflow: hidden;
}
.step-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
}
.step-icon {
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--indigo-soft);
  color: var(--indigo);
  margin-bottom: .9rem;
}
.step-icon svg { width: 26px; height: 26px; }
.step-card h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.step-card p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- 17. Why CoreAIWeb — equal-height cards ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch; /* equal heights */
}

.why-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.why-card h3 { font-size: 1.08rem; margin: 0 0 .45rem; color: var(--indigo-darker); }
.why-card p { font-size: .92rem; color: var(--muted); margin: 0; flex: 1; }

/* ---------- 18. Breadcrumbs ---------- */
.crumbs {
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 .9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}
.crumbs a { color: var(--muted); transition: color .14s var(--ease); }
.crumbs a:hover { color: var(--indigo); text-decoration: none; }
.crumbs [aria-current="page"] { color: var(--text-strong); font-weight: 650; }

/* ---------- 19. FAQ accordion ----------
   Markup: section.faq.faq-accordion > h2 + details > summary + div.a */
.faq.faq-accordion { margin: 2.5rem 0; max-width: 860px; }

.faq.faq-accordion details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .7rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.faq.faq-accordion details:hover { border-color: var(--indigo-200); }
.faq.faq-accordion details[open] {
  border-color: var(--indigo-200);
  box-shadow: var(--shadow);
}

.faq.faq-accordion summary {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: 100%;
  min-height: 56px;
  padding: .95rem 1.15rem;
  font-weight: 700;
  font-size: .98rem;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}
.faq.faq-accordion summary::-webkit-details-marker { display: none; }
.faq.faq-accordion summary::marker { content: ""; }

/* Custom chevron marker (no emoji) */
.faq.faq-accordion summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--indigo-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .25s var(--ease), background-color .2s var(--ease);
}
.faq.faq-accordion details[open] summary::after {
  transform: rotate(180deg);
  background-color: var(--indigo-100);
}

.faq.faq-accordion details[open] summary { color: var(--indigo-darker); }

.faq.faq-accordion .a {
  padding: 0 1.15rem 1.25rem;
  color: var(--text);
  font-size: .94rem;
  animation: faq-in .28s var(--ease);
}
.faq.faq-accordion .a > :first-child { margin-top: 0; }
.faq.faq-accordion .a > :last-child { margin-bottom: 0; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 20. Article typography (tool / post / page / index) ---------- */
/* Quick-answer block (GEO answer-first snippet under the tool UI). */
.quick-answer {
  max-width: 76ch;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--indigo);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(135deg, rgba(79,70,229,.07), rgba(124,58,237,.07));
  font-size: 1.02rem;
  line-height: 1.65;
}
.quick-answer p { margin: 0; }
/* Category intro + tool sources (phase-2 SEO content). */
.cat-intro {
  max-width: 76ch;
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-soft, #4b5563);
}
.cat-intro p { margin: 0; }
.tool-sources {
  max-width: 76ch;
  margin: 2rem 0;
  font-size: .95rem;
}
.tool-sources h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.tool-sources ul { margin: .5rem 0 0 1.25rem; }
.tool-sources li { margin-bottom: .35rem; }
.tool-article, .post-article, .page-article, .entry-content {
  max-width: 76ch;
  font-size: 1.02rem;
  color: var(--text);
}

.tool-article > :first-child, .post-article > :first-child,
.page-article > :first-child, .entry-content > :first-child { margin-top: 0; }

.tool-article h2, .post-article h2, .page-article h2, .entry-content h2 {
  font-size: clamp(1.35rem, 1.2rem + .8vw, 1.6rem);
  padding-top: .5rem;
  border-top: 0;
}
.tool-article h3, .post-article h3, .page-article h3, .entry-content h3 { font-size: 1.15rem; }

.tool-article a, .post-article a, .page-article a, .entry-content a { font-weight: 600; }

.tool-article ul, .post-article ul, .page-article ul, .entry-content ul,
.tool-article ol, .post-article ol, .page-article ol, .entry-content ol {
  margin-left: 1.5rem;
}
.tool-article li::marker, .post-article li::marker,
.page-article li::marker, .entry-content li::marker { color: var(--indigo); font-weight: 700; }

/* Responsive tables: the table itself becomes the scroll container
   (no wrapper exists in the markup), so wide tables scroll
   horizontally inside the article without breaking the page. */
.tool-article table, .post-article table,
.page-article table, .entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .92rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.tool-article thead, .post-article thead,
.page-article thead, .entry-content thead { display: table-header-group; }
.tool-article tbody, .post-article tbody,
.page-article tbody, .entry-content tbody { display: table-row-group; }
.tool-article tr, .post-article tr,
.page-article tr, .entry-content tr { display: table-row; }
.tool-article th, .post-article th,
.page-article th, .entry-content th,
.tool-article td, .post-article td,
.page-article td, .entry-content td {
  display: table-cell;
  border: 1px solid var(--border);
  padding: .6rem .8rem;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.tool-article th, .post-article th, .page-article th, .entry-content th {
  background: var(--indigo-soft);
  color: var(--indigo-darker);
  font-weight: 700;
  white-space: nowrap;
}
.tool-article tbody tr:nth-child(even), .post-article tbody tr:nth-child(even),
.page-article tbody tr:nth-child(even), .entry-content tbody tr:nth-child(even) { background: #fbfcff; }

/* WordPress core image helpers */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.25rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.25rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .4rem; }
figure.wp-block-image { margin: 1.25rem 0; }

/* ---------- 21. Sidebar ---------- */
.sidebar-inner { display: flex; flex-direction: column; gap: 1.25rem; }

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
}
.side-card h3 {
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--indigo-darker);
  margin: 0 0 .7rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--indigo-soft);
}
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li { margin: 0; border-bottom: 1px solid #f1f5f9; }
.side-card li:last-child { border-bottom: 0; }
.side-card li a {
  display: block;
  padding: .55rem .25rem;
  font-size: .9rem;
  font-weight: 550;
  color: var(--text);
  transition: color .14s var(--ease), padding-left .14s var(--ease);
}
.side-card li a:hover { color: var(--indigo); text-decoration: none; padding-left: .5rem; }
.side-card li[aria-current="page"] a { color: var(--indigo); font-weight: 700; }

/* ---------- 22. Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  margin-top: var(--space-8);
  position: relative;
}
/* Gradient hairline on top of the footer — echoes the header seam. */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 2%, rgba(129, 140, 248, .5) 30%, rgba(196, 181, 253, .5) 50%, rgba(103, 232, 249, .4) 70%, transparent 98%);
  pointer-events: none;
}

.footer-inner.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-4) 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.footer-col > strong,
.footer-col.footer-menu > strong {
  display: block;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 .9rem;
}

.footer-col a { color: #94a3b8; font-size: .9rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }

/* Brand column */
.footer-brand .logo { margin: 0 0 1rem; padding: 0; font-size: 1.3rem; }
.footer-brand p { font-size: .9rem; color: #94a3b8; max-width: 34ch; }
.footer-brand p a { color: var(--indigo-200); font-weight: 600; }

/* Categories / Company / Legal link columns */
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-col > a,
.footer-col li a {
  display: inline-block;
  padding: .32rem 0;
  transition: color .14s var(--ease), padding-left .14s var(--ease);
}
.footer-col > a:hover, .footer-col li a:hover { padding-left: .25rem; }

.footer-link-disabled {
  display: block;
  color: #475569;
  font-size: .9rem;
  padding: .32rem 0;
}

/* Real footer menu: wp_nav_menu items_wrap emits <li> items directly
   inside .footer-col.footer-menu (no <ul> wrapper). */
.footer-menu { list-style: none; }
.footer-menu li { list-style: none; margin: 0; }

.footer-bottom {
  border-top: 1px solid var(--navy-2);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: .82rem;
  color: #64748b;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- 23. Search ---------- */
.search-count { margin: 1.25rem 0 .25rem; font-size: .92rem; }

.search-results {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}

/* Compact result rows — a leaner take on .post-card */
.post-card.search-result {
  flex-direction: column;
  padding: 1.1rem 1.25rem;
  gap: .3rem;
}
.type-label {
  display: inline-block;
  align-self: flex-start;
  background: var(--indigo-soft);
  color: var(--indigo-dark);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .22rem .65rem;
  border-radius: 999px;
}
.post-card.search-result h3 { font-size: 1.05rem; margin: 0; }
.post-card.search-result p { font-size: .9rem; margin: 0; }

/* ---------- 24. Single post / page extras ---------- */
.post-meta { font-size: .85rem; margin: .25rem 0 1.25rem; }

.post-thumbnail {
  margin: 1.25rem 0 1.75rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.post-thumbnail img { width: 100%; }

.post-tags { font-size: .88rem; margin-top: 2rem; }
.post-tags a {
  display: inline-block;
  background: var(--indigo-soft);
  color: var(--indigo-dark);
  font-weight: 600;
  font-size: .8rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  margin: 0 .35rem .4rem 0;
}
.post-tags a:hover { background: var(--indigo-100); text-decoration: none; }

.post-nav {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.post-nav-prev a, .post-nav-next a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: .9rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.post-nav-prev a:hover, .post-nav-next a:hover {
  border-color: var(--indigo-200);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--indigo-dark);
}

/* index.php fallback */
.entry-header { margin-bottom: 1rem; }
.entry-title { margin: 0; }

/* ---------- 25. Pagination ---------- */
.pagination { margin: 2.5rem 0 1rem; }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  align-items: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem .9rem;
  font-size: .9rem;
  font-weight: 650;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.pagination a.page-numbers:hover {
  border-color: var(--indigo);
  color: var(--indigo-dark);
  text-decoration: none;
}
.pagination .page-numbers.current {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.pagination .page-numbers.dots { border: 0; background: transparent; box-shadow: none; min-width: 0; }

/* ---------- 26. 404 ---------- */
.center-card {
  max-width: 580px;
  margin: 2rem auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 3rem 1.5rem;
}
.center-card h1 { font-size: clamp(2rem, 1.7rem + 2vw, 2.6rem); }
.center-card .hero-search { margin: 1.5rem auto 1.25rem; text-align: left; }
.center-card > p:last-child { margin-bottom: 0; }

/* ============================================================
   27. TOOL UI — premium styling for the plugin's #tool-app.
   Scoped under #tool-app so it beats the plugin's own
   stylesheet (theme CSS loads after it) without leaking out.
   ============================================================ */
#tool-app { margin: 1.5rem 0 2rem; }

#tool-app .tool-ui {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  margin: 0;
  position: relative;
  overflow: hidden;
}
#tool-app .tool-ui::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--indigo), var(--violet), #2563eb);
}

#tool-app .tool-ui h3 { margin-top: 0; font-size: 1.05rem; }
#tool-app .tool-ui h4 { margin-top: 1.25rem; font-size: .95rem; }

/* Fields */
#tool-app .field { margin-bottom: 1rem; }
#tool-app .field > label {
  display: block;
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-strong);
  margin-bottom: .4rem;
}
#tool-app .field .help {
  display: block;
  font-size: .78rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: .3rem;
}
#tool-app .field-row { display: grid; gap: 1rem; }

/* Action rows */
#tool-app .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1.1rem 0;
  align-items: center;
}
#tool-app .btn-row .btn { flex: 1 1 auto; }

/* Results area */
#tool-app .tool-results { margin-top: 1.5rem; }
#tool-app .tool-results:empty { display: none; }

#tool-app .output-label {
  display: block;
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--indigo-darker);
  margin: 1.25rem 0 .45rem;
}

#tool-app .output-code {
  background: var(--navy);
  color: #e2e8f0;
  border: 1px solid var(--navy-2);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  font-family: var(--mono);
  font-size: .86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  user-select: text;
  -webkit-user-select: text;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .3);
}

/* Plugin stat tiles (distinct from homepage .hero-stats) */
#tool-app .stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin: 1rem 0;
}
#tool-app .stat {
  background: linear-gradient(180deg, var(--indigo-soft) 0%, #f5f3ff 100%);
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  text-align: center;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
#tool-app .stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
#tool-app .stat.highlight {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-indigo);
}
#tool-app .stat .v {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--indigo-darker);
  line-height: 1.15;
  word-break: break-word;
}
#tool-app .stat.highlight .v { color: #fff; }
#tool-app .stat .l {
  font-size: .76rem;
  font-weight: 650;
  color: var(--muted);
  margin-top: .3rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
#tool-app .stat.highlight .l { color: var(--indigo-100); }

/* Upload dropzone */
#tool-app .dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  cursor: pointer;
  background: #fbfcff;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), transform .18s var(--ease);
}
#tool-app .dropzone:hover, #tool-app .dropzone.drag {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  color: var(--indigo-darker);
  transform: scale(1.005);
}
#tool-app .dropzone strong { display: block; color: var(--text-strong); font-size: 1.02rem; margin-bottom: .25rem; }

/* Preview box */
#tool-app .preview-box {
  background: #fbfcff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .75rem 0;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#tool-app .preview-box:empty { display: none; }
#tool-app .preview-box img, #tool-app .preview-box canvas { border-radius: var(--radius-sm); }

/* Checklist items */
#tool-app .check-item {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin-bottom: .6rem;
  cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
#tool-app .check-item:hover { border-color: var(--indigo-200); background: #fbfcff; }
#tool-app .check-item input { margin-top: .2rem; width: 1.2rem; height: 1.2rem; }
#tool-app .check-item .pts {
  margin-left: auto;
  flex: none;
  font-size: .74rem;
  font-weight: 800;
  color: var(--indigo-dark);
  background: var(--indigo-soft);
  border-radius: 999px;
  padding: .2rem .6rem;
  white-space: nowrap;
}

/* Score bar */
#tool-app .score-bar {
  height: 14px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, .12);
}
#tool-app .score-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  border-radius: 999px;
  transition: width .45s var(--ease);
}

/* Big result readout */
#tool-app .big-display {
  font-size: clamp(2.6rem, 2rem + 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--indigo-darker);
  font-variant-numeric: tabular-nums;
  margin: .75rem 0;
  line-height: 1.1;
}

/* Verdict banner */
#tool-app .verdict {
  background: linear-gradient(180deg, var(--indigo-soft), #f5f3ff);
  border: 1.5px solid var(--indigo-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-top: 1rem;
  font-size: .96rem;
}
#tool-app .verdict strong { color: var(--indigo-darker); }

/* Notes, errors, counts, progress */
#tool-app .result-note {
  background: var(--amber-soft);
  border: 1.5px solid var(--amber-border);
  border-radius: var(--radius);
  padding: .85rem 1.05rem;
  font-size: .88rem;
  color: #92400e;
  margin-top: 1rem;
}

#tool-app .tool-error,
.tool-error {
  background: var(--red-soft);
  border: 1.5px solid var(--red-border);
  color: #991b1b;
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin: 1rem 0;
  font-size: .92rem;
  font-weight: 550;
}

#tool-app .char-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  margin-top: .3rem;
  font-variant-numeric: tabular-nums;
}

#tool-app .progress {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--indigo-dark);
  margin: .75rem 0;
}
#tool-app .progress::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--indigo);
  animation: progress-pulse 1.1s ease-in-out infinite;
}
@keyframes progress-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.6); opacity: .5; }
}

/* Before / after panes */
#tool-app .before-after { display: grid; gap: 1rem; margin: 1.25rem 0; }
#tool-app .ba-pane {
  background: #fbfcff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem;
  text-align: center;
  min-width: 0;
}
#tool-app .ba-pane canvas, #tool-app .ba-pane img {
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  margin: 0 auto;
}
#tool-app .ba-pane .cap, #tool-app .cap {
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .55rem;
}

/* CSS lab */
#tool-app .css-lab { display: grid; gap: 1.25rem; margin: 1rem 0; }
#tool-app .lab-preview {
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%, transparent 75%, #f1f5f9 75%),
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%, transparent 75%, #f1f5f9 75%),
    #fbfcff;
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  overflow: hidden;
}

/* Generated HTML preview */
#tool-app .gen-html {
  background: #fff;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
}
#tool-app .gen-html:empty { display: none; }

/* Direction toggle (segmented control) */
#tool-app .dir-toggle {
  display: inline-flex;
  background: #e8edf5;
  border-radius: 999px;
  padding: .3rem;
  margin-bottom: 1rem;
  gap: .15rem;
}
#tool-app .dir-toggle button {
  border: 0;
  background: transparent;
  padding: .55rem 1.25rem;
  min-height: 44px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  color: var(--muted);
  transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
#tool-app .dir-toggle button:hover { color: var(--text); }
#tool-app .dir-toggle button.active {
  background: #fff;
  color: var(--indigo-dark);
  box-shadow: var(--shadow);
}

/* Copy / download buttons injected by tools inherit .btn; keep them
   comfortably tappable and left-aligned inside results. */
#tool-app .tool-results .btn { min-height: 44px; }

/* ============================================================
   27. Homepage v1.0.2 sections — eyebrows, subheads, free tags,
   What-We-Offer cards, numbered steps, quick-access chips, CTA.
   ============================================================ */

/* Eyebrow kicker above section titles + styled subtext below them */
.section-eyebrow {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--indigo);
  margin: var(--space-7) 0 calc(-1 * var(--space-3));
}
h2.section-title + .section-sub,
.section-eyebrow + .section-title + .section-sub {
  margin-top: -.6rem;
}
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 var(--space-5);
}
.section-eyebrow + h2.section-title { margin-top: 0; }

/* "Free" pill tag on category cards */
.cat-card { position: relative; }
.free-tag {
  position: absolute;
  top: .9rem;
  right: .9rem;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  padding: .2rem .6rem;
  border-radius: 999px;
}

/* What We Offer — horizontal detail cards */
.offer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.offer-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
  color: var(--text);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.offer-card:hover {
  transform: translateY(-3px);
  border-color: var(--indigo-200);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.offer-icon {
  flex: none;
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}
.offer-icon svg { width: 26px; height: 26px; flex: none; }
.offer-body {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}
.offer-body > strong {
  font-size: 1.02rem;
  color: var(--text-strong);
  transition: color .18s var(--ease);
}
.offer-card:hover .offer-body > strong { color: var(--indigo-dark); }
.offer-blurb {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.55;
}
.offer-count {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--indigo-dark);
}

/* Numbered steps (How it works) */
.step-card { padding-top: 1.75rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1; /* optical centering of the digit */
  margin-bottom: .9rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}

/* Quick Access — clickable tool chips */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.quick-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .7rem 1rem;
  font-size: .86rem;
  font-weight: 650;
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
  min-height: 44px;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s var(--ease);
}
.quick-chip:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
.quick-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-chip svg { flex: none; color: var(--indigo); transition: transform .18s var(--ease); }
.quick-chip:hover svg { transform: translateX(3px); }

/* CTA banner before the footer — dark aurora, matching the hero. */
.cta-banner {
  margin: 3.5rem 0 0;
  border-radius: var(--radius-lg);
  background-color: #0a0f24; /* flat fallback under the layered art */
  background: linear-gradient(180deg, #121a3d 0%, #0a0f24 75%);
  color: #fff;
  text-align: center;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(129, 140, 248, .22);
  box-shadow: 0 24px 60px rgba(2, 6, 23, .35);
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 0;
  background:
    radial-gradient(560px 340px at 18% 20%, rgba(99, 102, 241, .35), transparent 65%),
    radial-gradient(620px 360px at 84% 18%, rgba(139, 92, 246, .3), transparent 65%),
    radial-gradient(520px 360px at 50% 110%, rgba(34, 211, 238, .15), transparent 65%);
  filter: blur(12px);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  z-index: 1;
  padding: var(--space-7) var(--space-5);
  max-width: 640px;
  margin: 0 auto;
}
.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 1.25rem + 1.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 .75rem;
  text-shadow: 0 2px 14px rgba(15, 23, 42, .35);
}
.cta-banner p {
  color: var(--indigo-100);
  font-size: 1.02rem;
  margin: 0 0 1.75rem;
}
.btn-cta {
  background: #fff;
  color: var(--indigo-dark);
  font-size: 1.05rem;
  padding: .95rem 2.2rem;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .35);
}
.btn-cta:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--indigo-darker);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .4);
}

/* ============================================================
   28. Breakpoints — enhancements step up from the phone base.
   ============================================================ */

/* ---------- 640px: small tablets / large phones ---------- */
@media (min-width: 640px) {
  /* Hero search goes inline; the button stretches to the input's exact
     height so the pair stays pixel-aligned. */
  .hero-search { flex-direction: row; align-items: stretch; padding: .4rem; }
  .hero-search input { align-self: center; }
  .hero-search .btn { width: auto; flex: none; align-self: stretch; }

  /* Grids gain columns */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }

  /* Post cards go horizontal: art panel left, body right */
  .post-card { flex-direction: row; }
  .post-art { width: 230px; min-height: 0; align-self: stretch; }
  .post-art-icon svg { width: 60px; height: 60px; }
  .post-body { flex: 1 1 0; min-width: 0; justify-content: center; }

  /* Search result rows stay full-width and compact */
  .post-card.search-result { flex-direction: column; }

  /* Prev/next post links side by side */
  .post-nav { flex-direction: row; }
  .post-nav-prev, .post-nav-next { flex: 1; }
  .post-nav-next { text-align: right; }

  /* Footer: 2 columns */
  .footer-inner.footer-grid { grid-template-columns: repeat(2, 1fr); }

  /* Tool UI */
  #tool-app .field-row.cols-2 { grid-template-columns: 1fr 1fr; }
  #tool-app .field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  #tool-app .stat-grid { grid-template-columns: repeat(4, 1fr); }
  #tool-app .before-after { grid-template-columns: 1fr 1fr; }
  #tool-app .tool-ui { padding: 2rem; }
  #tool-app .btn-row .btn { flex: 0 0 auto; }
}

/* ---------- 900px: tablets landscape / small desktops ---------- */
@media (min-width: 900px) {
  /* Desktop nav replaces the hamburger */
  .main-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav > li { list-style: none; margin: 0; flex: none; }
  .main-nav > a,
  .main-nav > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .8rem;
    font-size: .9rem;
    font-weight: 600;
    color: #cbd5e1;
    border-radius: 9px;
    white-space: nowrap;
    transition: background-color .14s var(--ease), color .14s var(--ease);
  }
  .main-nav > a:hover,
  .main-nav > li > a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
  /* Animated underline on desktop nav links — premium micro-interaction. */
  .main-nav > a,
  .main-nav > li > a { position: relative; }
  .main-nav > a::after,
  .main-nav > li > a::after {
    content: "";
    position: absolute;
    left: .8rem; right: .8rem; bottom: .3rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--indigo-200), #67e8f9);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s var(--ease);
  }
  .main-nav > a:hover::after,
  .main-nav > li > a:hover::after,
  .main-nav > a:focus-visible::after,
  .main-nav > li > a:focus-visible::after { transform: scaleX(1); }
  .main-nav .current-menu-item > a,
  .main-nav > a[aria-current="page"] {
    background: var(--navy-2);
    color: #fff;
    box-shadow: inset 0 0 0 1.5px var(--navy-3);
  }
  .nav-toggle { display: none; }

  /* Guarantee no stuck drawer state if the viewport grew while open */
  body.drawer-open { overflow: visible; }
  body.drawer-open::before { display: none; }
  .mobile-drawer {
    visibility: hidden;
    transform: translateX(103%);
    transition: transform .32s var(--ease), visibility 0s linear .32s;
  }

  /* Content + sidebar grid (single column where there is no sidebar) */
  .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    align-items: start;
  }
  /* Pages without a sidebar (homepage, blog, search, …) span the full
     row instead of leaving a dead 300px gutter. */
  .container > .page-main:only-child { grid-column: 1 / -1; }
  .sidebar { display: block; padding: 1.5rem 0 3rem; min-width: 0; }
  .sidebar-inner {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: calc(100vh - var(--header-h) - 2rem);
    overflow-y: auto;
  }

  /* Grids gain columns */
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .offer-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }

  /* Stats: 4 across once each tile has comfortable room */
  .hero-stats { grid-template-columns: repeat(4, 1fr); }

  /* Footer: full 4-column grid (brand / categories / company / legal) */
  .footer-inner.footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }

  /* CTA banner gets more breathing room on larger screens */
  .cta-inner { padding: var(--space-8) var(--space-6); }

  /* Anchor ad slot stays hidden on larger screens */
  .ad-slot.ad-anchor { display: none; }

  /* Tool UI */
  #tool-app .css-lab { grid-template-columns: 300px minmax(0, 1fr); }
}

/* ---------- 1200px: desktops ---------- */
@media (min-width: 1200px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
  .header-inner { padding-left: 1.5rem; padding-right: 1.5rem; }

  .hero.hero-bleed { padding-top: 4rem; padding-bottom: 4rem; }

  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(6, 1fr); }

  .page-main { padding-top: 2rem; }
}

/* ============================================================
   29. Reduced motion — disable transitions and animations.
   ============================================================ */
/* ============================================================
   29. Reduced motion — disable transitions and animations.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important; /* kill the drawer stagger too */
  }
}

/* ============================================================
   30. Theme toggle (dark / light) — sits beside the search icon.
   ============================================================ */
.theme-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  color: #e2e8f0;
  background: transparent;
  border: 1.5px solid var(--navy-3);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { background: var(--navy-2); color: #fff; transform: translateY(-1px); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   31. Homepage quick-tool widget.
   Glassmorphic tabbed widget inside the hero: Word Counter,
   Case Converter and QR Generator, usable without scrolling.
   The hero stays a dark gradient in both themes, so the glass
   styling works identically in light and dark mode.
   ============================================================ */
.quick-tool {
  position: relative;
  z-index: 0;
  max-width: 680px;
  margin: 1.6rem auto 0;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .07));
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, .5), inset 0 1px 0 rgba(255, 255, 255, .22);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  padding: 1.2rem;
  color: #fff;
}
/* Aurora glow halo behind the widget — it commands the hero. */
.quick-tool::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(129, 140, 248, .55), rgba(167, 139, 250, .28) 45%, rgba(103, 232, 249, .4));
  filter: blur(22px);
  opacity: .5;
  pointer-events: none;
}
.qt-tabs {
  display: flex;
  gap: .4rem;
  background: rgba(2, 6, 23, .42);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: .35rem;
  margin-bottom: 1.05rem;
  box-shadow: inset 0 2px 8px rgba(2, 6, 23, .35);
}
.qt-tabs [role="tab"] {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .88);
  font-family: var(--font);
  font-weight: 700;
  font-size: .86rem;
  line-height: 1.2;
  padding: .68rem .5rem;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.qt-tabs [role="tab"]:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.qt-tabs [role="tab"].is-active {
  background: linear-gradient(180deg, #ffffff, #eef2ff);
  color: #3730a3;
  box-shadow: 0 4px 16px rgba(2, 6, 23, .4), inset 0 1px 0 #fff;
}
.qt-tabs [role="tab"]:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}
.qt-panel { display: none; }
.qt-panel.is-active { display: block; animation: qt-fade .28s var(--ease); }
@keyframes qt-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.quick-tool textarea,
.quick-tool input[type="text"],
.quick-tool select {
  width: 100%;
  background: rgba(2, 6, 23, .38);
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  padding: .8rem 1rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.quick-tool textarea { min-height: 108px; resize: vertical; display: block; }
.quick-tool textarea::placeholder,
.quick-tool input[type="text"]::placeholder { color: rgba(255, 255, 255, .55); opacity: 1; }
.quick-tool textarea:focus,
.quick-tool input[type="text"]:focus,
.quick-tool select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .65);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.quick-tool select { cursor: pointer; }
/* Native option lists render in the OS theme — keep them light for contrast. */
.quick-tool select option { color: #0f172a; background: #fff; }

.qt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: .85rem;
}
.qt-stat {
  background: rgba(2, 6, 23, .32);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  padding: .6rem .4rem;
  text-align: center;
}
.qt-stat .v {
  display: block;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.qt-stat .l {
  display: block;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .68);
  margin-top: .15rem;
}
@media (min-width: 640px) {
  .qt-stats { grid-template-columns: repeat(6, 1fr); }
}

.qt-case-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .9rem 0;
}
.qt-case-btns button {
  border: 1.5px solid rgba(255, 255, 255, .28);
  background: rgba(2, 6, 23, .28);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: .82rem;
  padding: .55rem .95rem;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.qt-case-btns button:hover { border-color: rgba(255, 255, 255, .6); transform: translateY(-1px); }
.qt-case-btns button.is-active {
  background: #fff;
  color: var(--indigo-dark);
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(2, 6, 23, .3);
}
.qt-output-wrap {
  display: flex;
  gap: .6rem;
  align-items: stretch;
}
.qt-output {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(2, 6, 23, .42);
  border: 1px dashed rgba(255, 255, 255, .32);
  border-radius: 12px;
  padding: .8rem 1rem;
  font-size: .95rem;
  line-height: 1.55;
  min-height: 52px;
  word-break: break-word;
  white-space: pre-wrap;
}
.qt-output:empty::before {
  content: "Your converted text will appear here.";
  color: rgba(255, 255, 255, .5);
}
.qt-output-wrap .btn {
  flex: none;
  align-self: stretch;
  background: #fff;
  color: var(--indigo-dark);
  border: 0;
  box-shadow: 0 6px 18px rgba(2, 6, 23, .3);
}
.qt-output-wrap .btn:hover { background: #fff; color: var(--indigo-darker); }

.qt-row { display: flex; gap: .6rem; margin-top: .9rem; }
.qt-row input[type="text"] { flex: 1 1 auto; min-width: 0; }
.qt-row select { flex: none; width: auto; }
.qt-row .btn { flex: none; }
.qt-qr-out { margin-top: 1rem; text-align: center; }
.qt-qr-box {
  display: inline-block;
  background: #fff; /* QR codes need a white quiet zone to scan */
  padding: .8rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .35);
  line-height: 0;
}
.qt-qr-box img, .qt-qr-box canvas, .qt-qr-box table { margin: 0 auto; max-width: 100%; height: auto; }
.qt-note { font-size: .85rem; color: rgba(255, 255, 255, .75); margin: .7rem 0 0; }

/* CTA link under the widget */
.qt-browse {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1.35rem;
  font-weight: 800;
  font-size: 1.02rem;
  color: #fff;
  padding: .75rem 1.5rem;
  border: 1.5px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  transition: background-color .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
.qt-browse:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .7);
  transform: translateY(-2px);
}

/* ============================================================
   32. Trust band features + contact page.
   ============================================================ */
.trust-band { margin: var(--space-6) 0 0; }
.trust-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.trust-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.trust-card:hover {
  transform: translateY(-3px);
  border-color: var(--indigo-200);
  box-shadow: var(--shadow-lg);
}
.trust-icon {
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  color: #fff;
  margin-bottom: .9rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}
.trust-icon svg { width: 26px; height: 26px; flex: none; }
.trust-card h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.trust-card p { font-size: .92rem; color: var(--muted); margin: 0; }
@media (min-width: 640px) { .trust-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .trust-features { grid-template-columns: repeat(4, 1fr); } }

/* Contact page */
.contact-wrap { max-width: 720px; }
.contact-email-line { font-size: 1.02rem; margin: 0 0 1.75rem; color: var(--muted); }
.contact-email-line strong { color: var(--text-strong); font-weight: 700; }
.contact-form { max-width: 640px; margin-top: .5rem; }
.contact-form .field { margin-bottom: 1.1rem; }
.contact-form .field > label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-strong);
  margin-bottom: .4rem;
}
.contact-form .field.is-invalid input,
.contact-form .field.is-invalid select,
.contact-form .field.is-invalid textarea { border-color: var(--red); }
/* Honeypot: kept in the DOM but parked far off-screen (not
   display:none) so naive bots fill it while humans never see it. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px; height: 1px;
  overflow: hidden;
}
.contact-notice {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: .95rem;
  font-weight: 550;
  max-width: 640px;
}
.contact-notice.success {
  background: var(--green-soft);
  border: 1.5px solid var(--green-border);
  color: var(--green);
}
.contact-notice.error {
  background: var(--red-soft);
  border: 1.5px solid var(--red-border);
  color: var(--red);
}

/* ============================================================
   33. Dark mode.
   [data-theme="dark"] on <html> is set by a tiny inline script
   in header.php BEFORE the stylesheet loads, so there is no
   flash of the wrong theme. Choice persists in localStorage and
   defaults to the OS prefers-color-scheme.
   Header, drawer, footer, hero and CTA stay dark by design, so
   this section only remaps the light surfaces plus every
   hard-coded light hex outside the token block.
   ============================================================ */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="dark"] {
  --bg: #0c1322;
  --card: #141d33;
  --text: #d7e0ef;
  --text-strong: #f1f5f9;
  --muted: #93a1b8;
  --border: #25324e;
  --border-strong: #3a4a6e;

  --green: #34d399;
  --green-soft: #0d2a1c;
  --green-border: #1d5c38;
  --amber: #fbbf24;
  --amber-soft: #2c2111;
  --amber-border: #7a5a1e;
  --red: #f87171;
  --red-soft: #2b1414;
  --red-border: #7f2b2b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-indigo: 0 8px 24px rgba(79, 70, 229, .5);
}

/* Hard-coded light surfaces become dark surfaces */
html[data-theme="dark"] code,
html[data-theme="dark"] kbd,
html[data-theme="dark"] samp { background: #1a2540; color: #e2e8f0; }

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background: var(--card); color: var(--text-strong); }
html[data-theme="dark"] input[type="color"] { background: var(--card); }

html[data-theme="dark"] .btn-secondary { background: #24304d; color: var(--text-strong); border-color: var(--border-strong); }
html[data-theme="dark"] .btn-secondary:hover { background: #2e3d61; color: #fff; }

html[data-theme="dark"] .why-card { background: linear-gradient(180deg, #16213c 0%, #121a30 100%); }

html[data-theme="dark"] .tool-article tbody tr:nth-child(even),
html[data-theme="dark"] .post-article tbody tr:nth-child(even),
html[data-theme="dark"] .page-article tbody tr:nth-child(even),
html[data-theme="dark"] .entry-content tbody tr:nth-child(even) { background: rgba(255, 255, 255, .035); }

html[data-theme="dark"] .side-card li { border-color: var(--border); }

html[data-theme="dark"] .ad-slot.ad-anchor {
  background: var(--card);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .5);
}

html[data-theme="dark"] ::selection { background: var(--indigo-200); color: #0f172a; }

/* Plugin tool UI (#tool-app) — dark remap */
html[data-theme="dark"] #tool-app .stat {
  background: linear-gradient(180deg, #182a4f 0%, #141d33 100%);
  border-color: var(--border);
}
html[data-theme="dark"] #tool-app .stat .v { color: #c7d2fe; }
html[data-theme="dark"] #tool-app .dropzone { background: #101a30; }
html[data-theme="dark"] #tool-app .preview-box { background: #101a30; }
html[data-theme="dark"] #tool-app .check-item:hover { background: rgba(79, 70, 229, .12); }
html[data-theme="dark"] #tool-app .score-bar { background: #24304d; }
html[data-theme="dark"] #tool-app .verdict { background: linear-gradient(180deg, #16213c 0%, #141d33 100%); }
html[data-theme="dark"] #tool-app .verdict strong { color: #c7d2fe; }
html[data-theme="dark"] #tool-app .ba-pane { background: #101a30; }
html[data-theme="dark"] #tool-app .lab-preview {
  background:
    linear-gradient(45deg, #1a2540 25%, transparent 25%, transparent 75%, #1a2540 75%),
    linear-gradient(45deg, #1a2540 25%, transparent 25%, transparent 75%, #1a2540 75%),
    #101a30;
}
html[data-theme="dark"] #tool-app .dir-toggle { background: #24304d; }
html[data-theme="dark"] #tool-app .result-note { color: #fcd34d; }
html[data-theme="dark"] #tool-app .tool-error,
html[data-theme="dark"] .tool-error { color: #fca5a5; }
html[data-theme="dark"] #tool-app .output-label { color: #c7d2fe; }
html[data-theme="dark"] #tool-app .big-display { color: #c7d2fe; }
html[data-theme="dark"] #tool-app .progress { color: #a5b4fc; }

/* Indigo accents that sit on dark surfaces become light lavender */
html[data-theme="dark"] .section-eyebrow,
html[data-theme="dark"] .read-more,
html[data-theme="dark"] .quick-chip svg,
html[data-theme="dark"] .offer-count,
html[data-theme="dark"] .crumbs a:hover,
html[data-theme="dark"] .side-card li a:hover,
html[data-theme="dark"] .side-card li[aria-current="page"] a,
html[data-theme="dark"] .cat-card:hover h3,
html[data-theme="dark"] .post-card:hover .post-body h3,
html[data-theme="dark"] .offer-card:hover .offer-body > strong,
html[data-theme="dark"] .post-nav-prev a:hover,
html[data-theme="dark"] .post-nav-next a:hover,
html[data-theme="dark"] .pagination a.page-numbers:hover { color: #a5b4fc; }

html[data-theme="dark"] .why-card h3,
html[data-theme="dark"] .side-card h3,
html[data-theme="dark"] .faq.faq-accordion details[open] summary { color: #c7d2fe; }

html[data-theme="dark"] .tool-article li::marker,
html[data-theme="dark"] .post-article li::marker,
html[data-theme="dark"] .page-article li::marker,
html[data-theme="dark"] .entry-content li::marker { color: #a5b4fc; }
/* Pretty homepage polish (mockup v4, 2026-10-26)  appended only, no existing rule changed. Uses theme variables so light/dark both work. */.home .hero, .front-page .hero, body.home .site-hero{border-radius:0 0 28px 28px}.hero-search{max-width:620px;margin:18px auto 0;display:flex;background:#fff;border-radius:14px;padding:6px;box-shadow:0 18px 40px rgba(0,0,0,.25)}.hero-search input{flex:1;border:0;outline:0;padding:12px 14px;font-size:16px;color:#1e293b;background:transparent}.hero-search button{border:0;background:var(--indigo);color:#fff;border-radius:10px;padding:12px 20px;font-weight:700;cursor:pointer}.why-card, .cat-card, .category-card, .tool-card{transition:transform .15s,box-shadow .15s,border-color .15s}.why-card:hover, .cat-card:hover, .category-card:hover, .tool-card:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(15,23,42,.12)}html[data-theme="dark"] .why-card:hover, html[data-theme="dark"] .cat-card:hover, html[data-theme="dark"] .category-card:hover, html[data-theme="dark"] .tool-card:hover{box-shadow:0 12px 26px rgba(0,0,0,.35)}/* RESPONSIVE FIXES 2026-10-27 appended only */*,*::before,*::after{box-sizing:border-box}img,video,svg{max-width:100%;height:auto}iframe,embed,object{max-width:100%}input,textarea,select,button{max-width:100%}p,li,h1,h2,h3,h4,a{overflow-wrap:break-word;word-break:break-word}pre,code{overflow-wrap:break-word;white-space:pre-wrap}pre{overflow-x:auto}
table{width:100%;max-width:100%}article table,.post-article table,.tool-article table,.entry-content table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}#tool-app .stat{overflow-wrap:break-word}@media (max-width:800px){.container{grid-template-columns:minmax(0,1fr)!important}
	.sidebar,.sidebar-inner{width:100%;max-width:100%;position:static;max-height:none}.hero-search{flex-wrap:wrap}.hero-search input{flex:1 1 100%!important;min-width:0}.hero-search button{flex:1 1 100%!important}.cat-grid,.tool-grid,.steps-grid,.offer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.quick-grid,.hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.footer-inner.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}#tool-app input,#tool-app select,#tool-app textarea{width:100%;min-width:0}[class*="front-tools"] iframe,#front-tools iframe{height:480px!important}}@media (max-width:520px){h1{font-size:clamp(1.6rem,8vw,2.2rem)}.hero-search{flex-direction:column}
		.hero-search input,.hero-search button{width:100%!important}.cat-grid,.tool-grid,.steps-grid,.offer-grid,.quick-grid,.hero-stats,.footer-inner.footer-grid{grid-template-columns:1fr!important}#tool-app .stat{font-size:1rem}#tool-app .dropzone{padding:16px}[class*="front-tools"] iframe,#front-tools iframe{height:380px!important}}

/* Dark-mode category intro contrast (audit fix) */
html[data-theme="dark"] .term-description { color: #d7e0ef; }
html[data-theme="dark"] .cat-intro, html[data-theme="dark"] .cat-intro p { color: #d7e0ef; }