/*
 * GoCampaignly blog: static pages, no JavaScript.
 * Colours and fonts follow the app's "Festival Daylight" theme (src/index.css).
 */
:root {
  --canvas: #FBF8F4;
  --surface: #FFFFFF;
  --raised: #F5EFE8;
  --line: #EDE5DC;
  --line-strong: #D8CCBF;
  --ink: #1E1A26;
  --muted: #5D5568;
  --coral: #C93C1C;
  --coral-hover: #A8311A;
  --coral-soft: #FFECE5;
  --coral-soft-text: #8F2A12;
  --marigold: #F5A524;
  --marigold-soft: #FFF1D6;
  --marigold-ink: #8A4B00;
  --rose: #EC5B8C;
  --rose-soft: #FDE7EF;
  --rose-ink: #A11D50;
  --teal: #1FB5A3;
  --teal-soft: #DDF4F0;
  --teal-ink: #0B6660;
  --lilac: #9479E8;
  --lilac-soft: #EEE9FC;
  --lilac-ink: #5A3DBF;
  --display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(64, 36, 20, 0.04), 0 4px 16px rgba(64, 36, 20, 0.05);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

a { color: var(--coral); text-underline-offset: 3px; }
a:hover { color: var(--coral-hover); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 4px; }

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

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Site header and footer ---------- */
@media (max-width: 380px) {
  .site-nav a { padding: 0 7px; }
  .wordmark { font-size: 1.125rem; }
}
.ribbon {
  height: 4px;
  background: linear-gradient(90deg,
    var(--marigold) 0 20%, var(--rose) 20% 40%, var(--teal) 40% 60%,
    var(--lilac) 60% 80%, var(--coral) 80% 100%);
}
.site-header .bar {
  max-width: 72rem; margin: 0 auto; padding: 0 16px;
  min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center;
}
.wordmark span { color: var(--coral); }
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-size: 0.9rem; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a.btn-small {
  white-space: nowrap;
  color: #fff; background: var(--coral); border-radius: 10px; padding: 0 14px; margin-left: 4px;
}
.site-nav a.btn-small:hover { background: var(--coral-hover); color: #fff; }

.site-footer { background: var(--raised); margin-top: 64px; padding: 40px 0; }
.site-footer .inner {
  max-width: 72rem; margin: 0 auto; padding: 0 16px;
  display: flex; flex-direction: column; gap: 20px;
}
.site-footer .name { font-family: var(--display); font-weight: 800; font-size: 1.125rem; margin: 0; color: var(--ink); }
.site-footer p { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 20px; }
.site-footer nav a {
  font-size: 0.875rem; color: var(--muted); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 768px) {
  .site-footer .inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Layout ---------- */
main { display: block; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 72rem; margin: 0 auto; padding: 0 16px; }

.crumbs { font-size: 0.875rem; color: var(--muted); margin: 20px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }

/* ---------- Article ---------- */
.post-head { padding: 24px 0 8px; }
.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--marigold-soft); color: var(--marigold-ink);
}
.tag.rose { background: var(--rose-soft); color: var(--rose-ink); }
.tag.teal { background: var(--teal-soft); color: var(--teal-ink); }
.tag.lilac { background: var(--lilac-soft); color: var(--lilac-ink); }

h1, h2, h3 { font-family: var(--display); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); font-weight: 800; margin: 14px 0 12px; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 4.4vw, 1.75rem); font-weight: 800; margin: 2.2em 0 0.5em; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 1.6em 0 0.4em; }
.dek { font-size: 1.15rem; color: var(--muted); margin: 0 0 14px; }
.byline { font-size: 0.875rem; color: var(--muted); margin: 0; }
.byline strong { color: var(--ink); font-weight: 600; }

.post-body p, .post-body li { margin: 0 0 1em; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.post-body li { margin-bottom: 0.45em; }
.post-body li::marker { color: var(--coral); font-weight: 700; }
.post-body strong { font-weight: 700; }

.lead { font-size: 1.15rem; }

.takeaways {
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--marigold);
  border-radius: var(--radius); padding: 18px 20px 6px; margin: 28px 0; box-shadow: var(--shadow);
}
.takeaways h2 { font-size: 1.1rem; margin: 0 0 10px; }
.takeaways ul { margin-bottom: 0.8em; }

.note {
  background: var(--teal-soft); color: #0E3F3A; border-radius: var(--radius);
  padding: 14px 18px; margin: 20px 0; font-size: 1rem;
}
.note p:last-child { margin-bottom: 0; }
.note.rose { background: var(--rose-soft); color: #5E1230; }

.prompt {
  background: #241F2E; color: #F6F1EA; border-radius: var(--radius);
  padding: 16px 18px; margin: 16px 0 22px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; overflow-x: auto;
}
.prompt-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 -8px; }

.table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.5; }
caption { text-align: left; font-weight: 700; padding: 12px 14px 4px; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--raised); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; }

@media (max-width: 600px) {
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap caption { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap th, .table-wrap td { border: 0; padding: 2px 0; }
  .table-wrap tbody th { font-family: var(--display); font-size: 1.05rem; padding-bottom: 4px; }
  .table-wrap td[data-label]::before {
    content: attr(data-label) ": "; font-weight: 700; color: var(--muted); font-size: 0.85rem;
  }
}

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.3em; width: 18px; height: 18px;
  border: 2px solid var(--teal); border-radius: 5px; background: var(--surface);
}

.cta {
  background: var(--coral-soft); border-radius: 16px; padding: 22px 20px; margin: 36px 0;
  border: 1px solid #F8D3C6;
}
.cta h2 { margin-top: 0; font-size: 1.35rem; }
.cta p { margin: 0 0 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 22px; border-radius: 10px; background: var(--coral); color: #fff;
  font-weight: 700; text-decoration: none; font-size: 1rem;
}
.btn:hover { background: var(--coral-hover); color: #fff; }
.cta .small { font-size: 0.875rem; color: var(--coral-soft-text); margin: 12px 0 0; }

.faq h3 { font-size: 1.1rem; }

.related { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 8px; }
.related ul { list-style: none; padding: 0; }
.related li { margin: 0 0 10px; }
.related a { font-weight: 600; }

.sources { font-size: 0.9rem; color: var(--muted); }
.sources h2 { font-size: 1.1rem; }
.sources li { margin-bottom: 0.35em; }

/* ---------- Blog index ---------- */
.index-hero {
  padding: 36px 0 12px;
  background:
    radial-gradient(60% 80% at 10% 0%, rgba(245, 165, 36, 0.22), transparent 70%),
    radial-gradient(50% 70% at 95% 10%, rgba(236, 91, 140, 0.14), transparent 70%);
}
.index-hero h1 { margin-top: 8px; }
.index-hero p { color: var(--muted); font-size: 1.1rem; max-width: 40rem; margin: 0 0 8px; }
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 24px 0 8px; padding: 0; list-style: none; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.card .band { height: 8px; background: var(--marigold); }
.card.rose .band { background: var(--rose); }
.card.teal .band { background: var(--teal); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .tag { align-self: flex-start; }
.card h2 { font-size: 1.25rem; margin: 0; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover { color: var(--coral); }
.card h2 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { margin: 0; color: var(--muted); font-size: 0.975rem; line-height: 1.6; }
.card .meta { font-size: 0.8rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
