/* ==========================================================================
   Prompt to Payroll - design system
   One palette, one type scale, one spacing scale, one set of components.
   Every value used in a component comes from a token below.
   ========================================================================== */

:root {
  /* Colour */
  --bg: #0b0f14;
  --bg-soft: #121820;
  --surface: #161d27;
  --surface-2: #1c2531;
  --text: #e8ecf2;
  --text-muted: #a3b0c2;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-ink: #04231a;
  --border: #24303f;
  --border-strong: #33455a;
  --focus: #7dd3fc;
  --overlay: rgba(11, 15, 20, 0.92);
  --accent-tint: var(--accent-tint);

  /* Type scale */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-md: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.4375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(2.1rem, 4.6vw, 3.25rem);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.65;
  --measure: 68ch;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* Radii and elevation */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.28);
  --tap: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--sp-3); text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--sp-5); }

/* ---------- Header ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; min-height: 64px; }
.brand { display: flex; flex-direction: column; line-height: var(--lh-tight); }
.logo {
  font-size: var(--fs-lg); font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; display: flex; align-items: center; gap: var(--sp-2);
}
.logo-mark { width: 34px; height: 34px; border-radius: var(--r-sm); }
.logo:hover { text-decoration: none; }
.logo .arrow { color: var(--accent); }
.tagline { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.nav-links { display: flex; gap: var(--sp-5); align-items: center; }
.nav-links a {
  color: var(--text-muted); font-weight: 500; font-size: var(--fs-md);
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap);
  background: var(--accent); color: var(--accent-ink) !important;
  font-weight: 700; padding: var(--sp-3) var(--sp-5); border-radius: var(--r-sm);
  font-size: var(--fs-md); border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text) !important; }
.btn.ghost:hover { border-color: var(--accent); color: var(--text) !important; }

/* ---------- Hero ---------- */
.hero { padding: var(--sp-9) 0 var(--sp-8); text-align: center; }
.hero .kicker {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-5);
  background: var(--bg-soft);
}
.hero h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: -0.03em; font-weight: 800; }
.hero h1 .accent { color: var(--accent); }
.hero p.lede { max-width: 62ch; margin: var(--sp-5) auto var(--sp-6); color: var(--text-muted); font-size: var(--fs-lg); }
.hero .cta-row { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: var(--sp-8) 0; }
.section-title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--sp-2); }
.section-sub { color: var(--text-muted); max-width: 62ch; margin-bottom: var(--sp-6); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
@media (max-width: 840px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
}
.card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.card p { color: var(--text-muted); font-size: var(--fs-md); }
.card .icon { font-size: 1.6rem; margin-bottom: var(--sp-3); display: block; }

/* ---------- Social pills ---------- */
.social-strip { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.social-pill {
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  padding: var(--sp-3) var(--sp-5); min-height: var(--tap);
  display: inline-flex; align-items: center;
  color: var(--text); font-weight: 600; font-size: var(--fs-md); background: var(--bg-soft);
}
.social-pill:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Cards: posts and products ---------- */
.post-list { display: grid; gap: var(--sp-4); }
.post-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5); color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.post-card:hover { border-color: var(--accent); text-decoration: none; background: var(--surface-2); }
.post-card h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); margin-bottom: var(--sp-2); }
.post-card p { color: var(--text-muted); }
.post-card .tag {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-3);
}

/* ---------- Article ---------- */
article.post { max-width: 760px; margin: 0 auto; padding: var(--sp-8) var(--sp-5) var(--sp-6); }
article.post h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: var(--lh-tight); letter-spacing: -0.02em; margin-bottom: var(--sp-3); }
article.post .meta { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-6); }
article.post h2 { font-size: var(--fs-xl); line-height: var(--lh-snug); margin: var(--sp-7) 0 var(--sp-3); letter-spacing: -0.01em; scroll-margin-top: 96px; }
article.post h3 { font-size: var(--fs-lg); margin: var(--sp-5) 0 var(--sp-2); scroll-margin-top: 96px; }
article.post p, article.post li { color: var(--text); margin-bottom: var(--sp-3); font-size: 1.125rem; line-height: var(--lh-body); }
article.post p { max-width: var(--measure); }
article.post ul, article.post ol { padding-left: var(--sp-5); margin-bottom: var(--sp-4); }
article.post li { max-width: var(--measure); }
article.post strong { color: var(--text); font-weight: 700; }
article.post a { text-decoration: underline; text-underline-offset: 2px; }
article.post a:hover { text-decoration-thickness: 2px; }
article.post blockquote {
  border-left: 3px solid var(--accent); padding: var(--sp-2) var(--sp-4);
  color: var(--text-muted); margin: var(--sp-5) 0; max-width: var(--measure);
}

.disclosure {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); color: var(--text-muted); margin: var(--sp-5) 0;
}
.affiliate-placeholder {
  border: 1px dashed var(--accent); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); color: var(--accent); margin: var(--sp-3) 0 var(--sp-4); background: var(--accent-tint);
}
.verdict {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5); margin: var(--sp-3) 0 var(--sp-5); font-size: var(--fs-base);
  max-width: var(--measure);
}
.verdict strong { color: var(--accent); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: var(--fs-sm); color: var(--text-muted); padding: var(--sp-5) 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumbs li + li::before { content: "/"; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

/* ---------- Related guides ---------- */
.related { border-top: 1px solid var(--border); margin-top: var(--sp-7); padding-top: var(--sp-6); }
.related h2 { font-size: var(--fs-lg); margin: 0 0 var(--sp-4); }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.related-list a { color: var(--text); font-weight: 600; font-size: var(--fs-base); }
.related-list a:hover { color: var(--accent); }
.related-list span { display: block; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 400; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-6); text-align: center; margin: var(--sp-6) 0;
}
.cta-band h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.cta-band p { color: var(--text-muted); margin-bottom: var(--sp-5); max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-band .cta-row { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer.site-footer { border-top: 1px solid var(--border); padding: var(--sp-7) 0 var(--sp-8); margin-top: var(--sp-7); }
.footer-grid { display: flex; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap; }
.footer-grid .col h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: var(--sp-3); }
.footer-grid .col a { display: block; color: var(--text); font-size: var(--fs-md); margin-bottom: var(--sp-2); min-height: 32px; }
.footer-grid .col a:hover { color: var(--accent); }
.footer-note { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--sp-6); max-width: var(--measure); }
.footer-note + .footer-note { margin-top: var(--sp-3); }

/* ---------- Search ---------- */
.search-box input {
  width: 100%; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-base); color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: var(--r-md); outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-status { color: var(--text-muted); font-size: var(--fs-sm); margin: var(--sp-4) 0; }

/* ---------- Category chips ---------- */
.chip-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.chip {
  border: 1px solid var(--border-strong); background: var(--bg-soft); color: var(--text-muted);
  border-radius: var(--r-pill); padding: var(--sp-2) var(--sp-4); min-height: var(--tap);
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Comparison tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--sp-5) 0 var(--sp-6); border: 1px solid var(--border); border-radius: var(--r-md); }
table.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-md); min-width: 640px; }
table.cmp th {
  text-align: left; padding: var(--sp-3) var(--sp-4); background: var(--bg-soft); color: var(--text);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border);
}
table.cmp td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
table.cmp tr:last-child td { border-bottom: none; }
table.cmp tr.pick td { background: var(--accent-tint); }
table.cmp td.tool { font-weight: 700; color: var(--text); white-space: nowrap; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); border-radius: 5px; padding: 3px var(--sp-2);
  margin-left: var(--sp-2); vertical-align: middle;
}
.badge.alt { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

/* ---------- Newsletter ---------- */
.newsletter { padding: var(--sp-7) 0; }
.newsletter-box {
  text-align: center; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: var(--sp-7) var(--sp-5);
}
.newsletter-box h2 { margin-top: 0; font-size: var(--fs-xl); }
.newsletter-box p { color: var(--text-muted); }
.newsletter-form { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; margin: var(--sp-5) 0 var(--sp-3); }
.newsletter-form input[type="email"] {
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  min-width: 260px; font-size: var(--fs-base); background: var(--bg-soft); color: var(--text);
  min-height: var(--tap);
}
.newsletter-form input[type="email"]:focus { border-color: var(--accent); }
.newsletter-note { font-size: var(--fs-sm); margin: 0; }

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

/* ---------- Contact form ---------- */
.contact-form { max-width: 560px; margin: var(--sp-5) 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.contact-form label { font-weight: 600; display: block; margin-bottom: var(--sp-2); }
.contact-form input, .contact-form textarea {
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font-size: var(--fs-base); background: var(--bg-soft); color: var(--text); width: 100%; font-family: inherit;
  min-height: var(--tap);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: none; }
.contact-form .btn { align-self: flex-start; }
.hp-field { display: none; }

/* ---------- Video ---------- */
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--r-md); margin: var(--sp-5) 0 var(--sp-2); }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 404 ---------- */
.page-404 { padding: var(--sp-9) 0; text-align: center; }
.page-404 h1 { font-size: var(--fs-3xl); letter-spacing: -0.03em; margin-bottom: var(--sp-4); }
.page-404 p { color: var(--text-muted); max-width: 52ch; margin: 0 auto var(--sp-6); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  :root { --sp-9: 64px; --sp-8: 48px; --sp-7: 36px; }
  .nav { flex-wrap: wrap; row-gap: var(--sp-2); }
  .logo { font-size: var(--fs-base); }
  .nav-links { gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; }
  .nav-links a { font-size: var(--fs-sm); }
  .nav-links a.btn { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }
  .hero { padding: var(--sp-8) 0 var(--sp-7); }
  .hero p.lede { font-size: var(--fs-base); }
  article.post { padding: var(--sp-7) var(--sp-4); }
  article.post p, article.post li { font-size: 1.0625rem; }
  .container { padding: 0 var(--sp-4); }
  .post-card, .card { padding: var(--sp-4); }
  .post-card h3 { font-size: var(--fs-lg); }
  .footer-grid { gap: var(--sp-5); }
  .footer-grid .col { flex: 1 1 140px; }
}
