/* Clay Alternatives — SEO/AEO-first static microsite
   Visual system v2: refined typography, depth, motion, dark mode. */

:root {
  --color-bg: #f6f7f9;
  --color-bg-alt: #eef1f5;
  --color-surface: #ffffff;
  --color-surface-2: #f8fafc;
  --color-text: #0f172a;
  --color-text-muted: #5b6472;
  --color-text-soft: #8a93a3;
  --color-border: #e4e8ee;
  --color-border-strong: #cdd4de;
  --color-accent: #4f46e5;
  --color-accent-hover: #4338ca;
  --color-accent-soft: #eef0ff;
  --color-accent-2: #0ea5e9;
  --color-highlight: #fef3c7;
  --color-success: #059669;
  --color-success-soft: #ecfdf5;
  --color-warning: #d97706;
  --color-danger: #e11d48;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --max-width: 74rem;
  --reading-width: 46rem;
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.18);

  --gradient-accent: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
  --gradient-text: linear-gradient(120deg, #4f46e5 0%, #0ea5e9 100%);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b1120;
    --color-bg-alt: #0f172a;
    --color-surface: #131c2e;
    --color-surface-2: #1a2438;
    --color-text: #f1f5f9;
    --color-text-muted: #a3adbe;
    --color-text-soft: #76808f;
    --color-border: #243049;
    --color-border-strong: #324063;
    --color-accent: #818cf8;
    --color-accent-hover: #a5b4fc;
    --color-accent-soft: #1c2541;
    --color-accent-2: #38bdf8;
    --color-highlight: #422006;
    --color-success: #34d399;
    --color-success-soft: #052e21;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(48rem 30rem at 85% -8%, color-mix(in srgb, var(--color-accent-2) 10%, transparent), transparent 60%),
    radial-gradient(42rem 28rem at 0% 0%, color-mix(in srgb, var(--color-accent) 9%, transparent), transparent 55%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s var(--ease);
}
a:hover { color: var(--color-accent-hover); }

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

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.625rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.075rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo::before {
  content: "";
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.45rem;
  background: var(--gradient-accent);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.site-logo:hover { color: var(--color-text); }

.site-logo { flex-shrink: 0; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a { white-space: nowrap; }

/* Mobile: nav scrolls horizontally instead of wrapping over the logo */
@media (max-width: 720px) {
  .header-inner { gap: 0.75rem; }
  .site-logo { font-size: 0; gap: 0; }
  .site-logo::before { width: 1.6rem; height: 1.6rem; }
  .site-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-right: -0.5rem;
    padding-right: 0.5rem;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: 0.85rem; padding: 0.4rem 0.55rem; }
}
.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.site-nav a:hover { color: var(--color-text); background: var(--color-bg-alt); }
.site-nav a[aria-current="page"] {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
main { padding-bottom: 4rem; }

/* Long-form text columns stay readable */
.section > p,
.section > ul,
.section > ol,
.hero-lead,
.section-intro,
.glossary { max-width: var(--reading-width); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
}
.breadcrumb li + li::before {
  content: "›"; margin-right: 0.4rem; color: var(--color-text-soft);
}
.breadcrumb a { color: var(--color-text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -6rem -20% auto -20%;
  height: 26rem;
  background:
    radial-gradient(40rem 20rem at 18% 0%, color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 70%),
    radial-gradient(34rem 18rem at 82% 8%, color-mix(in srgb, var(--color-accent-2) 16%, transparent), transparent 70%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero-eyebrow::before {
  content: "";
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-success) 25%, transparent);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1.1rem;
  max-width: 18ch;
  color: var(--color-text);
}

.hero-lead {
  font-size: clamp(1.075rem, 1.6vw, 1.2rem);
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-soft);
  margin-top: 1.25rem;
}
.hero-meta::before {
  content: "🕒";
  font-size: 0.85rem;
}

/* Hero two-column layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
}
.hero-content { min-width: 0; }
.hero h1 { max-width: 16ch; }

/* Floating "at a glance" visual card */
.hero-visual { display: none; }
@media (min-width: 980px) { .hero-visual { display: block; } }
.hero-card {
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s var(--ease);
}
.hero-card:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }
.hero-card-head {
  display: flex; align-items: center; gap: 0.4rem;
  padding-bottom: 0.9rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.hero-card-dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--color-border-strong);
}
.hero-card-dot:nth-child(1) { background: #f87171; }
.hero-card-dot:nth-child(2) { background: #fbbf24; }
.hero-card-dot:nth-child(3) { background: #34d399; }
.hero-card-title {
  margin-left: auto;
  font-size: 0.74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-text-soft);
}
.hero-card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.hero-card-list li {
  display: grid;
  grid-template-columns: 5.5rem auto 1fr;
  align-items: center;
  gap: 0.6rem;
}
.hero-card-list .tool-name { font-weight: 600; font-size: 0.92rem; }
.tool-tag {
  font-size: 0.68rem; font-weight: 600;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  white-space: nowrap;
  background: var(--color-accent-soft); color: var(--color-accent);
}
.tag-builder { background: var(--color-accent-soft); color: var(--color-accent); }
.tag-platform { background: color-mix(in srgb, var(--color-accent-2) 16%, transparent); color: var(--color-accent-2); }
.tag-api { background: var(--color-success-soft); color: var(--color-success); }
.tag-db { background: var(--color-bg-alt); color: var(--color-text-muted); }
.hero-card-list .bar {
  height: 0.45rem; border-radius: 999px;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.hero-card-list .bar i {
  display: block; height: 100%;
  background: var(--gradient-accent);
  border-radius: 999px;
}
.hero-card-note {
  margin: 1.1rem 0 0; padding-top: 0.9rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem; font-weight: 600;
  color: var(--color-accent);
}

/* Hero stats bar */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 2.5rem 0 0;
  padding: 0;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stats > div {
  background: var(--color-surface);
  padding: 1.1rem 1.25rem;
}
.hero-stats dt {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent);
}
.hero-stats dd {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */
.cta-group { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-accent);
  background-size: 140% 140%;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { color: #fff; box-shadow: var(--shadow-lg); background-position: 100% 0; }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }

/* Arrow affordance for links ending with → handled inline */

/* ---------- CTA bands (kept, restyled subtle) ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.75rem;
  margin: 3rem 0;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(20rem 12rem at 80% -20%, rgba(255,255,255,0.25), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 0.75rem; color: #fff; }
.cta-band p { margin: 0 auto 1.5rem; max-width: 38rem; opacity: 0.95; }
.cta-band .btn-primary { background: #fff; color: var(--color-accent); box-shadow: var(--shadow-md); }
.cta-band .btn-primary:hover { background: #f1f5ff; color: var(--color-accent-hover); }

.cta-inline {
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in srgb, var(--color-accent) 22%, transparent);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2.5rem 0;
  max-width: var(--reading-width);
}
.cta-inline h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.cta-inline p { margin: 0 0 1rem; color: var(--color-text-muted); }

/* ---------- Sections ---------- */
.section { padding: 2.5rem 0; scroll-margin-top: calc(var(--header-h) + 1rem); }

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.2vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  padding-top: 0.9rem;
  position: relative;
}
.section h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: var(--gradient-accent);
}
/* Headings that aren't true section headers shouldn't get the accent bar */
.toc h2::before,
.cta-band h2::before,
.editorial-pick h2::before { display: none; }
.toc h2, .cta-band h2, .editorial-pick h2 { padding-top: 0; }

.section h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 0.6rem;
}

.section-intro {
  font-size: 1.075rem;
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
}

/* Section divider accent under main H2s within the article flow */
.section + .section { border-top: 1px solid var(--color-border); }

/* ---------- Quick answer / TL;DR (AEO) ---------- */
.answer-box {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin: 0 0 2rem;
  box-shadow: var(--shadow-sm);
}
.answer-box .answer-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.answer-box p { margin: 0 0 0.75rem; font-size: 1.05rem; }
.answer-box p:last-child { margin-bottom: 0; }
.answer-box strong { color: var(--color-text); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}
.toc h2 {
  font-family: var(--font-sans);
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  margin: 0 0 0.75rem;
}
.toc ol {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0.4rem 1.5rem;
  counter-reset: toc;
}
@media (min-width: 640px) { .toc ol { grid-template-columns: 1fr 1fr; } }
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: 0.15rem 0;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  opacity: 0.7;
}
.toc a:hover { color: var(--color-accent); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.card-link::after {
  content: "→";
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
  color: inherit;
}
.card-link:hover::after { opacity: 1; transform: translateX(0); }
.card-link h3 { color: var(--color-accent); padding-right: 1.5rem; }

/* ---------- Ranked list ---------- */
.rank-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.rank-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s var(--ease);
}
.rank-item:hover { box-shadow: var(--shadow-sm); }
.rank-item--featured {
  border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
  background:
    linear-gradient(180deg, var(--color-accent-soft), var(--color-surface) 60%);
}
.rank-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.rank-number {
  flex-shrink: 0;
  width: 2.1rem; height: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-text); color: var(--color-bg);
  font-weight: 700; font-size: 0.95rem;
  border-radius: 0.6rem;
}
.rank-item--featured .rank-number { background: var(--gradient-accent); color: #fff; }
.rank-item h3 { margin: 0; font-size: 1.3rem; }
.rank-badge {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--color-highlight); color: #92400e;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  margin-left: 0.5rem; vertical-align: middle;
}
@media (prefers-color-scheme: dark) { .rank-badge { color: #fcd34d; } }

.pros-cons { display: grid; gap: 1rem; margin-top: 1.1rem; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons > div {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.pros-cons ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.pros-cons li { margin-bottom: 0.4rem; }
.pros-cons strong {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-soft);
}
.pros-cons > div:first-child strong { color: var(--color-success); }
.pros-cons > div:last-child strong { color: var(--color-warning); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  -webkit-overflow-scrolling: touch;
}
.comparison-table,
.pick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 640px;
}
.comparison-table th,
.comparison-table td,
.pick-table th,
.pick-table td {
  padding: 0.9rem 1.05rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.comparison-table thead th,
.pick-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-surface-2);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-soft);
  border-bottom: 1px solid var(--color-border-strong);
}
.comparison-table tbody tr,
.pick-table tbody tr { transition: background 0.12s var(--ease); }
.comparison-table tbody tr:hover,
.pick-table tbody tr:hover { background: var(--color-surface-2); }
.comparison-table tr:last-child td,
.pick-table tr:last-child td { border-bottom: none; }
.comparison-table td:first-child,
.pick-table td:first-child {
  font-weight: 600;
  color: var(--color-text);
  position: sticky;
  left: 0;
  background: var(--color-surface);
}
.comparison-table tbody tr:hover td:first-child,
.pick-table tbody tr:hover td:first-child { background: var(--color-surface-2); }
.highlight-col { background: var(--color-accent-soft); }

/* ---------- FAQ ---------- */
.faq-list { margin: 0; padding: 0; list-style: none; max-width: var(--reading-width); }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--color-surface);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.faq-item:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-xs); }
.faq-item h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.faq-item h3::before {
  content: "Q";
  font-size: 0.7rem; font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
  flex-shrink: 0;
}
.faq-item p { margin: 0; color: var(--color-text-muted); }

/* ---------- Verdict boxes ---------- */
.verdict-grid { display: grid; gap: 1.1rem; margin: 1.75rem 0; }
@media (min-width: 640px) { .verdict-grid { grid-template-columns: 1fr 1fr; } }
.verdict-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  box-shadow: var(--shadow-xs);
}
.verdict-box:first-child { border-top-color: var(--color-text-soft); }
.verdict-box h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.verdict-box p { margin: 0; color: var(--color-text-muted); font-size: 0.97rem; }

/* ---------- Category / pick helpers ---------- */
.category-table td:last-child { font-weight: 500; }

/* ---------- Editorial recommendation ---------- */
.editorial-pick {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 3rem 0 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.editorial-pick::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gradient-accent);
}
.editorial-pick-label {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.editorial-pick h2, .editorial-pick h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem; margin: 0 0 0.75rem;
}
.editorial-pick p { margin: 0 0 1rem; color: var(--color-text-muted); }
.editorial-pick .text-link { font-weight: 600; text-decoration: none; }
.editorial-pick .text-link:hover { text-decoration: underline; }

/* ---------- Scenario cards ---------- */
.scenario-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .scenario-grid { grid-template-columns: repeat(3, 1fr); } }
.scenario-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.scenario-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.scenario-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.scenario-card .scenario-meta {
  display: inline-block;
  font-size: 0.78rem; color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.2rem 0.55rem; border-radius: 999px;
  margin-bottom: 0.85rem;
}
.scenario-card p:last-child { margin-bottom: 0; font-size: 0.95rem; }
.scenario-card .pick {
  margin-top: 0.85rem; padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
@media (min-width: 640px) { .checklist { grid-template-columns: 1fr 1fr; } }
.checklist li {
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  position: relative;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0.7rem; top: 0.5rem;
  color: var(--color-success);
  font-weight: 700;
}

/* ---------- Glossary ---------- */
.glossary { margin: 1rem 0 0; }
.glossary dt { font-weight: 700; margin-top: 1.1rem; color: var(--color-text); }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 0.25rem 0 0; color: var(--color-text-muted); font-size: 0.97rem; }

/* ---------- Tool profile ---------- */
.tool-profile {
  padding: 1.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tool-profile:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border-strong); }
.tool-profile h3 { margin: 0 0 0.25rem; font-size: 1.3rem; }
.tool-profile .tool-tagline {
  font-size: 0.85rem; color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.affiliate-note {
  font-size: 0.85rem; color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin: 2rem 0 0;
  max-width: var(--reading-width);
}

.disclaimer {
  font-size: 0.85rem; color: var(--color-text-soft);
  font-style: italic; margin-top: 1.25rem;
  max-width: var(--reading-width);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand strong {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 1.05rem;
}
.footer-brand strong::before {
  content: ""; width: 1.2rem; height: 1.2rem; border-radius: 0.4rem;
  background: var(--gradient-accent);
}
.footer-brand p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0.6rem 0 0; max-width: 30rem; }
.footer-nav h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-soft); margin: 0 0 0.85rem;
}
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a { color: var(--color-text-muted); text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover { color: var(--color-accent); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem; color: var(--color-text-soft);
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.9rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn:hover, .card-link:hover, .scenario-card:hover { transform: none; }
}
