/*
Theme Name: Longtail Inmate SEO
Theme URI: https://textinganinmate.com/
Author: OpenAI Codex
Description: A minimal reusable WordPress theme for long-tail inmate messaging domains.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: longtail-inmate-seo
*/

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --bg: #f8faf9;
  --surface: #ffffff;
  --surface-2: #f1f5f4;
  --ink: #0b1513;
  --ink-soft: #1c2a27;
  --muted: #5a6a66;
  --muted-soft: #8a9894;
  --line: #e6ecea;
  --line-strong: #d6dedb;
  --teal: #0d9488;
  --teal-600: #0f766e;
  --teal-700: #115e59;
  --teal-50: #ecfdf5;
  --mint: #d1faee;
  --coral: #f97361;
  --dark: #0f1a18;
  --dark-2: #162422;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, 0.14), 0 6px 18px -8px rgba(15, 23, 42, 0.08);
  --shadow-ring: 0 0 0 1px rgba(15, 23, 42, 0.04);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Layout */
  --container: 1440px;
  --gutter: clamp(16px, 3vw, 40px);

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem;       /* 12 */
  --fs-sm: 0.8125rem;     /* 13 */
  --fs-base: 1rem;        /* 16 */
  --fs-md: 1.0625rem;     /* 17 */
  --fs-lg: 1.125rem;      /* 18 */
  --fs-xl: 1.25rem;       /* 20 */
  --fs-2xl: 1.5rem;       /* 24 */
  --fs-3xl: clamp(1.625rem, 1.35rem + 1.4vw, 2rem);     /* 26 → 32 */
  --fs-4xl: clamp(2rem, 1.55rem + 2.25vw, 2.75rem);     /* 32 → 44 */
  --fs-5xl: clamp(2.5rem, 1.75rem + 3.75vw, 4rem);      /* 40 → 64 */
  --fs-6xl: clamp(3rem, 1.9rem + 5.5vw, 5rem);          /* 48 → 80 */

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-fast: 120ms var(--ease);
  --t: 200ms var(--ease);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--teal-700);
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--teal);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

main {
  display: block;
}

section {
  padding: clamp(3.5rem, 2rem + 5vw, 6.5rem) 0;
}

.content-shell {
  padding: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) 0;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-6xl);
  letter-spacing: -0.032em;
  max-width: 20ch;
}

h2 {
  font-size: var(--fs-5xl);
  letter-spacing: -0.028em;
  max-width: 22ch;
}

h3 {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p {
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

.lede {
  max-width: 56ch;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.6;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  margin-bottom: 1.25rem;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid color-mix(in srgb, var(--teal) 18%, transparent);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: top var(--t);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  --header-h: 76px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

.site-header > .wrap {
  padding-inline: var(--gutter);
}

.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  min-height: var(--header-h);
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.brand-mark {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-700) 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: var(--fs-base);
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.nav-links a:not(.button) {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast);
}

.nav-links a:not(.button):hover {
  background: var(--surface);
  color: var(--ink);
}

.nav-cta {
  margin-left: 0.5rem;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.nav-toggle:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 1.1rem;
  height: 0.85rem;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t-fast), top var(--t);
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: calc(50% - 1px); }
.nav-toggle-bars span:nth-child(3) { top: calc(100% - 2px); }

.site-header[data-menu-open="true"] .nav-toggle {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.site-header[data-menu-open="true"] .nav-toggle-bars span:nth-child(1) {
  top: calc(50% - 1px);
  transform: rotate(45deg);
}

.site-header[data-menu-open="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.site-header[data-menu-open="true"] .nav-toggle-bars span:nth-child(3) {
  top: calc(50% - 1px);
  transform: rotate(-45deg);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}

.button-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.button-primary:hover,
.button-primary:focus {
  background: var(--teal-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover,
.button-secondary:focus {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 2.5rem + 5vw, 8rem) 0 clamp(3rem, 1.75rem + 4vw, 6rem);
  background:
    radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--teal) 14%, transparent) 0%, transparent 60%),
    radial-gradient(700px 400px at 10% 20%, color-mix(in srgb, var(--teal) 6%, transparent) 0%, transparent 55%),
    var(--bg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
}

.hero-copy {
  max-width: 42rem;
}

.hero h1 {
  margin-top: 0.25rem;
}

.proof-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.25rem 0 0;
  padding: 0;
}

.proof-list div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.proof-list dt {
  color: var(--ink);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.proof-list dd {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Hero message preview panel */
.message-panel {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.message-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.25), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.hero-image {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.message-panel > span:first-of-type {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.message-panel strong {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background: var(--mint);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.message-panel strong::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent);
}

.message-panel small {
  flex: 1 0 100%;
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Sections: intro/how-it-works ---------- */
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: start;
}

.split-section > div > p,
.section-heading > p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-md);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.section-heading-row > div {
  max-width: 44rem;
}

/* Steps */
.steps {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.1rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.steps li:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.steps span {
  grid-row: span 2;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  font-weight: 800;
}

.steps strong {
  align-self: end;
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.steps p {
  align-self: start;
  font-size: var(--fs-sm);
}

/* ---------- Grids: features / faqs / posts ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Generic cards */
.feature-card,
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.feature-card {
  padding: 1.75rem;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.feature-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.feature-card p {
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* FAQ cards use <details>/<summary> */
.faq-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t), box-shadow var(--t);
}

.faq-card:hover,
.faq-card[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.faq-card[open] {
  background: var(--surface);
}

.faq-question {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 2rem;
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--t), border-color var(--t-fast);
}

.faq-card[open] .faq-question::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--teal);
}

.faq-answer {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.65;
}

/* ---------- Dark call-to-action bands ---------- */
.keyword-band,
.cta-band,
.post-next-step {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 1rem + 1.5vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 1.25rem + 2vw, 3.5rem);
  background:
    radial-gradient(800px 400px at 90% 0%, color-mix(in srgb, var(--teal) 22%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, var(--dark-2) 0%, var(--dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.keyword-band h2,
.cta-band h2,
.post-next-step h2 {
  color: #fff;
}

.keyword-band p,
.cta-band p,
.post-next-step p {
  color: #c8d8d3;
}

.keyword-band .section-kicker,
.cta-band .section-kicker,
.post-next-step .section-kicker {
  background: color-mix(in srgb, var(--teal) 18%, transparent);
  color: #d1faee;
  border-color: color-mix(in srgb, var(--teal) 40%, transparent);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  color: #e8f3f0;
  font-size: var(--fs-sm);
  font-weight: 500;
}

.cta-band .actions,
.post-next-step .actions {
  justify-content: flex-end;
  margin-top: 0;
}

.cta-band .button-primary,
.post-next-step .button-primary {
  background: var(--teal);
}

.cta-band .button-primary:hover,
.post-next-step .button-primary:hover {
  background: var(--teal-700);
}

.cta-band .button-secondary,
.post-next-step .button-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cta-band .button-secondary:hover,
.post-next-step .button-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #fff;
  color: #fff;
}

/* ---------- Blog hero ---------- */
.blog-hero,
.single-hero {
  padding: clamp(3.5rem, 2rem + 4vw, 6rem) 0 clamp(2rem, 1rem + 2.5vw, 3.5rem);
  background:
    radial-gradient(700px 340px at 85% -20%, color-mix(in srgb, var(--teal) 10%, transparent) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.blog-hero h1,
.single-hero h1 {
  max-width: 22ch;
}

.single-hero h1 {
  max-width: 24ch;
}

/* ---------- Post cards ---------- */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.post-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.post-card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--mint);
  border-bottom: 1px solid var(--line);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  padding: 1.5rem;
}

.post-card-meta {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-card-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.post-card-link {
  color: inherit;
}

.post-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card-link:focus-visible {
  outline: none;
}

.post-card:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent);
}

.post-card-excerpt {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
  justify-content: center;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all var(--t-fast);
}

.pagination a:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.pagination .current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Single post ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.back-link::before {
  content: "←";
  font-size: 1.1em;
}

.back-link:hover {
  color: var(--ink);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.post-meta span {
  padding: 0.3rem 0.7rem;
  background: var(--teal-50);
  color: var(--teal-700);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.featured-image {
  max-width: 1024px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.featured-image img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.content-card.post-content,
.post-content {
  max-width: 768px;
  margin: 0 auto;
  padding: clamp(1.75rem, 1rem + 2vw, 3rem);
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.75;
}

.post-content > * + * {
  margin-top: 1.1rem;
}

.post-content h2 {
  margin-top: 2.25rem;
  font-size: var(--fs-3xl);
}

.post-content h3 {
  margin-top: 1.75rem;
  font-size: var(--fs-2xl);
}

.post-content p {
  color: var(--ink-soft);
}

.post-content a {
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--ink);
}

.post-content ul,
.post-content ol {
  padding-left: 1.25rem;
}

.post-content li + li {
  margin-top: 0.35rem;
}

.empty-state {
  padding: 2rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ---------- Generic page content ---------- */
.content-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(1.75rem, 1rem + 2vw, 3rem);
}

.content-card h1 {
  margin-bottom: 1.25rem;
  font-size: var(--fs-5xl);
}

.content-card p + p,
.content-card h2 + p,
.content-card h3 + p {
  margin-top: 1rem;
}

.content-card p {
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.7;
}

.content-card a {
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(3rem, 2rem + 2vw, 5rem) 0 2rem;
  background: linear-gradient(180deg, var(--dark-2) 0%, var(--dark) 100%);
  color: #c8d8d3;
  font-size: var(--fs-sm);
}

.site-footer p,
.site-footer a {
  color: #c8d8d3;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 1rem + 2.5vw, 4rem);
  align-items: flex-start;
}

.footer-grid > div > p {
  margin-top: 0.75rem;
  color: #9aaca7;
  line-height: 1.6;
}

.footer-grid strong {
  display: block;
  margin-bottom: 0.85rem;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-grid div p {
  margin: 0 0 0.55rem;
}

.brand-footer {
  margin-bottom: 1rem;
  color: #fff;
}

.brand-footer .brand-mark {
  box-shadow: var(--shadow-sm);
}

.footer-meta {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #7a8a85;
  font-size: var(--fs-xs);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .message-panel {
    max-width: 32rem;
    margin-left: 0;
  }
}

@media (max-width: 820px) {
  .split-section,
  .keyword-band,
  .cta-band,
  .post-next-step {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-band .actions,
  .post-next-step .actions {
    justify-content: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Mobile navigation */
  .site-header {
    --header-h: 64px;
  }

  .site-header .nav {
    gap: 0.75rem;
  }

  .site-header .nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .site-header .nav-links {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + 1px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 1.25rem var(--gutter) 2rem;
    margin: 0;
    background: var(--bg);
    font-size: var(--fs-lg);
    overflow-y: auto;
  }

  .site-header[data-menu-open="true"] .nav-links {
    display: flex;
  }

  body.admin-bar .site-header .nav-links {
    top: calc(var(--header-h) + 1px + 32px);
  }

  .site-header .nav-links a:not(.button) {
    width: 100%;
    padding: 1.1rem 0.25rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    font-size: var(--fs-lg);
    font-weight: 600;
  }

  .site-header .nav-links a:not(.button):first-child {
    border-top: 1px solid var(--line);
  }

  .site-header .nav-links a:not(.button):hover {
    background: transparent;
    color: var(--teal-700);
  }

  .site-header .nav-cta {
    width: 100%;
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
    font-size: var(--fs-base);
  }
}

@media (max-width: 680px) {
  body.admin-bar .site-header .nav-links {
    top: calc(var(--header-h) + 1px + 46px);
  }

  .proof-list {
    grid-template-columns: 1fr;
  }

  .proof-list div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .feature-grid,
  .faq-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions .button {
    flex: 1 1 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---------- Motion & theme preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1110;
    --surface: #121b19;
    --surface-2: #162220;
    --ink: #ecf3f1;
    --ink-soft: #c8d3d0;
    --muted: #9fb0ac;
    --muted-soft: #7a8a85;
    --line: #1e2c29;
    --line-strong: #283a36;
    --teal: #2dd4bf;
    --teal-600: #14b8a6;
    --teal-700: #5eead4;
    --teal-50: #0b2a26;
    --mint: #10322b;
    --dark: #060c0b;
    --dark-2: #0b1413;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px -4px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 20px 48px -16px rgba(0, 0, 0, 0.7);
  }

  .button-primary {
    background: var(--teal);
    color: #051210;
  }

  .button-primary:hover,
  .button-primary:focus {
    background: var(--teal-700);
    color: #051210;
  }

  .site-header {
    background: color-mix(in srgb, var(--bg) 80%, transparent);
  }
}
