/* ============================================================
   Findfront — blog (/blog, /blog/<slug>, 404)

   The homepage's look (website-v6, "Many Questions"), self-contained:
   a cobalt field of rounded squares where the site speaks, white where
   the visitor reads; Funnel Display 800 for display, Funnel Sans for
   text; the Front Field logo. Tokens, the header, pills, the contact
   close and the footer copy website-v6/styles.css, so keep them in step.
   Fonts and the brand kit live at /v6/assets (scripts/build.mjs copies
   them from website-v6/assets).
   Breakpoints follow the homepage: 1100px (tablet), 860px (menu),
   700px (phone).
   ============================================================ */

@font-face {
  font-family: "Funnel Display";
  src: url("/v6/assets/fonts/funnel-display-latin-wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("/v6/assets/fonts/funnel-sans-latin-wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --field: #0538ab;
  --deep: #04287b;
  --tint: #e1e7f5;
  --wash: #f1f4fa;
  --on-muted: #cdd7ee;
  --line: #8fa5d9;
  --rule-on: #446ac0;
  --rule-deep: #314f93;
  --ink: #0e1624;
  --ink-soft: #2a3344;
  --slate: #545e6f;
  --outline: #7b8798;
  --hairline: #e3e8f0;
  --paper: #ffffff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --text: "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 720px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--slate) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--tint); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
a { color: inherit; }
svg { display: block; flex: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { padding: 0; list-style: none; }
button { font: inherit; }

/* author styles below set display on elements js/blog.js hides */
.blog-body [hidden] { display: none !important; }
/* The topic chips keep their space while js/blog.js loads, so the cards below never jump
   (templates add a <noscript> rule that collapses it when scripts are off). */
.blog-body .blog-chips[hidden] { display: flex !important; visibility: hidden; }

.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;
}

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 20;
  padding: 12px 18px; border-radius: 999px;
  background: var(--paper); color: var(--field); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }
.skip:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

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

.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(46px, 6vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.on-field { color: var(--on-muted); }
.list-label { font-size: 14px; font-weight: 600; text-wrap: balance; }

/* A label with the field's square in front of it. */
.blog-kicker, .blog-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.3;
}
.blog-kicker::before, .blog-label::before {
  content: ""; flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--paper);
}
.blog-label { color: var(--field); }
.blog-label::before { background: var(--field); }

/* ---------- the field: one square, one buyer question (decorative here) ---------- */
.c { display: block; border-radius: 7px; background: var(--deep); }
.c.on { background: var(--paper); }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.pill .blog-icon { width: 18px; height: 18px; }
.blog-icon-arrow { transition: transform 160ms var(--ease); }
.pill:hover .blog-icon-arrow, .blog-textlink:hover .blog-icon-arrow { transform: translateX(3px); }
.pill-white { background: var(--paper); color: var(--field); }
.pill-white:hover { background: var(--tint); color: var(--field); }
.pill-white:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.pill-field { background: var(--field); color: var(--paper); }
.pill-field:hover { background: var(--deep); }
.pill-field:focus-visible { outline: 3px solid var(--field); outline-offset: 3px; }
/* On the field: a quiet second action. */
.pill-outline { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.pill-outline:hover { background: var(--deep); box-shadow: inset 0 0 0 1px var(--paper); }
.pill-outline:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
/* On white. */
.pill-outline--ink { color: var(--ink); box-shadow: inset 0 0 0 1px var(--outline); }
.pill-outline--ink:hover { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ink); }
.pill-outline--ink:focus-visible { outline-color: var(--field); }
.pill-lg { height: 56px; padding: 0 28px; font-size: 17px; }

.blog-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.blog-textlink {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--field); font-weight: 700; font-size: 15px; text-decoration: none;
}
.blog-textlink .blog-icon { width: 16px; height: 16px; }
.blog-textlink:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- header (website-v6) ---------- */
.header { position: relative; z-index: 5; background: var(--field); color: var(--paper); }
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; min-height: 80px;
}
.brand {
  --logo-h: 22px;
  display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none;
}
.brand-logo { display: block; height: var(--logo-h); fill: currentColor; }
.brand-field { fill: var(--line); }
.brand:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; border-radius: 4px; }
.nav { display: flex; align-items: center; gap: 8px 28px; }
.nav a:not(.pill) {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color 160ms var(--ease);
}
.nav a:not(.pill):hover { color: var(--paper); }
.nav a.is-current:not(.pill) {
  color: var(--paper);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px;
}
.menu-button { display: none; }
.menu-button[aria-expanded="true"] .menu-icon-open,
.menu-button[aria-expanded="false"] .menu-icon-close { display: none; }

/* ---------- draft and preview notes (local previews only) ---------- */
.blog-draft {
  display: flex; align-items: center; gap: 14px;
  padding: 14px var(--gutter); background: var(--ink); color: var(--paper); font-size: 15px; line-height: 1.45;
}
.blog-draft strong { font-weight: 700; }
.blog-draft-tag {
  flex: none; padding: 4px 10px; border-radius: 6px;
  background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700;
}
.blog-draft--slim { padding-block: 10px; font-size: 14px; }
.post-draft-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px;
  background: var(--tint); color: var(--field); font-size: 12px; font-weight: 700; vertical-align: 1px;
}

/* ---------- field hero (/blog and 404) ---------- */
.blog-hero {
  position: relative; overflow: hidden;
  background: var(--field); color: var(--paper);
  padding: clamp(56px, 6vw, 96px) 0 clamp(64px, 7vw, 112px);
}
.blog-hero-field, .post-head-field {
  position: absolute; top: 0; bottom: 0; right: 0;
  /* Starts right of the copy, on the 1440px grid; it dissolves toward the text. */
  left: calc(max(0px, (100% - 1440px) / 2) + 900px);
  display: grid; grid-template-columns: repeat(24, 28px); grid-auto-rows: 28px; gap: 10px;
  align-content: start; overflow: hidden;
  /* As on the homepage, the field dissolves over its last rows, never sideways. */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 172px), transparent calc(100% - 20px));
  mask-image: linear-gradient(to bottom, #000 calc(100% - 172px), transparent calc(100% - 20px));
}
.blog-hero-wrap { position: relative; z-index: 2; }
.blog-hero-copy { max-width: 800px; }
.blog-hero-title { margin-top: 24px; font-size: clamp(46px, 5.6vw, 96px); }
.blog-hero-sub {
  margin-top: 28px; max-width: 34rem;
  font-size: clamp(19px, 1.25vw, 21px); line-height: 1.55; color: var(--on-muted); text-wrap: pretty;
}
.blog-hero .blog-actions { margin-top: 36px; }
.blog-main--404 .blog-hero { min-height: clamp(520px, 70vh, 760px); display: flex; align-items: center; }
.blog-main--404 .blog-hero-wrap { width: 100%; }

/* ---------- /blog: filter, feature, grid ---------- */
.blog-filter { padding-top: clamp(40px, 4vw, 56px); }
.blog-filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding-bottom: 20px; border-bottom: 1px solid var(--hairline);
}
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--outline);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.blog-chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.blog-chip[aria-pressed="true"] { background: var(--field); color: var(--paper); box-shadow: none; }
.blog-chip:focus-visible { outline: 2px solid var(--field); outline-offset: 3px; }
.blog-count { flex: none; font-size: 14px; font-weight: 500; color: var(--slate); white-space: nowrap; }

.blog-feature-wrap { padding-top: clamp(32px, 3.4vw, 48px); }
.post-feature {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px clamp(32px, 4vw, 64px);
  align-items: end;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 16px; background: var(--field); color: var(--paper);
  transition: background-color 160ms var(--ease);
}
.post-feature:hover { background: var(--deep); }
.post-feature-title {
  margin-top: 20px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 3.6vw, 54px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance;
}
.post-feature-link { color: inherit; text-decoration: none; }
.post-feature-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.post-feature-link:focus-visible { outline: none; }
.post-feature-link:focus-visible::after { outline: 3px solid var(--field); outline-offset: 4px; }
.post-feature-side { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.post-feature-cat { font-size: 14px; font-weight: 600; color: var(--paper); }
.post-feature-desc { font-size: 17px; line-height: 1.55; color: var(--on-muted); text-wrap: pretty; }
.post-feature-meta { font-size: 14px; color: var(--on-muted); }
.post-feature-cta { margin-top: 8px; }
.post-feature:hover .post-feature-cta { background: var(--tint); }
.post-feature:hover .blog-icon-arrow { transform: translateX(3px); }

.blog-list { padding-top: clamp(56px, 6vw, 88px); padding-bottom: clamp(72px, 7vw, 112px); }
.blog-section-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 3vw, 44px); line-height: 1; letter-spacing: -0.035em;
}
.blog-list .blog-section-title { margin-bottom: clamp(24px, 2.4vw, 36px); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
.post-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--hairline);
  transition: border-color 160ms var(--ease);
}
.post-card:hover { border-top-color: var(--field); }
.post-card-cat {
  order: -1; display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--field);
}
.post-card-cat::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--field); }
.post-card-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(22px, 1.8vw, 26px); line-height: 1.1; letter-spacing: -0.025em; text-wrap: pretty;
}
.post-card-link {
  color: var(--ink); text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: 4px;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}
.post-card:hover .post-card-link { color: var(--field); text-decoration-color: currentColor; }
.post-card-link::after { content: ""; position: absolute; inset: -1px 0 0; z-index: 1; }
.post-card-link:focus-visible { outline: none; }
.post-card-link:focus-visible::after { outline: 2px solid var(--field); outline-offset: 6px; border-radius: 8px; }
.post-card-desc { font-size: 15px; line-height: 1.55; color: var(--slate); text-wrap: pretty; }
.post-card-meta { margin-top: 4px; font-size: 13px; color: var(--slate); }

/* Before the first guide is approved. */
.blog-empty-wrap { padding: clamp(56px, 6vw, 96px) 0 clamp(72px, 7vw, 112px); }
.blog-empty { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.blog-empty-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.blog-empty-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(36px, 4.4vw, 64px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance;
}
.blog-empty-text { max-width: 34rem; font-size: 18px; color: var(--slate); text-wrap: pretty; }
.blog-empty .blog-actions { margin-top: 8px; }
.blog-empty-art { display: flex; justify-content: center; }
.blog-empty-art svg { width: min(220px, 100%); height: auto; }

/* ---------- Let's talk (website-v6) ---------- */
.contact {
  position: relative; overflow: hidden; min-height: 720px;
  padding: clamp(96px, 8vw, 136px) 0; background: var(--field); color: var(--paper);
}
.contact-field {
  position: absolute; top: 0; right: 0; bottom: 0; left: calc(50% + 40px);
  display: grid; grid-template-columns: repeat(36, 28px); grid-auto-rows: 28px; gap: 10px;
  align-content: center;
}
.contact-wrap { position: relative; z-index: 2; }
.contact-copy { max-width: min(560px, 46%); }
.contact-lead {
  margin-top: 24px; max-width: 34rem;
  font-size: 19px; line-height: 1.55; color: var(--on-muted); text-wrap: pretty;
}
.contact-copy .list-label { margin-top: 32px; }
.bring { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bring li { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; }
.bring li::before {
  content: ""; display: block; flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--paper);
}
.contact-copy .pill { margin-top: 40px; }

/* ---------- footer (website-v6) ---------- */
.footer { padding: 64px 0 40px; background: var(--deep); color: var(--paper); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 32px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; font-weight: 500;
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 1px; text-underline-offset: 6px;
  transition: text-decoration-color 160ms var(--ease);
}
.footer-nav a:hover { text-decoration-color: var(--on-muted); }
.footer-nav a:focus-visible { outline: 3px solid var(--paper); }
.footer-small {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule-deep);
  font-size: 13px; color: var(--on-muted);
}

/* ---------- post: the cobalt head ---------- */
.post-head {
  position: relative; overflow: hidden;
  padding: clamp(32px, 3.4vw, 48px) 0 clamp(56px, 5.6vw, 88px);
  background: var(--field); color: var(--paper);
}
.post-head-wrap { position: relative; z-index: 2; }
.post-head-wrap > * { max-width: 840px; }
.blog-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 14px; font-weight: 500; }
.blog-crumbs li { display: flex; align-items: center; gap: 10px; }
.blog-crumbs li + li::before { content: "/"; content: "/" / ""; color: var(--line); }
.blog-crumbs a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: var(--rule-on); transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}
.blog-crumbs a:hover { color: var(--paper); text-decoration-color: currentColor; }
.blog-crumbs a:focus-visible { outline: 3px solid var(--paper); }
.post-head-kicker { margin-top: clamp(20px, 2.4vw, 36px); }
.post-title {
  margin-top: 20px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(38px, 4.6vw, 72px); line-height: 0.98; letter-spacing: -0.038em; text-wrap: balance;
}
.post-dek {
  margin-top: clamp(20px, 2vw, 28px); max-width: 40rem;
  font-size: clamp(18px, 1.4vw, 21px); line-height: 1.5; color: var(--on-muted); text-wrap: pretty;
}
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin-top: clamp(24px, 2.4vw, 32px); font-size: 14px; font-weight: 500; color: var(--on-muted);
}
.post-meta li { display: inline-flex; align-items: center; gap: 16px; }
.post-meta li + li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--line); }

/* ---------- post: layout and contents ---------- */
.post-layout {
  display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: start;
  padding-top: clamp(48px, 5vw, 80px);
}
.post-layout--toc { grid-template-columns: minmax(200px, 248px) minmax(0, var(--measure)); column-gap: clamp(40px, 6.5vw, 104px); }
.post-article { min-width: 0; }

.post-toc { position: relative; }
.post-toc-inner { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 4px 4px 4px 0; }
.post-toc-title { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--slate); }
.post-toc-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.post-toc-list li { border-bottom: 1px solid var(--hairline); }
.post-toc-list a {
  display: flex; align-items: baseline; gap: 12px; padding: 11px 0;
  font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--slate); text-decoration: none;
  transition: color 160ms var(--ease);
}
.post-toc-list a:hover { color: var(--ink); }
.post-toc-list a:focus-visible { outline-color: var(--field); }
/* Each section is a square; the one being read fills in. */
.post-toc-mark {
  flex: none; position: relative; top: 1px; width: 10px; height: 10px; border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px var(--outline);
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.post-toc-list a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.post-toc-list a[aria-current="true"] .post-toc-mark { background: var(--field); box-shadow: none; }
.post-toc-top { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-size: 14px; }

.post-toc-mobile { display: none; border: 1px solid var(--outline); border-radius: 12px; padding: 0 16px; }
.post-toc-mobile summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  font-weight: 600; cursor: pointer; list-style: none;
}
.post-toc-mobile summary::-webkit-details-marker { display: none; }
.post-toc-mobile summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease);
}
.post-toc-mobile[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.post-toc-mobile summary:focus-visible { outline-color: var(--field); }
.post-toc-mobile .post-toc-list { padding-bottom: 8px; }
.post-toc-mobile .post-toc-list a { padding: 12px 0; color: var(--ink); }

/* ---------- post: Markdown body ---------- */
.prose { max-width: var(--measure); font-size: 18px; line-height: 1.7; color: var(--ink-soft); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 22px; text-wrap: pretty; }
.prose > p:first-child { margin-bottom: 28px; font-size: clamp(19px, 1.4vw, 21px); line-height: 1.55; font-weight: 500; color: var(--ink); }
.prose strong, .prose b { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }
.prose a {
  color: var(--field); text-decoration: underline; text-decoration-color: rgba(5, 56, 171, 0.35);
  text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 160ms var(--ease);
}
.prose a:hover { text-decoration-color: currentColor; }
.prose a:focus-visible { outline-color: var(--field); border-radius: 2px; }

.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--ink); scroll-margin-top: 24px; text-wrap: balance; }
.prose h2 {
  margin: 64px 0 18px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(28px, 2.6vw, 38px); line-height: 1.04; letter-spacing: -0.03em;
}
.prose h3 {
  margin: 40px 0 12px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(21px, 1.7vw, 25px); line-height: 1.15; letter-spacing: -0.02em;
}
.prose h2 + h3 { margin-top: 24px; }
.prose h4, .prose h5, .prose h6 { margin: 32px 0 10px; font-weight: 700; font-size: 19px; line-height: 1.3; }
.prose h5, .prose h6 { font-size: 17px; }

.prose ul, .prose ol { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; line-height: 1.6; }
/* ul keeps list-style (a transparent marker) so Safari still exposes it as a list; the square is drawn */
.prose ul { list-style: disc; padding-left: 24px; }
.prose ul > li { position: relative; }
.prose ul > li::marker { color: transparent; }
.prose ul > li::before {
  content: ""; position: absolute; left: -24px; top: calc(0.8em - 5px);
  width: 10px; height: 10px; border-radius: 3px; background: var(--field);
}
.prose ol { list-style: decimal; padding-left: 36px; }
.prose ol > li { padding-left: 4px; }
.prose ol > li::marker { font-family: var(--display); font-weight: 800; color: var(--field); }
.prose li > p { margin: 0 0 10px; }
.prose li > p:last-child { margin-bottom: 0; }
.prose li > ul, .prose li > ol { margin: 10px 0 0; }
.prose li li::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--field); }
.prose ul > li:has(> input[type="checkbox"])::before { display: none; }
.prose li > input[type="checkbox"] { margin: 0 8px 0 0; vertical-align: -2px; accent-color: var(--field); }

.prose blockquote {
  margin: 36px 0; padding: 26px 30px; border-radius: 16px;
  background: var(--tint); color: var(--ink);
}
.prose blockquote p {
  margin: 0 0 12px; color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: clamp(20px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -0.015em;
}
.prose blockquote > :last-child { margin-bottom: 0; }

.prose .table-wrap {
  margin: 32px 0; overflow-x: auto;
  /* edge shadows appear only while there is more table to scroll to */
  background:
    linear-gradient(to right, var(--paper) 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--paper) 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(14, 22, 36, 0.18), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(14, 22, 36, 0.18), transparent) right / 14px 100% no-repeat scroll;
}
.prose .table-wrap:focus-visible { outline-color: var(--field); }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.45; }
.prose th {
  min-width: 128px; padding: 12px 14px; text-align: left; vertical-align: bottom;
  background: var(--tint); color: var(--ink); font-size: 13px; font-weight: 700;
}
.prose thead th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.prose thead th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.prose td { min-width: 128px; padding: 14px; vertical-align: top; color: var(--ink-soft); border-bottom: 1px solid var(--hairline); }
.prose td:first-child { font-weight: 600; color: var(--ink); }
.prose :is(th, td)[align="center"] { text-align: center; }
.prose :is(th, td)[align="right"] { text-align: right; }

.prose figure { margin: 36px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose figure img { width: 100%; background: var(--wash); }
.prose figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--slate); }

.prose code {
  padding: 2px 6px; border-radius: 6px; background: var(--wash); color: var(--deep);
  font-family: var(--mono); font-size: 0.86em; overflow-wrap: anywhere;
}
.prose pre {
  margin: 28px 0; padding: 20px 24px; border-radius: 12px;
  background: var(--ink); color: var(--tint);
  font-family: var(--mono); font-size: 14.5px; line-height: 1.6;
  overflow-x: auto; white-space: pre; tab-size: 2;
}
.prose pre code { padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }
.prose pre:focus-visible { outline-color: var(--field); }

.prose hr { margin: 48px 0; height: 0; border: 0; border-top: 1px solid var(--hairline); }

/* ---------- post: byline, CTA, related ---------- */
.post-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; max-width: var(--measure);
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--hairline);
  font-size: 15px; line-height: 1.5; color: var(--slate);
}
.post-byline-author { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.post-byline-author::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--field); }

.blog-cta-wrap { padding-top: clamp(64px, 7vw, 112px); }
.blog-cta {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
  padding: clamp(32px, 4vw, 56px);
  border-radius: 16px; background: var(--field); color: var(--paper);
}
.blog-cta > :not(.blog-cta-field) { position: relative; z-index: 2; max-width: min(620px, calc(100% - 420px)); }
.blog-cta-field {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(10, 28px); grid-auto-rows: 28px; gap: 10px;
  align-content: start; padding: 10px; overflow: hidden;
}
.blog-cta-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance;
}
.blog-cta-side { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.blog-cta-side p { font-size: 18px; line-height: 1.55; color: var(--on-muted); text-wrap: pretty; }

.blog-related { padding-top: clamp(64px, 7vw, 112px); padding-bottom: clamp(72px, 7vw, 112px); }
.blog-section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: clamp(24px, 2.4vw, 36px);
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .blog-hero { display: flex; flex-direction: column; padding-bottom: 0; }
  .blog-hero-wrap { order: 1; }
  .blog-hero-field {
    order: 2; position: relative; left: auto; top: auto; right: auto; bottom: auto;
    grid-template-columns: none; grid-template-rows: repeat(4, 22px);
    grid-auto-flow: column; grid-auto-columns: 22px; gap: 8px;
    height: 112px; margin-top: clamp(48px, 7vw, 72px); padding-left: var(--gutter);
    -webkit-mask-image: none; mask-image: none;
  }
  .blog-hero-field .c { border-radius: 6px; }
  .blog-main--404 .blog-hero { min-height: 0; }
  .post-head-field, .blog-cta-field { display: none; }
  .blog-cta > :not(.blog-cta-field) { max-width: 640px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout--toc { grid-template-columns: minmax(0, var(--measure)); }
  .post-toc { display: none; }
  .post-toc-mobile { display: block; margin-bottom: 36px; }
  .contact-field { left: 62%; }
  .contact-copy { max-width: 58%; }
}

/* ---------- menu (website-v6) ---------- */
@media (max-width: 860px) {
  /* Without JavaScript the links stay in the header and wrap. */
  .header-row { flex-wrap: wrap; padding-block: 12px; }
  .nav { flex-wrap: wrap; gap: 0 20px; }
  .js .header-row { flex-wrap: nowrap; padding-block: 0; }
  .js .menu-button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px;
    background: transparent; color: var(--paper); cursor: pointer;
  }
  .js .menu-button:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
  .js .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; border-top: 1px solid var(--rule-on);
    background: var(--field); box-shadow: 0 24px 40px -24px rgba(1, 10, 40, 0.6);
  }
  .js .nav.is-open { display: flex; animation: menu-in 200ms var(--ease); }
  .js .nav a:not(.pill) {
    display: flex; min-height: 52px; border-bottom: 1px solid var(--rule-on);
    font-size: 18px; color: var(--paper);
  }
  .js .nav a.is-current:not(.pill) { text-decoration: none; font-weight: 700; }
  .js .nav .nav-cta { height: 52px; margin-top: 16px; }
}
/* The menu panel arrives whole from just above; closing is instant. */
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- phone ---------- */
@media (max-width: 700px) {
  .pill-lg { height: 52px; }
  .blog-actions .pill { width: 100%; }
  .blog-draft { align-items: flex-start; font-size: 14px; }

  .blog-filter { padding-inline: 0; }
  .blog-filter-bar { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 14px; }
  .blog-chips {
    /* 8px inside the scroller (offset by negative margins) so focus rings are not clipped */
    flex-wrap: nowrap; overflow-x: auto; padding: 8px var(--gutter); margin: -8px 0 -4px;
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .blog-chips::-webkit-scrollbar { display: none; }
  .blog-chip { flex: none; min-height: 44px; }
  .blog-count { padding: 0 var(--gutter); font-size: 13px; }

  .post-feature { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 24px; }
  .post-feature-cta { align-self: stretch; }
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .post-card { gap: 10px; padding-top: 20px; }
  .post-card--compact .post-card-desc { display: none; }
  .blog-related .post-grid { gap: 32px; }
  .blog-empty { grid-template-columns: minmax(0, 1fr); }
  .blog-empty-art { justify-content: flex-start; }
  .blog-empty-art svg { width: 120px; }

  .contact { display: flex; flex-direction: column; min-height: 0; padding-bottom: 0; }
  .contact-copy { max-width: none; }
  .contact-copy .pill { width: 100%; }
  .contact-field {
    order: 2; position: relative; top: auto; right: auto; bottom: auto; left: auto;
    height: 228px; margin: 48px -14px 0; overflow: hidden; align-content: start;
  }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-direction: column; gap: 0; width: 100%; }
  .footer-nav a { display: flex; align-items: center; min-height: 44px; }
  .footer-small { flex-direction: column; }

  .blog-crumbs ol, .blog-crumbs li { gap: 0 8px; }
  .post-title { line-height: 1; }
  .post-meta { gap: 6px 12px; font-size: 13px; }
  .post-meta li { gap: 12px; }

  .prose { font-size: 17px; line-height: 1.65; }
  .prose p { margin-bottom: 20px; }
  .prose > p:first-child { margin-bottom: 22px; }
  .prose h2 { margin: 48px 0 14px; }
  .prose h3 { margin: 32px 0 10px; }
  .prose blockquote { padding: 20px 22px; }
  .prose pre { padding: 16px 18px; font-size: 14px; }
  .post-byline { flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 40px; font-size: 14px; }
  .blog-cta .pill { width: 100%; }
  .blog-cta-side { align-self: stretch; }
  .blog-section-head { align-items: flex-end; }
}

/* Touch screens: every footer link is a full-size target. */
@media (pointer: coarse) {
  .blog-body .footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .nav.is-open { animation: none; }
  .pill, .pill .blog-icon-arrow, .blog-icon-arrow, .post-feature, .post-card, .post-card-link, .post-toc-mark { transition: none; }
}

/* Forced colours drop backgrounds: keep the squares, cards and chips visible as outlines. */
@media (forced-colors: active) {
  .c, .post-toc-mark, .blog-kicker::before, .post-card-cat::before { border: 1px solid CanvasText; }
  .post-toc-list a[aria-current="true"] .post-toc-mark { background: Highlight; }
  .post-feature, .blog-cta, .blog-chip, .pill { border: 1px solid CanvasText; }
  .blog-chip[aria-pressed="true"] { background: Highlight; color: HighlightText; }
}

/* ---------- print: the article, without chrome ---------- */
@media print {
  .skip, .header, .footer, .blog-filter, .blog-cta-wrap, .blog-related, .blog-contact,
  .post-toc, .post-toc-mobile, .post-feature-cta, .blog-actions, .blog-empty-art,
  .blog-hero-field, .post-head-field, .blog-cta-field, .contact-field { display: none !important; }
  body { background: #fff; }
  .blog-hero, .post-head { background: none; color: var(--ink); padding: 0 0 16px; }
  .blog-hero-sub, .post-dek, .post-meta, .blog-crumbs a { color: var(--slate); }
  .blog-kicker::before { background: var(--ink); }
  .prose .table-wrap { background: none; overflow: visible; }
  .blog-draft { background: none; color: var(--ink); border: 2px solid var(--ink); }
  .post-layout, .post-layout--toc { display: block; padding: 16px 0 0; }
  .wrap { padding: 0; }
  .prose, .post-byline { max-width: none; }
  .post-feature { background: none; color: var(--ink); border: 2px solid var(--ink); }
  .post-feature-desc, .post-feature-meta, .post-feature-cat { color: var(--slate); }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: var(--slate); overflow-wrap: anywhere; }
  .prose pre { background: #fff; color: var(--ink); border: 1px solid var(--hairline); white-space: pre-wrap; }
  .prose :is(h2, h3, h4) { break-after: avoid; }
  .prose :is(figure, pre, blockquote, tr) { break-inside: avoid; }
}
