/* ==========================================================================
   Salt blog — shared styles
   Tokens and conventions mirror index.html (Revised Deep Ocean / Nocturne).
   House rules taken from the main site: Space Grotesk headings at weight 400,
   indigo eyebrows, hairline rules, generous whitespace. Keep in sync if the
   palette or type scale changes there.
   ========================================================================== */

:root {
  --warm-white: #F6F5F2;
  --warm-white-rgb: 246 245 242;
  --abyss: #1A1C2A;
  --abyss-rgb: 26 28 42;
  --midnight-blue: #2D3550;
  --midnight-blue-rgb: 45 53 80;
  --indigo: #5B45E8;
  --indigo-rgb: 91 69 232;
  --soft-iris: #A89EC8;
  --soft-iris-rgb: 168 158 200;
  --eucalyptus: #82A898;
  --eucalyptus-rgb: 130 168 152;
  --ochre-mist: #C4A87A;
  --ochre-mist-rgb: 196 168 122;
  --neutral-0: #ffffff;
  --neutral-50: var(--warm-white);
  --neutral-400: var(--soft-iris);
  --bg-page: var(--abyss);
  --bg-section-dark: var(--abyss);
  /* Footer ground, aliased the way index.html names it so the ported footer
     CSS below can be kept byte-identical to the homepage's. */
  --deep-dusk: var(--abyss);
  --deep-dusk-rgb: var(--abyss-rgb);
  --bg-card: rgb(var(--midnight-blue-rgb) / 0.35);
  /* Sand surface — a warm cream (#E7D9C3) in light mode. Dark mode states its
     own warm tone rather than washing ochre over the page: at any usable alpha
     the navy cancels the ochre to neutral grey. */
  --bg-sand: #332B21;
  --bg-sand-soft: #2B2520;
  --rule-sand: rgb(var(--ochre-mist-rgb) / 0.45);
  /* Panel behind the post artwork. Deliberately not sand: the drawings need a
     neutral ground so the ink shapes stay the loudest thing in the tile. */
  --bg-art: rgb(var(--warm-white-rgb) / 0.05);
  --border-subtle: rgb(var(--midnight-blue-rgb) / 0.4);
  --border-softer: rgb(var(--warm-white-rgb) / 0.06);
  --copy-primary: var(--neutral-0);
  --copy-muted: var(--soft-iris);
  --accent: var(--soft-iris);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --section-padding-x: clamp(1.25rem, 4vw, 2.5rem);
  --content-max: 70rem;
  --prose-max: 46rem;
  --nav-height: 72px;
}

body.theme-light {
  --bg-page: #ffffff;
  --bg-section-dark: #ffffff;
  --bg-card: #f3f3f3;
  --border-subtle: rgb(15 23 42 / 0.08);
  --border-softer: rgb(15 23 42 / 0.05);
  --copy-primary: #0b1120;
  --copy-muted: #4b5563;
  --accent: var(--indigo);
  --bg-sand: #E7D9C3;
  --bg-sand-soft: rgb(var(--ochre-mist-rgb) / 0.28);
  --rule-sand: rgb(var(--ochre-mist-rgb) / 0.65);
  --bg-art: var(--warm-white);
}

/* Copy sitting on a sand surface. In light mode sand is solid enough to need
   its own ink, a warm near-black. Indigo at
   0.78rem only reaches 4.4:1 on sand, so the eyebrow takes the ink colour
   instead and indigo is kept for large text. */
body.theme-light .sand-surface {
  --copy-primary: #2A2520;
  --copy-muted: #574C3E;
  --accent: #2A2520;
  --border-subtle: rgb(42 37 32 / 0.16);
}
/* On the dark sand tone, soft iris reads as a cold bruise. Warm the copy and
   hand the accent to ochre so the surface stays tonal. */
body:not(.theme-light) .sand-surface {
  --copy-muted: #C9BDA8;
  --accent: var(--ochre-mist);
  --border-subtle: rgb(var(--ochre-mist-rgb) / 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
.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;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--copy-muted);
  background: var(--bg-page);
}

/* ----- Nav ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-section-dark);
  border-bottom: 1px solid var(--midnight-blue);
  backdrop-filter: blur(16px);
  color: var(--copy-primary);
}
body.theme-light .nav { border-bottom-color: #f3f3f3; }
.nav-inner {
  height: var(--nav-height);
  padding: 0 var(--section-padding-x);
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-left { display: flex; align-items: center; gap: 2rem; }
.nav-logo img { height: 18px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: calc(1.5rem + 15px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--copy-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: calc(0.85rem + 2px);
  line-height: 1;
}
.nav-links a:hover { color: var(--soft-iris); }

.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  margin: 0 0.5rem 0 0;
  border: none;
  background: transparent;
  color: var(--copy-primary);
  cursor: pointer;
  border-radius: 6px;
}
.nav-menu-btn:hover { background: rgb(255 255 255 / 0.08); }
body.theme-light .nav-menu-btn:hover { background: rgb(15 23 42 / 0.06); }
.nav-menu-btn svg { width: 1.75rem; height: 1.75rem; }
.nav-menu-btn .nav-menu-icon-open,
.nav-menu-btn .nav-menu-icon-close { display: none; }
.nav-menu-btn[aria-expanded="false"] .nav-menu-icon-open { display: block; }
.nav-menu-btn[aria-expanded="true"] .nav-menu-icon-close { display: block; }

.nav-drawer {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(85vw, 320px);
  max-width: 320px;
  background: var(--bg-section-dark);
  border-right: 1px solid var(--border-subtle);
  z-index: 99;
  padding: calc(var(--nav-height) + 1rem) 1.5rem 1.5rem;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
body.nav-open .nav-drawer { transform: translateX(0); }
.nav-drawer-links {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-drawer-links a {
  display: block;
  padding: 0.9rem 0;
  color: var(--copy-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}
.nav-drawer-links a:hover { color: var(--copy-primary); }
.nav-drawer-buttons { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-drawer-buttons .btn { width: 100%; justify-content: center; }
.nav-drawer-theme-row {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-drawer-theme-label { color: var(--copy-primary); font-size: 0.85rem; }
.nav-drawer-separator {
  margin: 1.25rem 0 0.75rem;
  border: 0;
  border-top: 1px solid var(--border-subtle);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

.nav-buttons { display: flex; align-items: center; gap: 0.85rem; }
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-right: 0.25rem;
  transition: transform 0.12s ease-out;
  border-radius: 100px;
  line-height: 0;
  color: var(--copy-primary);
}
.theme-toggle-btn:hover { transform: translateY(-1px); }
.theme-toggle-icon { width: 16px; height: 16px; }

/* Feature flags (temporary): Agent Marketplace link only. Mirrors index.html —
   to show it again, remove class feature-flags-hidden from <body>. */
body.feature-flags-hidden .nav-link--agents { display: none !important; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: box-shadow 0.15s, transform 0.12s;
}
.btn-primary { background: var(--indigo); color: var(--neutral-0); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--copy-primary);
  border: 1px solid rgb(var(--indigo-rgb) / 0.8);
}
.btn-secondary:hover { background: rgb(var(--indigo-rgb) / 0.15); }

.coming-soon {
  cursor: default;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--copy-primary);
  font-weight: 500;
  font-size: calc(0.85rem + 2px);
}
.coming-soon-label { transition: opacity 0.12s ease; }
.coming-soon-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
  white-space: nowrap;
}
.coming-soon:hover .coming-soon-label { opacity: 0; }
.coming-soon:hover .coming-soon-hover { opacity: 1; }
.coming-soon.btn-primary:hover,
.coming-soon.btn-secondary:hover { filter: none; transform: none; }
.coming-soon.btn-secondary:hover { background: transparent; }
.coming-soon.btn-primary { color: var(--neutral-0); }
.footer-col .coming-soon,
.nav-drawer-links .coming-soon {
  font-size: 0.875rem;
  justify-content: flex-start;
}

/* ----- Shared type ----- */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ----- Blog index -----
   A compact page header, one featured post across the full row, then a grid
   of equal-weight tiles beneath it. The feature and the tiles share the same
   .post-card markup and artwork rules — .post-card--feature only changes the
   axis and the type scale, so a post moves between the two by moving its
   <li>. */
.blog-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3.5rem var(--section-padding-x) 2rem;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--copy-primary);
  margin: 0 0 0.6rem;
  max-width: 46ch;
}
.blog-hero h1 .accent { color: var(--indigo); }
body:not(.theme-light) .blog-hero h1 .accent { color: var(--soft-iris); }
.blog-hero-sub {
  margin: 0;
  max-width: 46rem;
  font-size: 1.0625rem;
  color: var(--copy-muted);
}

/* auto-fill (not auto-fit) keeps a lone post at one column width rather than
   stretching it across the page, so the layout reads the same at 1 post or 9. */
/* The wrapper carries the container and the sand hairline under the header so
   the rule lines up with the card edges rather than the page padding. */
.post-grid-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
}
.post-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 3.5rem 2.5rem;
  margin: 0;
  padding: 3.25rem 0 6rem;
  border-top: 1px solid var(--rule-sand);
}
/* With only a featured post published, the tile grid would otherwise draw a
   bare rule and 9rem of padding under it. Requires the markup to stay on one
   line — a newline inside the <ul> is a text node and defeats :empty. */
.post-grid:empty { display: none; }

/* ----- Featured post -----
   Full row, artwork beside the copy rather than above it. Below the grid's
   breakpoint it stacks and reads as a slightly larger tile. */
.post-feature {
  list-style: none;
  margin: 0;
  padding: 3.25rem 0 0;
  border-top: 1px solid var(--rule-sand);
}
.post-feature:last-child { padding-bottom: 6rem; }
.post-card.post-card--feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
.post-card.post-card--feature .post-art { margin-bottom: 0; }
.post-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}
.post-card.post-card--feature h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}
.post-card.post-card--feature .post-excerpt {
  font-size: 1.05rem;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  margin-bottom: 2rem;
}
.post-card.post-card--feature .read-more { margin-top: 0; align-self: flex-start; min-width: 14rem; }
@media (max-width: 48rem) {
  .post-card.post-card--feature { grid-template-columns: 1fr; }
  .post-card.post-card--feature .post-art { margin-bottom: 1.4rem; }
  .post-card.post-card--feature .read-more { align-self: stretch; }
}
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.post-meta .dot { opacity: 0.55; }
.post-card .post-meta {
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  margin: 0 0 0.7rem;
}

/* Article header runs tag → title → byline. The tag keeps .post-meta's accent
   shout; the byline underneath is plain muted copy so the two don't compete
   for the same job directly above and below the headline. */
.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--copy-muted);
  margin: -0.5rem 0 1.5rem;
}
.article-byline .dot { opacity: 0.55; }
.article-byline .byline-name {
  color: var(--copy-primary);
  font-weight: 500;
}
.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--copy-primary);
  margin: 0 0 0.7rem;
}
.post-card .post-excerpt {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--copy-muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .read-more {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--copy-primary);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--copy-primary);
  transition: color 0.18s, border-color 0.18s;
}
.post-card:hover .read-more,
.post-card:focus-visible .read-more {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ----- Post artwork -----
   Each post carries an inline SVG so the drawing picks up the active theme.
   Shapes are classed rather than filled inline; the palette below is the whole
   vocabulary — ink for structure, one eucalyptus accent, indigo for the mark.
   Keep ids in each drawing prefixed with the post slug so two tiles on the
   same page can't collide. */
.post-art {
  aspect-ratio: 4 / 3;
  margin-bottom: 1.4rem;
  border: 1px solid var(--rule-sand);
  background: var(--bg-art);
  overflow: hidden;
  transition: border-color 0.18s, background-color 0.18s;
}
.post-art svg { display: block; width: 100%; height: 100%; }
/* A tile can carry a photo instead of a drawing. It fills the same 4:3 box —
   but unlike the classed SVGs it does not invert with the theme. */
.post-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card:hover .post-art,
.post-card:focus-visible .post-art { border-color: var(--accent); }
/* Ink is the page's own copy colour, so the drawings invert with the theme:
   dark shapes on the light panel, light shapes on the dark one. */
.post-art .a-grid {
  fill: none;
  stroke: var(--copy-primary);
  stroke-width: 0.5;
  opacity: 0.12;
}
.post-art .a-line {
  fill: none;
  stroke: var(--copy-primary);
  stroke-width: 1;
  opacity: 0.35;
}
.post-art .a-ink { fill: var(--copy-primary); opacity: 0.9; }
.post-art .a-ink-60 { fill: var(--copy-primary); opacity: 0.55; }
.post-art .a-ink-30 { fill: var(--copy-primary); opacity: 0.3; }
.post-art .a-accent { fill: var(--eucalyptus); }
.post-art .a-mark { fill: none; stroke: var(--indigo); stroke-width: 2; }
body:not(.theme-light) .post-art .a-mark { stroke: var(--soft-iris); }

/* ----- Article -----
   The <article> element carries the site's 70rem container so the text block
   starts on the same left edge as the nav logo and the homepage hero; the
   measure is then held to --prose-max rather than centred. */
.article {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
}
.article > * { max-width: var(--prose-max); }
.article-header { padding: 3.5rem 0 2.5rem; }
.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--copy-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--copy-primary); }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--copy-primary);
  margin: 0 0 1.5rem;
}
.article-lede {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--copy-muted);
  margin: 0;
}

/* Body copy takes the full ink colour, not the muted one — at article length
   the soft iris reads as washed-out purple. The lede above it stays muted so
   it still steps down from the headline. */
.prose {
  padding: 0 0 4rem;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--copy-primary);
}
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.75rem; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--copy-primary);
  margin: 3.5rem 0 1.25rem;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--copy-primary);
  margin: 2.5rem 0 0.85rem;
}
.prose strong { color: var(--copy-primary); font-weight: 500; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
.prose ul, .prose ol { margin: 0 0 1.75rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.6rem; }
/* A stated principle, not a quotation. <blockquote> is reserved for other
   people's words — the hackathon post has three — so a statement of our own
   gets its own treatment: rules rather than a box, and no quotation framing. */
.prose .pull-quote {
  margin: 3rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule-sand);
  border-bottom: 1px solid var(--rule-sand);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--copy-primary);
}

.prose blockquote {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  border-left: 3px solid var(--ochre-mist);
  border-radius: 0 12px 12px 0;
  background: var(--bg-sand-soft);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--copy-primary);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr {
  margin: 3.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-subtle);
}
.prose img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
.prose figure { margin: 3rem 0; }
/* Two photos side by side, as the source post ran them. The ratios differ, so
   the cells fix the height and the images cover it rather than letterboxing. */
.prose .figure--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.prose .figure--pair img {
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
@media (max-width: 40rem) {
  .prose .figure--pair { grid-template-columns: 1fr; }
}
.prose figcaption {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--copy-muted);
}
.prose code {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--copy-primary);
}
.prose pre {
  overflow-x: auto;
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-softer);
  margin: 0 0 1.75rem;
}
.prose pre code { background: none; padding: 0; }

/* ----- Authors ----- */
.authors {
  padding-top: 2.5rem;
  margin-bottom: 3rem;
  border-top: 1px solid var(--rule-sand);
}
.authors-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 1.5rem;
}
.author-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
}
.author-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--copy-primary);
  margin: 0 0 0.2rem;
}
.author-role {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--copy-muted);
}
.author-links { display: flex; gap: 0.6rem; }
.author-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--rule-sand);
  color: var(--copy-primary);
  transition: background-color 0.15s;
}
.author-links a:hover { background: var(--bg-sand-soft); }
.author-links svg { width: 0.95rem; height: 0.95rem; }

.article-end {
  margin-bottom: 6rem;
  padding: 2rem 2rem 2.25rem;
  border-radius: 16px;
  background: var(--bg-sand);
}
.article-end p { margin: 0 0 1.5rem; font-size: 1rem; color: var(--copy-muted); }
/* The newsletter ask is the point of the end-cap, so it carries the weight of
   a heading rather than body copy. Brevo only wires one form per page (its
   script queries #sib-form document-wide), so this is a jump to the footer
   form rather than a second field. */
.article-end-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--copy-primary);
  max-width: 26ch;
}
.article-end-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.article-end-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--copy-muted);
  text-decoration: none;
  padding: 0 0.25rem;
}
.article-end-link:hover { color: var(--copy-primary); text-decoration: underline; }

/* Sticky nav is 72px, so an anchored jump has to clear it. */
#newsletter { scroll-margin-top: calc(var(--nav-height) + 1.5rem); }
/* Momentary highlight so the field you were sent to is obvious on arrival. */
#newsletter.newsletter-flash .input {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--ochre-mist-rgb) / 0.28);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
/* ----- Footer -----
   The same footer as the homepage, newsletter included: these rules are
   index.html's footer CSS verbatim, and the markup matches too (only the
   relative link paths differ). It expects Brevo's sib-styles.css to be
   loaded — the rules here are written to override that stylesheet, so the
   blog pages link it exactly like the homepage does. Restyle one, mirror
   the other. */
.footer {
  background: var(--deep-dusk);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem var(--section-padding-x) 2rem;
  font-size: 0.875rem;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, minmax(0, 8rem));
  gap: 2rem 3rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.75rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
.footer-logo img { height: 1.5rem; width: auto; display: block; }
.footer-copy { font-size: 0.8125rem; color: var(--copy-muted); }
.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
}
.footer-newsletter-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 34rem;
  align-items: flex-start;
}
.footer-newsletter-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--copy-primary);
}
.footer-newsletter .sib-form {
  text-align: left !important;
  background: transparent !important;
  width: 100%;
  max-width: none;
  margin-left: -0.65rem;
  margin-top: -0.55rem;
}
.footer-newsletter #sib-form-container,
.footer-newsletter .sib-form-container {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.footer-newsletter .sib-form-message-panel {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-sans) !important;
  font-size: 0.8125rem !important;
  line-height: 1.5;
  text-align: left !important;
  max-width: none !important;
}
.footer-newsletter #error-message {
  color: #ffd7d7 !important;
  background: rgb(153 27 27 / 0.22) !important;
  border-color: rgb(248 113 113 / 0.4) !important;
}
.footer-newsletter #success-message {
  color: #d1fae5 !important;
  background: rgb(6 95 70 / 0.22) !important;
  border-color: rgb(52 211 153 / 0.35) !important;
}
.footer-newsletter .sib-form-message-panel__text {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.footer-newsletter .sib-form-message-panel__inner-text {
  padding-top: 0.05rem;
}
.footer-newsletter .sib-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  margin-top: 0.1rem;
}
.footer-newsletter #sib-container {
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
}
.footer-newsletter #sib-container > form {
  width: 100%;
}
.footer-newsletter #sib-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}
.footer-newsletter .sib-input,
.footer-newsletter .sib-form-block {
  display: block !important;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.footer-newsletter .sib-input {
  grid-column: 1;
}
.footer-newsletter .sib-form-block:not(.sib-input) {
  grid-column: 2;
  width: auto;
}
.footer-newsletter .form__entry,
.footer-newsletter .entry_block,
.footer-newsletter .form__label-row,
.footer-newsletter .form__label-row--horizontal {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.footer-newsletter .sib-form-block__button {
  min-width: 6.75rem;
  min-height: 2.375rem;
  justify-content: center;
  align-self: flex-start;
  padding: 0.44rem 1.1rem !important;
  border-radius: 999px !important;
  border: 1px solid rgb(var(--indigo-rgb) / 0.55) !important;
  background: linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.96), rgb(var(--indigo-rgb) / 0.82)) !important;
  color: #ffffff !important;
  font-family: var(--font-sans) !important;
  font-size: 0.77rem !important;
  font-weight: 500 !important;
  letter-spacing: 0;
  text-transform: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 8px 24px rgb(var(--indigo-rgb) / 0.18);
}
.footer-newsletter .sib-form-block__button:hover {
  transform: translateY(-1px);
  border-color: rgb(var(--indigo-rgb) / 0.75) !important;
  box-shadow: 0 14px 32px rgb(var(--indigo-rgb) / 0.3);
}
.footer-newsletter .sib-form-block__button:focus-visible {
  outline: 2px solid rgb(var(--soft-iris-rgb) / 0.85);
  outline-offset: 2px;
}
.footer-newsletter .entry__field {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 2.375rem;
  border-radius: 12px;
  overflow: hidden;
  background: rgb(var(--steel-blue-rgb) / 0.24) !important;
}
.footer-newsletter .entry__error {
  display: block;
  margin-top: 0.55rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  font-family: var(--font-sans) !important;
  font-size: 0.8rem !important;
  line-height: 1.4;
  color: #ffd7d7 !important;
  background: rgb(153 27 27 / 0.2) !important;
  border: 1px solid rgb(248 113 113 / 0.35) !important;
}
.footer-newsletter .input--hidden,
.footer-newsletter input[type="hidden"] {
  grid-column: 1 / -1;
}
.footer-newsletter .input {
  width: 100%;
  min-height: 2.375rem;
  padding: 0.44rem 1rem;
  border-radius: 12px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--copy-primary) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.77rem !important;
  font-weight: 400 !important;
  line-height: 1.3;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.footer-newsletter .input::placeholder {
  color: var(--copy-muted) !important;
  opacity: 1;
  font-family: var(--font-sans) !important;
  text-transform: none;
  letter-spacing: 0;
}
.footer-newsletter .input:hover {
  background: transparent !important;
}
.footer-newsletter .input:focus {
  outline: none;
  background: transparent !important;
  box-shadow: 0 0 0 3px rgb(var(--indigo-rgb) / 0.18);
}
.footer-newsletter-intro {
  margin: 0;
  max-width: 24rem;
}
.footer-newsletter-intro p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--copy-muted);
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #FFFFFF;
  margin: 0 0 1rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 0.5rem; }
.footer-col li:last-child { margin-bottom: 0; }
.footer-col a {
  color: var(--copy-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--copy-primary); }
.footer-socials {
  display: grid;
  grid-template-columns: repeat(3, 2.25rem);
  gap: 1rem;
}
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgb(var(--steel-blue-rgb) / 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--copy-primary);
  transition: background 0.15s, border-color 0.15s;
}
.footer-socials a:hover {
  background: rgb(var(--steel-blue-rgb) / 0.5);
  border-color: rgb(var(--steel-blue-rgb) / 0.6);
}

/* One logo asset for both themes: the white PNG, knocked to solid black in
   light mode. Mirrors index.html — the blog was swapping in the indigo asset
   instead, which left its logos purple in light mode. */
body.theme-light .nav-logo img,
body.theme-light .footer-logo img {
  filter: brightness(0);
}

/* Placeholders in the footer columns sit at the muted weight, not the full
   ink of a live link. Missing here, so View SDK and Sandbox rendered brighter
   than the links around them. */
.footer-col .coming-soon {
  color: var(--copy-muted);
  font-size: 0.875rem;
  justify-content: flex-start;
}
body.theme-light .footer-col .coming-soon { color: var(--copy-primary); }
.footer-socials svg { width: 1.1rem; height: 1.1rem; }
.footer-bottom {
  text-align: left;
  font-size: 0.8125rem;
  color: var(--copy-muted);
}
.footer-bottom a { color: var(--copy-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--copy-primary); }

/* Footer light mode overrides */
body.theme-light .footer {
  background: #ffffff;
}
body.theme-light .footer-col h4,
body.theme-light .footer-col a {
  color: var(--copy-primary);
}
body.theme-light .footer-socials a {
  color: var(--copy-muted);
}
body.theme-light .footer-newsletter #error-message {
  color: #7f1d1d !important;
  background: rgb(254 242 242 / 0.96) !important;
  border-color: rgb(248 113 113 / 0.35) !important;
}
body.theme-light .footer-newsletter #success-message {
  color: #065f46 !important;
  background: rgb(236 253 245 / 0.96) !important;
  border-color: rgb(52 211 153 / 0.35) !important;
}
body.theme-light .footer-newsletter .entry__error {
  color: #7f1d1d !important;
  background: rgb(254 242 242 / 0.96) !important;
  border-color: rgb(248 113 113 / 0.35) !important;
}
body.theme-light .footer-newsletter .input {
  background: transparent !important;
  box-shadow: none;
}
body.theme-light .footer-newsletter .input:hover {
  background: transparent !important;
}
body.theme-light .footer-newsletter .input:focus {
  background: transparent !important;
  box-shadow: 0 0 0 3px rgb(var(--indigo-rgb) / 0.12);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-flex; }
  .nav-drawer, .nav-backdrop { display: block; }
  .nav-buttons .btn { display: none; }
}
@media (max-width: 768px) {
  .blog-hero-inner { padding: 2.5rem var(--section-padding-x) 1.5rem; }
  .post-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2.5rem 0 4rem;
  }
  .article-lede { font-size: 1.15rem; }
}

/* Footer breakpoints, also matching index.html — the columns reflow around the
   newsletter rather than centring, which is why these are two breakpoints
   instead of the blog's single 768px one. */
@media (min-width: 481px) and (max-width: 768px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 8rem));
    gap: 2rem 2.5rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
  }
  .footer-newsletter {
    max-width: none;
  }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
  .footer-brand { align-items: flex-start; }
  .footer-newsletter { align-items: flex-start; max-width: none; }
  .footer-newsletter #sib-form {
    grid-template-columns: 1fr;
  }
  .footer-newsletter .sib-input,
  .footer-newsletter .sib-form-block:not(.sib-input) {
    grid-column: 1;
    width: 100%;
  }
  .footer-newsletter .sib-form-block__button { width: 100%; }
  .footer-col h4 { margin-bottom: 0.75rem; }
  .footer-socials { justify-content: flex-start; }
  .footer-bottom { text-align: left; }
}