/* NorthClover blog — sits on top of site-pages.css (same header, footer, fonts, tokens).
   Used by single-post.php (an article) and blog-index.php (the list of articles). */

/* Tints: one soft colour per category, shared by the article hero, section bands and screenshot pads.
   --tint is the ground, --tint-ink the label colour on it. */
:where(.post-hero, .post-body .nc-band, .post-body .nc-shot), .nc-tint-green { --tint: #e9f5ee; --tint-2: #f6fbf8; --tint-ink: #1d7a3e; }
.nc-tint-sky   { --tint: #e8eef9; --tint-2: #f6f8fd; --tint-ink: #2f5ea8; }
.nc-tint-sand  { --tint: #f8f0df; --tint-2: #fcf9f2; --tint-ink: #8a5a12; }
.nc-tint-lilac { --tint: #eeebf8; --tint-2: #f8f7fd; --tint-ink: #5b4aa8; }
.nc-tint-rose  { --tint: #f9ebea; --tint-2: #fdf7f6; --tint-ink: #a1443b; }

/* ── article hero: a tinted band with the title, then the featured image across its lower edge ── */
.post-hero { position: relative; padding: 76px 0 0; background: linear-gradient(180deg, var(--tint) 0%, var(--tint-2) 100%); overflow: hidden; }
.post-hero::before { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.post-hero .wrap { position: relative; }
.post-hero .eyebrow { color: var(--tint-ink); }
.post-hero .eyebrow a { color: inherit; }
.post-hero .eyebrow a:hover { color: var(--ink); }
.post-hero h1 { margin: 0; max-width: 860px; font-size: 54px; line-height: 1.07; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
.post-hero .lede { max-width: 680px; margin: 22px 0 0; color: #50545f; font-size: 19px; line-height: 1.65; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 28px 0 0; padding-bottom: 52px; color: #737885; font: 500 11px/1.4 'DM Mono', monospace; text-transform: uppercase; }
.post-meta .author { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.post-meta .avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 11px/1 'Plus Jakarta Sans', sans-serif; }
.post-hero.has-image .post-meta { padding-bottom: 44px; }
.post-feature { position: relative; margin: 0; }
.post-feature img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px 22px 0 0; box-shadow: 0 -1px 0 rgba(12, 12, 16, 0.04), 0 24px 60px rgba(12, 12, 16, 0.10); }

/* ── layout: contents on the left, the article on the right ── */
.post-shell { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 72px; padding-top: 52px; padding-bottom: 96px; }
.post-toc { align-self: start; position: sticky; top: 28px; display: grid; gap: 2px; padding-right: 18px; border-right: 1px solid var(--line); }
.post-toc .toc-label { margin: 0 0 8px 10px; color: #9a9ea8; font: 500 10px/1.4 'DM Mono', monospace; text-transform: uppercase; }
.post-toc a { padding: 8px 10px; border-radius: 6px; color: #747985; font-size: 12px; font-weight: 600; line-height: 1.45; }
.post-toc a:hover, .post-toc a:focus-visible { background: #f4f4f6; color: var(--ink); }

/* ── the article body (what you paste into the post) ── */
.post-body { color: #3d414b; font-size: 17px; line-height: 1.8; }
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 20px; }
.post-body h2 { margin: 56px 0 16px; color: var(--ink); font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; scroll-margin-top: 24px; text-wrap: balance; }
.post-body h3 { margin: 34px 0 10px; color: var(--ink); font-size: 20px; line-height: 1.35; font-weight: 700; }
.post-body a { color: #1d7a3e; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--ink); }
.post-body strong { color: var(--ink); font-weight: 700; }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 22px; }
.post-body li { margin: 0 0 8px; padding-left: 4px; }
.post-body li::marker { color: #9a9ea8; }
.post-body hr { margin: 48px 0; border: 0; border-top: 1px solid var(--line); }
.post-body img { max-width: 100%; height: auto; border-radius: 14px; }
.post-body figure { margin: 34px 0; }
.post-body figcaption { margin-top: 10px; color: #848995; font-size: 13px; line-height: 1.6; }

/* the first paragraph, a touch larger */
.post-body .nc-intro { color: var(--ink); font-size: 20px; line-height: 1.7; }

/* a callout: a quiet green note */
.post-body .nc-callout { margin: 32px 0; padding: 20px 24px; border-left: 3px solid var(--green); border-radius: 0 12px 12px 0; background: #f2f8f4; color: #2f3d34; font-size: 16px; }
.post-body .nc-callout p:last-child { margin-bottom: 0; }
.post-body .nc-callout .nc-label { display: block; margin-bottom: 6px; color: #1d7a3e; font: 500 11px/1.4 'DM Mono', monospace; text-transform: uppercase; }

/* steps: a real sequence, so it is numbered */
.post-body .nc-steps { counter-reset: step; list-style: none; margin: 28px 0 32px; padding: 0; display: grid; gap: 14px; }
.post-body .nc-steps > li { counter-increment: step; position: relative; margin: 0; padding: 18px 20px 18px 66px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.post-body .nc-steps > li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 30px; text-align: center; }
.post-body .nc-steps strong { display: block; margin-bottom: 2px; }
.post-body .nc-steps .nc-time { float: right; margin-left: 12px; color: #9a9ea8; font: 500 11px/2.4 'DM Mono', monospace; text-transform: uppercase; }

/* a checklist of questions to ask */
.post-body .nc-checks { list-style: none; margin: 24px 0 30px; padding: 0; display: grid; gap: 10px; }
.post-body .nc-checks > li { position: relative; margin: 0; padding: 0 0 0 34px; }
.post-body .nc-checks > li::before { content: ""; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 6px; background: #e2f3e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231d7a3e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }

/* an example card: a worked example, drawn like a page in the app */
.post-body .nc-example { margin: 34px 0; padding: 26px 28px; border-radius: 20px; background: #f5f5f7; }
.post-body .nc-example .nc-label { display: block; margin-bottom: 16px; color: #848995; font: 500 11px/1.4 'DM Mono', monospace; text-transform: uppercase; }
.post-body .nc-example dl { margin: 0; display: grid; gap: 12px; }
.post-body .nc-example dl > div { padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 0.5px rgba(12, 12, 16, 0.08), 0 1px 2px rgba(12, 12, 16, 0.04); }
.post-body .nc-example dt { margin-bottom: 4px; color: var(--ink); font-size: 14px; font-weight: 700; }
.post-body .nc-example dd { margin: 0; color: #4a4e58; font-size: 15px; line-height: 1.65; }

/* a two-column comparison */
.post-body .nc-compare { margin: 30px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-body .nc-compare > div { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; }
.post-body .nc-compare h3 { margin: 0 0 10px; font-size: 16px; }
.post-body .nc-compare ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.65; }

/* a pull quote */
.post-body .nc-pull { margin: 40px 0; padding: 0; border: 0; color: var(--ink); font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.post-body .nc-pull span { background: linear-gradient(transparent 62%, rgba(251, 191, 36, 0.55) 62%, rgba(251, 191, 36, 0.55) 90%, transparent 90%); }

/* a section band: the opening of a main section, on a soft tinted ground (pick a tint per band) */
.post-body .nc-band { position: relative; margin: 64px -32px 30px; padding: 40px 40px 36px; border-radius: 26px; background: linear-gradient(135deg, var(--tint) 0%, var(--tint-2) 100%); overflow: hidden; }
.post-body .nc-band::after { content: ""; position: absolute; right: -70px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, 0.55); pointer-events: none; }
.post-body .nc-band > * { position: relative; z-index: 1; }
.post-body .nc-band .nc-kicker { margin: 0 0 10px; color: var(--tint-ink); font: 500 11px/1.4 'DM Mono', monospace; text-transform: uppercase; }
.post-body .nc-band h2 { margin: 0; font-size: 34px; }
.post-body .nc-band p { max-width: 560px; margin: 14px 0 0; color: #474b55; font-size: 17px; line-height: 1.7; }
.post-body .nc-band--ink { --tint: #15161c; --tint-2: #0c0c10; --tint-ink: #9be7b4; }
.post-body .nc-band--ink h2 { color: #fff; }
.post-body .nc-band--ink p { color: #b4b8c2; }
.post-body .nc-band--ink::after { border-color: rgba(255, 255, 255, 0.05); }

/* a screenshot on a tinted pad (real app screens, demo data only) */
.post-body .nc-shot { margin: 34px 0 38px; padding: 30px 30px 0; border-radius: 22px; background: linear-gradient(160deg, var(--tint) 0%, var(--tint-2) 100%); overflow: hidden; }
.post-body .nc-shot img { display: block; width: 100%; height: auto; border-radius: 12px 12px 0 0; box-shadow: 0 0 0 1px rgba(12, 12, 16, 0.06), 0 18px 44px rgba(12, 12, 16, 0.12); }
.post-body .nc-shot figcaption { margin: 0 -30px; padding: 14px 30px 16px; background: #fff; border-top: 1px solid var(--line); color: #737885; font-size: 13px; line-height: 1.6; }
.post-body .nc-shot--wide { margin-left: -32px; margin-right: -32px; }
.post-body .nc-shot--bare { padding: 0; background: none; }
.post-body .nc-shot--bare img { border-radius: 14px; }
.post-body .nc-shot--bare figcaption { margin: 0; padding: 12px 2px 0; background: none; border: 0; }

/* a loop of steps that repeats (e.g. the weekly review): cards joined by arrows */
.post-body .nc-cycle { list-style: none; margin: 28px 0 34px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: cyc; }
.post-body .nc-cycle > li { counter-increment: cyc; position: relative; margin: 0; padding: 18px 16px 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(12, 12, 16, 0.04); font-size: 14px; line-height: 1.5; }
.post-body .nc-cycle > li::before { content: counter(cyc); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 12px; border-radius: 50%; background: var(--c, #e9f5ee); color: var(--ci, #1d7a3e); font-size: 12px; font-weight: 800; }
.post-body .nc-cycle > li:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 30px; width: 10px; height: 10px; border-top: 2px solid #c9ccd6; border-right: 2px solid #c9ccd6; transform: rotate(45deg); }
.post-body .nc-cycle > li:nth-child(2) { --c: #e8eef9; --ci: #2f5ea8; }
.post-body .nc-cycle > li:nth-child(3) { --c: #f9ebea; --ci: #a1443b; }
.post-body .nc-cycle > li:nth-child(4) { --c: #f8f0df; --ci: #8a5a12; }
.post-body .nc-cycle strong { display: block; margin-bottom: 4px; font-size: 15px; }
.post-body .nc-cycle span { color: #5c606b; }
.post-body .nc-cycle-note { margin: -18px 0 30px; color: #848995; font: 500 11px/1.5 'DM Mono', monospace; text-transform: uppercase; text-align: center; }

/* FAQ: native open/close */
.post-body .nc-faq { margin: 18px 0 0; border-top: 1px solid var(--line); }
.post-body .nc-faq details { border-bottom: 1px solid var(--line); }
.post-body .nc-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; padding: 18px 0; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.45; }
.post-body .nc-faq summary::-webkit-details-marker { display: none; }
.post-body .nc-faq summary::after { content: "+"; flex: none; color: #9a9ea8; font-size: 22px; font-weight: 500; line-height: 1; transition: transform 0.2s cubic-bezier(.22, 1, .36, 1); }
.post-body .nc-faq details[open] summary::after { transform: rotate(45deg); }
.post-body .nc-faq details > p { margin: 0 0 20px; font-size: 16px; }

/* ── the end card (from the template, after every article) ── */
.post-cta { margin-top: 64px; padding: 34px 34px 32px; border-radius: 24px; background: var(--ink); color: #fff; }
.post-cta .eyebrow { margin: 0 0 12px; color: #9be7b4; }
.post-cta h2 { margin: 0; color: #fff; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.post-cta p { margin: 12px 0 0; color: #b4b8c2; font-size: 15px; line-height: 1.7; }
.post-cta .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.post-cta .actions a { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 20px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.post-cta .actions .primary { background: #fff; color: var(--ink); }
.post-cta .actions .primary:hover { background: #e2f3e8; }
.post-cta .actions .secondary { border: 1px solid #3a3d46; color: #fff; }
.post-cta .actions .secondary:hover { border-color: #fff; }
.post-cta .small { margin-top: 14px; color: #8e939e; font-size: 12px; }

/* the author card (from the template) */
.post-author { display: flex; gap: 16px; align-items: flex-start; margin-top: 40px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; }
.post-author .avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e9f5ee; color: #1d7a3e; font-size: 18px; font-weight: 800; object-fit: cover; }
.post-meta img.avatar { object-fit: cover; }
.post-author .name a { color: inherit; }
.post-author .name a:hover { color: #1d7a3e; }
.post-author .links { margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.post-author .links a { color: #1d7a3e; }
.post-author .who { margin: 0; color: #9a9ea8; font: 500 10px/1.4 'DM Mono', monospace; text-transform: uppercase; }
.post-author .name { margin: 4px 0 0; color: var(--ink); font-size: 16px; font-weight: 800; }
.post-author .bio { margin: 6px 0 0; color: #5c606b; font-size: 14px; line-height: 1.65; }

.post-back { display: inline-block; margin-top: 34px; color: #747985; font-size: 13px; font-weight: 700; }
.post-back:hover { color: var(--ink); }

/* ── the blog index ── */
.blog-hero { padding: 76px 0 46px; border-bottom: 1px solid var(--line); }
.blog-hero h1 { margin: 0; font-size: 56px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
.blog-hero .lede { max-width: 640px; margin: 20px 0 0; color: #5c606b; font-size: 17px; line-height: 1.7; }
.blog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 48px 0 110px; }
.blog-card { display: flex; flex-direction: column; padding: 28px 28px 26px; border-radius: 20px; background: #f5f5f7; overflow: hidden; transition: transform 0.2s cubic-bezier(.22, 1, .36, 1), box-shadow 0.2s cubic-bezier(.22, 1, .36, 1), background 0.2s; }
.blog-card .thumb { display: block; margin: -28px -28px 24px; aspect-ratio: 16 / 9; background: #e9f5ee; }
.blog-card .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card:hover { background: #fff; box-shadow: 0 0 0 0.5px rgba(12, 12, 16, 0.08), 0 14px 40px rgba(12, 12, 16, 0.08); transform: translateY(-2px); }
.blog-card .eyebrow { margin-bottom: 14px; }
.blog-card h2 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
.blog-card p { margin: 12px 0 0; color: #5c606b; font-size: 15px; line-height: 1.7; }
.blog-card .more { margin-top: auto; padding-top: 22px; color: var(--ink); font-size: 13px; font-weight: 700; }
.blog-empty { padding: 60px 0 120px; color: #6b6f7a; }
.blog-pager { display: flex; justify-content: space-between; padding: 0 0 90px; font-size: 13px; font-weight: 700; }

@media (max-width: 900px) {
  .post-shell { display: block; padding-top: 30px; padding-bottom: 70px; }
  .post-toc { position: static; display: none; }
  .blog-list { grid-template-columns: 1fr; }
  .post-body .nc-band, .post-body .nc-shot--wide { margin-left: 0; margin-right: 0; }
  .post-body .nc-cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-body .nc-cycle > li:nth-child(2)::after { display: none; }
}
@media (max-width: 760px) {
  .post-hero { padding: 46px 0 0; }
  .post-meta { padding-bottom: 34px; }
  .post-hero.has-image .post-meta { padding-bottom: 28px; }
  .post-feature img { border-radius: 14px 14px 0 0; }
  .post-hero h1, .blog-hero h1 { font-size: 36px; }
  .post-body .nc-band { margin: 48px -18px 26px; padding: 30px 22px 28px; border-radius: 0; }
  .post-body .nc-band h2 { font-size: 27px; }
  .post-body .nc-band p { font-size: 16px; }
  .post-body .nc-shot { margin-left: -18px; margin-right: -18px; padding: 20px 18px 0; border-radius: 0; }
  .post-body .nc-shot figcaption { margin: 0 -18px; padding: 12px 18px 14px; }
  .post-body .nc-shot--bare { margin-left: 0; margin-right: 0; padding: 0; }
  .post-body .nc-shot--bare figcaption { margin: 0; padding: 10px 2px 0; }
  .post-body .nc-cycle { grid-template-columns: 1fr; }
  .post-body .nc-cycle > li { display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; }
  .post-body .nc-cycle > li::before { grid-row: span 2; margin: 0; }
  .post-body .nc-cycle > li::after { display: none !important; }
  .post-author { padding: 18px; }
  .post-hero .lede { font-size: 16px; }
  .post-body { font-size: 16px; }
  .post-body .nc-intro { font-size: 18px; }
  .post-body h2 { margin-top: 44px; font-size: 25px; }
  .post-body .nc-compare { grid-template-columns: 1fr; }
  .post-body .nc-example { padding: 20px 18px; }
  .post-body .nc-steps > li { padding-left: 58px; }
  .post-body .nc-pull { font-size: 22px; }
  .post-cta { padding: 26px 22px; }
  .post-cta h2 { font-size: 23px; }
  .blog-hero { padding: 52px 0 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blog-card, .post-body .nc-faq summary::after { transition: none; }
}
