/*
Theme Name: SEOEdge Blog
Theme URI: https://seoedgeai.com
Author: SEOEdgeAI
Description: The blog we run on a customer's own domain. An index of article cards, an article page that is the article and nothing else, and a chrome-less template for mini-apps. No comments, no widget areas, no "about" or "FAQ" footer — every element that isn't the content is one the reader didn't come for.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
License: GPLv2 or later
Text Domain: seoedge-blog
*/

/* ── Tokens ───────────────────────────────────────────────────────────────
   One neutral palette that sits under any customer's brand without fighting
   it. The blog lives on their domain, so it has to look deliberate next to
   their site — not like a different product bolted on. */
:root {
  --ink: #14181f;
  --ink-soft: #414a57;
  --muted: #6b7480;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --accent: #14181f;
  --radius: 14px;
  --measure: 68ch;
  --shell: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f4f7;
    --ink-soft: #c3c9d2;
    --muted: #949cab;
    --line: #262b34;
    --bg: #0e1116;
    --bg-soft: #151a21;
    --accent: #f2f4f7;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 24px;
  top: 12px;
  z-index: 10;
  background: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* ── The bar back to the customer's own site ───────────────────────────────
   The single most valuable element on the page for the customer: a reader who
   arrived from search is one click from what the business actually sells. */
.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: saturate(180%) blur(8px);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}
.masthead__brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: 1.02rem;
}
.masthead__brand span { color: var(--muted); font-weight: 400; }
.masthead__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .15s ease, transform .15s ease;
}
.masthead__cta:hover { border-color: var(--ink); transform: translateY(-1px); }
.masthead__cta svg { flex: none; }

/* ── Index ────────────────────────────────────────────────────────────────*/
.page-head { padding: 56px 0 8px; }
.page-head h1 {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.page-head p { color: var(--muted); margin: 0; max-width: 54ch; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 34px 28px;
  padding: 40px 0 72px;
  list-style: none;
  margin: 0;
}

.card { display: flex; flex-direction: column; }
.card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.card:hover .card__media img { transform: scale(1.03); }
.card__meta {
  margin: 14px 0 6px;
  font-size: 0.78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.card h2 { font-size: 1.16rem; line-height: 1.35; margin: 0 0 8px; letter-spacing: -0.012em; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Article ──────────────────────────────────────────────────────────────*/
.article { padding: 44px 0 80px; }
.article__head { max-width: var(--measure); margin: 0 auto 30px; }
.article__head h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 12px 0 14px;
}
.article__meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.article__lede { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

.article__figure { margin: 0 0 36px; }
.article__figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.article__figure figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  font-family: var(--font-read);
  font-size: 1.09rem;
  line-height: 1.75;
}
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-family: var(--font);
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 2.2em;
}
.prose h3 { font-family: var(--font); font-size: 1.18rem; margin-top: 1.8em; }
.prose a { text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose img { border-radius: 10px; border: 1px solid var(--line); }
.prose blockquote {
  margin-left: 0;
  padding-left: 20px;
  border-left: 3px solid var(--line);
  color: var(--ink-soft);
  font-style: italic;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 5px;
}
.prose pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; }
/* Tables are the one thing that reliably overflows a reading measure. */
.prose .table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--font); font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--bg-soft); }
/* An embedded video keeps its aspect ratio without a wrapper div. */
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }

/* The end of an article is a link back to the business, and nothing else —
   no author bio, no related-posts grid, no newsletter modal. */
.article__end {
  max-width: var(--measure);
  margin: 56px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.article__end p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.button:hover { opacity: .9; }

/* ── Pagination ───────────────────────────────────────────────────────────*/
.pagination { display: flex; gap: 8px; justify-content: center; padding: 0 0 72px; }
.pagination .page-numbers {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.9rem;
}
.pagination .page-numbers.current { background: var(--bg-soft); font-weight: 600; }

/* ── Footer: the legal minimum, on purpose ────────────────────────────────*/
.colophon {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
.colophon a { text-decoration: none; }
.colophon a:hover { text-decoration: underline; }

.empty { padding: 70px 0 90px; color: var(--muted); }

/* ── Mini-app template ────────────────────────────────────────────────────
   The tool is the page. Only the bar back to the customer's site survives. */
.tool-wrap { padding: 26px 0 60px; }
.tool-wrap > * { max-width: 100%; }
