/* The blog's styles (/blog/, the posts, the tag lists): the stylesheet of the site's static blog, the theme's own since
   the blog moved into Ghost (5 December 2026). It also styles the parts copied from the site's /blog-parts/ page (the
   course areas and the "Related course" box). Tokens only (src/styles/tokens.css, through site.css); derived colours
   are color-mix() of tokens. Motion: --jfk-ease, 150/300/600 ms, switched off globally under prefers-reduced-motion
   (the site's globals.css, in site.css). */

/* ---------- Post card: one stretched title link (single tab stop) + an independent category chip above it ---------- */
.post-card { isolation: isolate; }
/* The .jfk-card accent bar sits above the stretched link: let clicks through. */
.post-card::before { pointer-events: none; }
.post-card-link {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
  transition: text-decoration-color 300ms var(--jfk-ease);
}
.post-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--jfk-radius-lg); }
.post-card:hover .post-card-link { text-decoration-color: var(--jfk-cyan-500); }
/* Focus ring around the whole card (the link's own outline would only circle the title text). */
.post-card-link:focus-visible { outline: none; }
.post-card-link:focus-visible::after {
  outline: var(--jfk-focus-width) solid var(--focus-ring, var(--jfk-focus-outline));
  outline-offset: calc(-1 * var(--jfk-focus-width) - 2px);
}
.post-card-media { background: var(--jfk-navy-100); }
.post-card-media img { transition: transform 600ms var(--jfk-ease); }
.post-card:hover .post-card-media img, .post-card:focus-within .post-card-media img { transform: scale(1.035); }
/* Neutral inset hairline so light photos do not bleed into the white card body. */
.post-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--jfk-navy-950) 8%, transparent);
}
.post-card-arrow { transition: transform 150ms var(--jfk-ease), background-color 300ms var(--jfk-ease), color 300ms var(--jfk-ease); }
.post-card:hover .post-card-arrow, .post-card:focus-within .post-card-arrow {
  transform: translateX(3px);
  background: var(--jfk-book-600);
  color: var(--jfk-white);
}
/* Reduced motion: no photo zoom or arrow nudge (globals.css only shortens transitions, the jump would remain). */
@media (prefers-reduced-motion: reduce) {
  .post-card:hover .post-card-media img, .post-card:focus-within .post-card-media img { transform: none; }
  .post-card:hover .post-card-arrow, .post-card:focus-within .post-card-arrow { transform: none; }
}

/* Grid cards: at most four lines of excerpt (the full text stays in the DOM), so the cards of a row end level. */
.post-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

/* ---------- Course areas on /blog/ (BlogSectors): same card and stretched link as the post cards ---------- */
.blog-sector-list { list-style: none; margin: 0; padding: 0; }
.blog-sector-list > li { position: relative; padding-left: 1rem; }
.blog-sector-list > li + li { margin-top: 0.45rem; }
.blog-sector-list > li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--jfk-cyan-500);
}
@media (forced-colors: active) { .blog-sector-list > li::before { forced-color-adjust: none; background: CanvasText; } }

/* ---------- Category chip: small badge; the dot takes the course's safety-sign colour AND shape ----------
   (BS EN ISO 7010 families: warning = yellow triangle, mandatory = blue disc, fire / safe condition = square). */
.post-chip {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.75rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--jfk-navy-100);
  border-radius: var(--jfk-radius-pill);
  background: var(--jfk-navy-50);
  color: var(--jfk-navy-800);
  font-size: 0.75rem;
  font-weight: 700;
  /* 1.15, not 1: the badge stays 28 px tall (min-height); the extra only shows if the name ever wraps. */
  line-height: 1.15;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* No nowrap: in the flex-wrap meta rows a chip moves to its own line first and only wraps inside itself when it is
     wider than the whole row (a very large browser text size on a phone), instead of widening the card or the page. */
  max-width: 100%;
  transition: background-color 150ms var(--jfk-ease), border-color 150ms var(--jfk-ease), color 150ms var(--jfk-ease);
}
/* 44 px tall hit area without a 44 px tall badge. */
a.post-chip::before { content: ""; position: absolute; inset: -8px -4px; }
a.post-chip:hover { border-color: var(--jfk-navy-300); background: var(--jfk-white); color: var(--jfk-navy-900); }
.post-chip-dot { width: 0.55rem; height: 0.55rem; flex-shrink: 0; border-radius: 2px; background: var(--sign, var(--jfk-cyan-500)); }
.sign-yellow .post-chip-dot, .post-chip.sign-yellow .post-chip-dot {
  width: 0.7rem;
  height: 0.62rem;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.sign-blue .post-chip-dot { border-radius: 50%; }
.post-chip--dark {
  border-color: color-mix(in srgb, var(--jfk-white) 22%, transparent);
  background: color-mix(in srgb, var(--jfk-navy-950) 45%, transparent);
  color: var(--jfk-white);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
a.post-chip--dark:hover { border-color: var(--jfk-cyan-400); background: color-mix(in srgb, var(--jfk-navy-950) 60%, transparent); color: var(--jfk-cyan-300); }
.post-chip--dark .post-chip-dot { background: var(--sign, var(--jfk-cyan-400)); }
@media (forced-colors: active) { .post-chip-dot { forced-color-adjust: none; } }

/* ---------- Status badge (a post with a notice: "Offer ended") ---------- */
.post-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.75rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--jfk-warning) 30%, transparent);
  border-radius: var(--jfk-radius-pill);
  background: color-mix(in srgb, var(--jfk-warning) 8%, var(--jfk-white));
  color: var(--jfk-warning);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.post-status--dark {
  border-color: color-mix(in srgb, var(--jfk-white) 35%, transparent);
  background: color-mix(in srgb, var(--jfk-navy-950) 55%, transparent);
  color: var(--jfk-white);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- Topic pills (blog index and archive heroes) ---------- */
.blog-topic {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  /* 0.9rem sides: the six pills fit one row at 768 px in Archivo as in the fallback fonts (at 1.05rem Archivo needed
     20 px more than the row, so "Update" dropped to a second row only after the font swap and moved the page). */
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--jfk-concrete-300);
  border-radius: var(--jfk-radius-pill);
  background: var(--jfk-white);
  color: var(--jfk-navy-800);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 150ms var(--jfk-ease), border-color 150ms var(--jfk-ease), color 150ms var(--jfk-ease);
}
.blog-topic:hover { border-color: var(--jfk-cyan-700); color: var(--jfk-cyan-700); }
.blog-topic[aria-current] { border-color: var(--jfk-cyan-700); background: var(--jfk-cyan-700); color: var(--jfk-white); }

/* ---------- Post hero ---------- */
/* heroSoft posts: the photo is small print; blur it to texture (its blurred edge fades into the navy). */
.post-hero--soft .hero-side-photo { filter: blur(8px) saturate(0.85); }
/* Very long legacy H1s (130+ characters) step down one size so they stay within four or five lines. */
.post-hero-title { font-size: var(--jfk-text-h1); line-height: 1.08; }
.post-hero-title--long { font-size: clamp(1.75rem, 3.1vw, 2.6rem); line-height: 1.12; }
/* The current-page crumb repeats the H1 just below it: keep it to one line. */
.post-crumbs li:last-child { min-width: 0; }
.post-crumbs li:last-child > span { max-width: min(34ch, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Article body ---------- */
.post-body { max-width: 70ch; }
/* Lead paragraph: the opening paragraph of the first text run (PostBody marks it .post-lead). */
.post-body .post-lead > p:first-child { color: var(--jfk-ink); font-size: 1.1875rem; line-height: 1.7; }
/* Jump-link targets: html already pads by the header height + 1rem (globals.css); a little more air above the H2. */
.post-body .prose-jfk h2 { scroll-margin-top: 0.75rem; }
/* Images get room to breathe: a wider gap above and below than between paragraphs (margins collapse with the next
   block's), the caption tied to its image by a short cyan rule. */
.post-body .prose-jfk > figure { margin-block: 2.25rem; }
.post-body .prose-jfk > figure:first-child { margin-top: 0; }
.post-body .prose-jfk figure img { outline: 1px solid color-mix(in srgb, var(--jfk-navy-950) 8%, transparent); outline-offset: -1px; }
.post-body .prose-jfk figcaption { margin-top: 0.75rem; padding-left: 0.85rem; border-left: 2px solid var(--jfk-cyan-500); line-height: 1.45; }
/* Notice above the article (an ended offer): the Callout in an amber (--jfk-warning) tint with a strong left edge,
   so it reads as a status note, not as part of the promotion. Text links: underlined, never colour alone. */
.post-notice {
  position: relative;
  margin-bottom: 2.5rem;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--jfk-warning) 30%, transparent);
  background: color-mix(in srgb, var(--jfk-warning) 7%, var(--jfk-white));
}
.post-notice::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--jfk-warning); }
.post-notice > svg { color: var(--jfk-warning); }
.post-notice > div > p:first-child { font-size: 1.0625rem; }
@media (forced-colors: active) { .post-notice::before { forced-color-adjust: none; background: CanvasText; } }
.post-notice a { color: var(--jfk-cyan-700); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-notice a:hover { color: var(--jfk-navy-900); text-decoration-thickness: 2px; }
/* The closing hashtag line is plain text, not links: muted ink, so it is not mistaken for the cyan prose links. */
.post-hashtags {
  margin-top: 1.75rem;
  color: var(--jfk-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.8;
  word-spacing: 0.3em;
  overflow-wrap: anywhere;
}

/* ---------- "In this article" (long guides): sidebar list on desktop, closed disclosure above the text below lg ---------- */
.post-toc-title { color: var(--jfk-navy-900); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.post-toc-list { list-style: none; margin: 0; padding: 0; }
.post-toc-list > li + li { border-top: 1px solid var(--jfk-line); }
.post-toc-link {
  display: flex;
  gap: 0.75rem;
  min-height: 2.75rem;
  align-items: baseline;
  padding: 0.7rem 0.25rem;
  color: var(--jfk-ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: pretty;
  transition: color 150ms var(--jfk-ease);
}
.post-toc-text {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: text-decoration-color 150ms var(--jfk-ease);
}
.post-toc-link:hover { color: var(--jfk-navy-900); }
.post-toc-link:hover .post-toc-text { text-decoration-color: var(--jfk-cyan-500); }
.post-toc-num { flex-shrink: 0; min-width: 1.5rem; color: var(--jfk-cyan-700); font-size: 0.8125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.post-toc--aside .post-toc-title { margin-bottom: 0.5rem; padding-bottom: 0.85rem; border-bottom: 2px solid var(--jfk-navy-900); }
.post-toc--inline {
  margin-bottom: 2.25rem;
  border: 1px solid var(--jfk-line);
  border-radius: var(--jfk-radius-md);
  background: var(--jfk-concrete-50);
}
.post-toc-summary {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--jfk-radius-md);
  color: var(--jfk-navy-900);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.post-toc-summary::-webkit-details-marker { display: none; }
.post-toc-chevron { flex-shrink: 0; color: var(--jfk-cyan-700); transition: transform 300ms var(--jfk-ease); }
.post-toc--inline[open] .post-toc-chevron { transform: rotate(180deg); }
.post-toc--inline[open] .post-toc-summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.post-toc--inline .post-toc-list { padding: 0 1.1rem 0.6rem; border-top: 1px solid var(--jfk-line); }

/* In-article booking panel (the legacy "Get qualified ..." blocks): concrete panel, course-coloured edge. */
.post-cta {
  position: relative;
  margin-block: 2.75rem;
  overflow: hidden;
  border: 1px solid var(--jfk-line);
  border-radius: var(--jfk-radius-lg);
  background: var(--jfk-concrete-50);
  padding: 1.75rem 1.5rem 1.75rem 1.9rem;
}
.post-cta::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--sign, var(--jfk-cyan-500)); }
@media (min-width: 640px) { .post-cta { padding: 2rem 2.25rem 2rem 2.5rem; } }
@media (forced-colors: active) { .post-cta::before { forced-color-adjust: none; } }

/* Tags and previous / next */
.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  border: 1px solid var(--jfk-line);
  border-radius: var(--jfk-radius-pill);
  background: var(--jfk-concrete-50);
  color: var(--jfk-navy-800);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 150ms var(--jfk-ease), border-color 150ms var(--jfk-ease);
}
.post-tag:hover { border-color: var(--jfk-navy-300); background: var(--jfk-white); }
.post-nav-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--jfk-line);
  border-radius: var(--jfk-radius-md);
  background: var(--jfk-white);
  box-shadow: var(--jfk-shadow-sm);
  transition: border-color 300ms var(--jfk-ease), box-shadow 300ms var(--jfk-ease), transform 300ms var(--jfk-ease);
}
.post-nav-link:hover { border-color: var(--jfk-navy-200); box-shadow: var(--jfk-shadow-md); transform: translateY(-2px); }
.post-nav-link .post-nav-arrow { transition: transform 150ms var(--jfk-ease); }
.post-nav-link:hover .post-nav-arrow--prev { transform: translateX(-3px); }
.post-nav-link:hover .post-nav-arrow--next { transform: translateX(3px); }

/* Course call-out: a static card, so its sign-coloured top bar is always shown. */
.course-callout::before { transform: scaleX(1); }
