/* Marketing Checker AI (based on the Solar Tools Directory template) — static, portable styles. Colours can be overridden by :root values set in the page. */
:root {
  --primary: #0F3F38;
  --primary-dark: #0A2C28;
  --accent: #D97706;
  --accent-soft: #F3E6C8;
  --bg: #F6F3EC;
  --card: #FFFFFF;
  --text: #1C1C1C;
  --muted: #5C5C57;
  --line: #E4DFD4;
  --danger: #9B1C1C;
  --ok: #0F3F38;
  --shadow: 0 1px 2px rgba(28, 28, 28, 0.06), 0 8px 24px rgba(15, 63, 56, 0.06);
  --radius: 14px;
  --max: 1120px;
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.25; color: var(--primary-dark); margin: 0 0 0.6em; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.muted, .lede { color: var(--muted); }
.lede { font-size: 1.08rem; max-width: 46rem; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Preview banner */
.preview-banner {
  background: var(--accent-soft);
  color: var(--primary-dark);
  text-align: center;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid #e6d3a8;
}

/* Header */
.site-header {
  background: var(--primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.logo {
  color: #fff;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}
.logo:hover { color: var(--accent-soft); }
.logo span { color: var(--accent-soft); font-weight: 400; margin-left: 0.15rem; }

nav.main-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
nav.main-nav a {
  color: #f3efe6;
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
}
nav.main-nav a:hover, nav.main-nav a[aria-current="page"] { background: rgba(255,255,255,0.1); color: #fff; }

.search-box { position: relative; }
.search-box input {
  width: 220px;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
}
.search-box input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-results {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(360px, 80vw);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 50;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 0.7rem 0.9rem; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.search-results a:hover { background: var(--bg); }
.search-results .sr-meta { display: block; color: var(--muted); font-size: 0.8rem; }
.search-results .empty { padding: 0.8rem 0.9rem; color: var(--muted); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  cursor: pointer;
}

main { flex: 1; padding: 2rem 0 3.5rem; }

/* Hero */
.hero {
  padding: 2.4rem 0 1.2rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.3rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 0.65rem 1.15rem;
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary-dark); border: 1.5px solid var(--line); }

/* Cards and grids */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.card a.stretched { text-decoration: none; color: inherit; display: block; }
.card h3 { margin-bottom: 0.35rem; }
.card .icon-bubble {
  width: 2.2rem; height: 2.2rem; border-radius: 10px;
  background: var(--accent-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; margin-bottom: 0.7rem;
}
.tool-card .tool-name { font-family: var(--serif); font-size: 1.15rem; color: var(--primary-dark); text-decoration: none; }
.tool-card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.7rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #7A4B06;
}
.badge-verified { background: #E4F0ED; color: var(--primary-dark); }
.badge-sample { background: #FDECEC; color: var(--danger); }
.badge-warn { background: #F8EBD8; color: #7A4B06; }
.badge-free { background: #E8F3E8; color: #1B5E20; }

/* Ad placeholder */
.ad-slot {
  border: 2px dashed #c8c1b3;
  background: repeating-linear-gradient(-45deg, #f3efe6, #f3efe6 8px, #ece7dc 8px, #ece7dc 16px);
  color: var(--muted);
  text-align: center;
  padding: 1.4rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin: 1.5rem 0;
}
.ad-slot strong { display: block; color: var(--text); margin-bottom: 0.25rem; }

.section { margin: 2.4rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.section-head a { font-size: 0.92rem; }

/* Tool page */
.prose { max-width: 46rem; }
.prose li { margin-bottom: 0.35rem; }
.fact-source { font-size: 0.85rem; color: var(--muted); }
.fact-source a { word-break: break-all; }
.tool-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; align-items: start; }
.side-box h2 { font-size: 1.05rem; }
.official-link { font-weight: 700; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}
table.compare th, table.compare td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
table.compare th { background: var(--primary-dark); color: #fff; font-weight: 600; }
table.compare tr:last-child td { border-bottom: 0; }
.uncertain { background: #FDF6E3; }
.uncertain::after { content: " — not fully confirmed"; font-size: 0.8rem; color: #7A4B06; }

.notice, .legal-notice {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1rem 0 1.4rem;
}
.placeholder-field {
  display: inline-block;
  background: #FDECEC;
  color: var(--danger);
  border: 1px dashed #e3a0a0;
  padding: 0 0.3rem;
  font-weight: 700;
}

/* Forms */
form.stack label { display: block; font-weight: 600; margin: 0.8rem 0 0.25rem; }
form.stack input, form.stack select, form.stack textarea {
  width: 100%; max-width: 36rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cfc9bc;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
form.stack textarea { min-height: 8rem; }
.form-note { font-size: 0.92rem; color: var(--muted); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--primary-dark);
  color: #f6f3ec;
  z-index: 80;
  padding: 1rem 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
  display: none;
}
.cookie-banner.open { display: block; }
.cookie-inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-banner p { margin: 0; max-width: 46rem; font-size: 0.92rem; }
.cookie-banner a { color: var(--accent-soft); }
.cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-actions .btn { background: var(--accent); color: #1c1c1c; }
.cookie-actions .btn-secondary { color: #fff; border-color: #fff; background: transparent; }

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: #d9d4c8;
  padding: 2.2rem 0 1.4rem;
  margin-top: auto;
  font-size: 0.9rem;
}
.site-footer a { color: #f3efe6; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1.4rem; margin-bottom: 1.4rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: 0.5rem; font-family: var(--font); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.3rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1rem; font-size: 0.82rem; color: #b9b3a6; }

/* Legal pages */
.legal-doc h2 { margin-top: 1.6rem; }

@media (max-width: 900px) {
  .grid-4, .grid-3, .tool-hero, .footer-grid, .grid-2 { grid-template-columns: 1fr; }
  .grid-2.keep-2 { grid-template-columns: 1fr 1fr; }
  .search-box input { width: 150px; }
  table.compare { display: block; overflow-x: auto; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  nav.main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
  }
  nav.main-nav.open { display: flex; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .header-inner { flex-wrap: wrap; padding: 0.5rem 0; }
  .grid-2.keep-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 1.4rem; }
}

/* Marketing Checker AI additions */
.ad-slot strong { display: block; margin-bottom: 0.25rem; letter-spacing: 0.02em; }
.ad-slot .ad-slot-note { font-size: 0.88rem; }
.editorial-flag { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.8rem 0 1rem; }
.editorial-flag .editorial-label { flex-basis: 100%; color: var(--muted); font-size: 0.9rem; margin: 0; }
.badge-editorial { background: #f3e6c8; color: #5a3416; }
.testing-note { border-color: var(--accent); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1rem 0; }
.pros-cons h3 { margin-top: 0; font-size: 1.05rem; }
@media (max-width: 760px) {
  .pros-cons { grid-template-columns: 1fr; }
  .editorial-flag { align-items: flex-start; }
}
@media (max-width: 1200px) {
  .logo span { display: none; }
  .search-box input { width: 160px; }
}

/* Affiliate CTA and richer listing layout */
.outbound-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.8rem; margin: 1rem 0 0.4rem; }
.outbound-cta .ad-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--accent);
  color: var(--primary);
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
}
.outbound-note { flex-basis: 100%; color: var(--muted); font-size: 0.9rem; margin: 0; }
.tool-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.6rem; align-items: start; }
.tool-hero-top { display: flex; gap: 1rem; align-items: flex-start; }
.monogram { flex: 0 0 72px; width: 72px; height: 72px; }
.monogram svg { width: 72px; height: 72px; display: block; color: var(--primary); }
.figure { margin: 1.2rem 0 1.6rem; color: var(--primary); }
.figure svg, .figure img { width: 100%; height: auto; max-width: 840px; display: block; }
.figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.45rem; }
.detailed-review h3 { margin-top: 1.3rem; font-size: 1.15rem; }
@media (max-width: 860px) {
  .tool-hero { grid-template-columns: 1fr; }
  .monogram, .monogram svg { width: 56px; height: 56px; flex-basis: 56px; }
}
