/* ============================================================
   Taskstack — shared styles
   Palette: paper #F4F6F2, ink #14171A, cobalt accent #2B4EFF,
   muted #5B6169. Display: Space Grotesk. Body: Source Serif 4.
   ============================================================ */

:root {
  --paper: #f4f6f2;
  --paper-raised: #ffffff;
  --ink: #14171a;
  --muted: #5b6169;
  --line: #dfe3dc;
  --cobalt: #2b4eff;
  --cobalt-deep: #1c34c9;
  --amber: #e8a33d;
  --max: 720px;
  --wide: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
}

a {
  color: var(--cobalt-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover { color: var(--cobalt); }

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

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

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

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wordmark .dot { color: var(--cobalt); }

.site-nav nav {
  display: flex;
  gap: 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.site-nav nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.site-nav nav a:hover { border-bottom-color: var(--cobalt); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 40px 24px 50px;
}

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--muted);
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Homepage hero ---------- */
.hero {
  padding: 64px 24px 40px;
  border-bottom: 1px solid var(--line);
}

.hero-inner { max-width: var(--wide); margin: 0 auto; }

.hero-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cobalt-deep);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  max-width: 14ch;
  margin-bottom: 18px;
}

.hero p.lede {
  font-family: 'Source Serif 4', serif;
  font-size: 19px;
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Featured post ---------- */
.featured {
  padding: 44px 24px;
  border-bottom: 1px solid var(--line);
}

.featured-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pill {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--cobalt);
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}

.featured h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 14px 0 10px;
}

.featured h2 a { color: var(--ink); text-decoration: none; }
.featured h2 a:hover { color: var(--cobalt-deep); }

.featured .dek {
  color: var(--muted);
  font-size: 17px;
  max-width: 70ch;
  margin: 0 0 14px;
}

.meta-row {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 16px;
}

/* ---------- Post list ---------- */
.post-list { padding: 10px 24px 60px; }
.post-list-inner { max-width: var(--wide); margin: 0 auto; }

.post-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.post-row .date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: var(--muted);
  padding-top: 4px;
}

.post-row h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.post-row h3 a { color: var(--ink); text-decoration: none; }
.post-row h3 a:hover { color: var(--cobalt-deep); }

.post-row p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 10px;
}

@media (max-width: 560px) {
  .post-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Article page ---------- */
article.post { padding: 50px 24px 20px; }

.post-header { max-width: var(--max); margin: 0 auto 36px; }

.post-header .pill { margin-bottom: 18px; }

.post-header h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 16px;
}

.post-header .dek {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 18px;
}

.post-body { font-size: 19px; }

.post-body h2 {
  font-size: 27px;
  margin: 44px 0 16px;
}

.post-body h3 {
  font-size: 21px;
  margin: 32px 0 12px;
}

.post-body p { margin: 0 0 20px; }

.post-body ul, .post-body ol {
  margin: 0 0 20px;
  padding-left: 26px;
}

.post-body li { margin-bottom: 8px; }

.post-body blockquote {
  border-left: 3px solid var(--cobalt);
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  color: var(--muted);
  font-style: italic;
}

.callout {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 30px 0;
  font-size: 17px;
}

.callout strong { font-family: 'Space Grotesk', sans-serif; }

.faq-item { margin-bottom: 22px; }
.faq-item h3 { margin-bottom: 6px; font-size: 19px; }

/* ---------- Ad slots ----------
   Placeholders only. Replace the contents of a .ad-slot div with
   your real AdSense <ins> code once your account is approved.
   Keep the label above each ad — Google requires ads to be
   distinguishable from content. */
.ad-slot {
  max-width: var(--max);
  margin: 34px auto;
  padding: 0 24px;
}

.ad-slot .ad-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}

.ad-slot .ad-box {
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  background: var(--paper-raised);
}

.author-box {
  max-width: var(--max);
  margin: 50px auto 0;
  padding: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.author-box .initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cobalt);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-box .name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}

.author-box .bio { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Related posts ---------- */
.related {
  max-width: var(--wide);
  margin: 60px auto 0;
  padding: 40px 24px 0;
  border-top: 1px solid var(--line);
}

.related h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.related-grid a {
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.related-grid .rel-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: var(--cobalt-deep);
  margin-bottom: 6px;
}

.related-grid h4 {
  font-size: 17px;
  line-height: 1.3;
}

/* ---------- Generic page (about/contact/privacy) ---------- */
.page-header {
  padding: 60px 24px 20px;
  max-width: var(--max);
  margin: 0 auto;
}

.page-header h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 10px; }
.page-header .dek { color: var(--muted); font-size: 18px; }

.page-body { max-width: var(--max); margin: 0 auto; padding: 20px 24px 60px; font-size: 18px; }
.page-body h2 { font-size: 23px; margin: 34px 0 14px; }
.page-body p { margin: 0 0 18px; }
.page-body ul { padding-left: 24px; margin: 0 0 18px; }
.page-body li { margin-bottom: 8px; }

/* ---------- Contact form ---------- */
form.contact-form {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

form.contact-form label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

form.contact-form input,
form.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  background: var(--paper-raised);
}

form.contact-form textarea { min-height: 140px; resize: vertical; }

form.contact-form button {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: var(--cobalt);
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  width: fit-content;
}

form.contact-form button:hover { background: var(--cobalt-deep); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
