/* refresh.css — scholarly-engineering aesthetic.
   Drops legacy CDN deps and lifts the rjcheale.com palette + button patterns.
   Self-hosted Merriweather for nav + heading + post body; system sans stack for non-serif text.
   See docs/adr/0005-theme-evaluation.md and ~/Sites/rjcheale-author-site/static/css/custom.css. */

/* Self-hosted Merriweather — scholarly serif used across the site (variable weights 400-700). */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/merriweather/merriweather-latin.woff2') format('woff2');
  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: 'Merriweather';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/merriweather/merriweather-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Palette — inherits from rjcheale.com (~/Sites/rjcheale-author-site/static/css/custom.css L27-38)
     with #031002 dark-section + #fffff9 header + #F7F7F1 light-section per user requests. */
  --rc-bg: #fafaf6;
  --rc-bg-muted: #f3f0ea;
  --rc-bg-hero: #F7F7F1;          /* light alternating-section bg */
  --rc-bg-header: #fffff9;        /* nav/header bg — paler than body for visual layer */
  --rc-fg: #1D2A3A;
  --rc-fg-muted: #4a5a70;
  --rc-accent: #1D2A3A;
  --rc-accent-hover: #C7A45B;
  --rc-sage: #abc77e;
  --rc-sage-deep: #6E8C50;
  --rc-gold: #C7A45B;
  --rc-cream: #F5F0E6;
  --rc-nav-active-bg: #042111;
  --rc-nav-active-fg: #F5F0E6;
  --rc-nav-hover-bg: #f3f0ea;
  --rc-section-dark: #042111;     /* user-requested deep blackgreen for dark sections */
  --rc-section-dark-fg: #F5F0E6;
  --rc-on-accent: #F5F0E6;        /* readable text colour on top of --rc-accent (cream on navy = ~12:1) */
  --rc-border: #e3e2da;
  --rc-link: #1D2A3A;
  --rc-link-hover: #C7A45B;
  --rc-code-bg: #f0ede3;
  --rc-card-shadow: 0 1px 3px rgba(3, 16, 2, 0.06), 0 4px 12px rgba(3, 16, 2, 0.06);
  --rc-card-shadow-hover: 0 4px 8px rgba(3, 16, 2, 0.08), 0 12px 28px rgba(3, 16, 2, 0.1);
  --rc-radius: 4px;
  --rc-radius-pill: 25px;
  --rc-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Font stacks — use these tokens for font-family declarations so a future typeface change
     (e.g. swap Merriweather for Source Serif Pro) touches one line, not 27. */
  --rc-font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rc-font-serif: 'Merriweather', Georgia, "Times New Roman", serif;
  --rc-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Typographic scale — 1.25 (Major Third) modular ratio.
     Body anchored at clamp(1rem, fluid-vw, 1.125rem) = 16-18px (mobile → ultrawide).
     Calibrated against rjcheale-author-site's perceived density (~14-16px body)
     while preserving long-form engineering-blog readability.
     Every other size derives from --fs-body via calc(), so changing --fs-body
     rescales the entire hierarchy — no per-element clamp recalculation needed.
     Industry-standard ratio (Material Design, Tailwind default, Utopia).
     Nav buttons + brand intentionally use fixed 1rem so they don't track body. */
  --fs-body:     clamp(1rem, 0.97rem + 0.13vw, 1.125rem);   /* 16 → 18px */
  --fs-xs:       calc(var(--fs-body) * 0.7);                 /* 11.2 → 12.6 — footer fine print, micro-meta */
  --fs-meta:     calc(var(--fs-body) * 0.8);                 /* 12.8 → 14.4 — small/meta line, card dates */
  --fs-lead:     calc(var(--fs-body) * 1.15);                /* 18.4 → 20.7 — taglines, lead paragraphs */
  --fs-h4:       calc(var(--fs-body) * 1.25);                /* 20 → 22.5 — card titles, minor section heads */
  --fs-h3:       calc(var(--fs-body) * 1.5625);              /* 25 → 28.1 — section heads (Recent Posts) */
  --fs-h2:       calc(var(--fs-body) * 1.953);               /* 31.25 → 35.2 — post h2 */
  --fs-h1:       calc(var(--fs-body) * 2.441);               /* 39 → 43.9 — page/post hero titles */
  --fs-display:  calc(var(--fs-body) * 4.768);               /* 76.3 → 85.8 — homepage hero name */

  /* Spacing scale — use these tokens for paddings/margins/gaps so the design system stays consistent.
     Scale: 1.25× modular (each step ~25% larger than the previous). */
  --rc-space-1: 0.25rem;   /*  4px */
  --rc-space-2: 0.5rem;    /*  8px */
  --rc-space-3: 0.75rem;   /* 12px */
  --rc-space-4: 1rem;      /* 16px */
  --rc-space-5: 1.5rem;    /* 24px */
  --rc-space-6: 2rem;      /* 32px */
  --rc-space-7: 3rem;      /* 48px */
  --rc-space-8: 4rem;      /* 64px */
  --rc-space-9: 6rem;      /* 96px */
  --rc-space-10: 8rem;     /* 128px */
}

/* DARK MODE — applies in two cases:
   1. User has data-theme="dark" set explicitly via the toggle (localStorage persistence)
   2. User has no manual override AND OS prefers-color-scheme: dark
   The :not([data-theme="light"]) guard means "if the user manually picked light, never go dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rc-bg: #11161e;
    --rc-bg-muted: #1a212c;
    --rc-bg-hero: #1a212c;       /* Phase 4 — alt-section bg, visibly lighter than --rc-section-dark for rhythm */
    --rc-bg-header: #1a212c;     /* Phase 4 — header bg flips with theme (was stuck cream from light tokens) */
    --rc-fg: #e8e5dc;
    --rc-fg-muted: #a8aab0;
    --rc-accent: #abc77e;
    --rc-accent-hover: #d4b97a;
    --rc-nav-active-bg: #abc77e;
    --rc-nav-active-fg: #0c1018;
    --rc-nav-hover-bg: #2a3445;
    --rc-section-dark: #0c1018;
    --rc-section-dark-fg: #e8e5dc;
    --rc-on-accent: #0c1018;     /* dark text on sage = ~8:1 contrast (was cream on sage = 1.5:1, AA-fail) */
    --rc-border: #2a313c;
    --rc-link: #abc77e;
    --rc-link-hover: #d4b97a;
    --rc-code-bg: #1a212c;
    --rc-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
    --rc-card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.6), 0 12px 28px rgba(0, 0, 0, 0.5);
  }
}
/* Explicit dark mode (user toggled it on regardless of OS) */
:root[data-theme="dark"] {
  --rc-bg: #11161e;
  --rc-bg-muted: #1a212c;
  --rc-bg-hero: #1a212c;         /* Phase 4 — see comment above */
  --rc-bg-header: #1a212c;
  --rc-fg: #e8e5dc;
  --rc-fg-muted: #a8aab0;
  --rc-accent: #abc77e;
  --rc-accent-hover: #d4b97a;
  --rc-nav-active-bg: #abc77e;
  --rc-nav-active-fg: #0c1018;
  --rc-nav-hover-bg: #2a3445;
  --rc-section-dark: #0c1018;
  --rc-section-dark-fg: #e8e5dc;
  --rc-on-accent: #0c1018;
  --rc-border: #2a313c;
  --rc-link: #abc77e;
  --rc-link-hover: #d4b97a;
  --rc-code-bg: #1a212c;
  --rc-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
  --rc-card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.6), 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* System font stack — body / non-serif chrome. Merriweather is scoped to nav buttons,
   hero name, section titles, card titles, post body, and footer text via explicit selectors.

   font-size: 100% restores the user-preferred browser root size (typically 16px)
   over Bootstrap 3's `html { font-size: 10px }` reset, so 1rem = 16px and our
   --fs-* clamp tokens resolve to their intended sizes. Verified: BS3 only uses
   the string "rem" inside class names (glyphicon-remove*), never as a unit. */
html {
  font-size: 100%;
  font-family: var(--rc-font-sans);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;            /* design package; overridden to auto under prefers-reduced-motion below */
}

html, body {
  background-color: var(--rc-bg);
  color: var(--rc-fg);
}
body {
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: inherit;
  letter-spacing: 0.01em;            /* Merriweather: slight positive tracking, not tight */
  color: var(--rc-fg);
  font-weight: 700;
}

/* Recent posts section heading — Merriweather, matches the hero treatment.
   Inherits per-section colours via .page-section--dark / --light scoping below. */
.recent-posts-title, .blog-main-title, .books-main-title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: 0.02em;            /* Merriweather scholarly tracking */
  line-height: 1.15;                  /* Merriweather wears generous leading well */
  margin: 0 0 1rem;
  color: var(--rc-fg);
}

.recent-posts-text, .blog-main-subtitle, .lead {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-lead);
  font-style: italic;
  font-weight: 400;
  color: var(--rc-fg-muted);
  max-width: 70ch;
  line-height: 1.55;
  text-align: center;             /* centre under the title */
  margin: 0 auto 2.5rem;          /* horizontal-centre + breathing room before the post grid */
}

p.author-category, p.recent-posts-subtitle {
  color: var(--rc-fg-muted);
}

code, kbd, pre, samp {
  font-family: var(--rc-font-mono);
  font-size: 0.92em;
}
code {
  background-color: var(--rc-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--rc-border);
}
.highlight pre, pre code, .highlight {
  background-color: var(--rc-code-bg);
  border-radius: var(--rc-radius);
  padding: 1em 1.25em;
  overflow-x: auto;
  font-size: 0.88em;
  line-height: 1.55;
}
.highlight pre code {
  background-color: transparent;
  border: none;
  padding: 0;
}

a {
  color: var(--rc-link);
  transition: color var(--rc-transition);
}
a:hover, a:focus {
  color: var(--rc-link-hover);
}

/* ============================================================================
   STICKY HEADER + CHUNKY-BUTTON NAV (rjcheale.com pattern, in sans-serif)
   ============================================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--rc-bg-header);     /* #fffff9 — user-requested paler-than-body header */
  border-bottom: 1px solid var(--rc-border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;                  /* no brand on the left — nav goes flush right */
  padding: 0;
  gap: 0;
  flex-wrap: wrap;
  min-height: 64px;                            /* Phase 5 — was 80px; reclaim ~21% of iPhone SE viewport */
  max-width: none;
}
.site-brand {
  text-decoration: none;
  color: var(--rc-fg);
  font-family: var(--rc-font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  padding: 0 1.5rem;
}
.site-brand:hover, .site-brand:focus { color: var(--rc-gold); }
.site-brand--invisible { visibility: hidden; }

.site-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;                       /* flush buttons */
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: stretch;
}
.site-nav-item { display: flex; }
.site-nav-item a, .site-nav-item button {
  position: relative;                       /* anchor for the ::after wipe bar */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--rc-fg);
  font-family: var(--rc-font-serif);
  font-size: 1rem;                          /* Phase 5 — was 1.65rem; chrome no longer competes with content */
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  padding: 1.1rem 1.4rem;                   /* Phase 5 — was 1.5rem 1.75rem; nav button height ~44px */
  border: 0;
  border-top: 3px solid transparent;        /* reserves the 3px the wipe bar occupies — no layout shift */
  border-radius: 0;
  background-color: transparent;
  cursor: pointer;
  transition: background-color var(--rc-transition), color var(--rc-transition);
}
.site-nav-item button { -webkit-appearance: none; appearance: none; }

/* Gold top-bar that wipes in from the left on hover/focus/active (2026-07 design). */
.site-nav-item a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--rc-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s ease;
}
.site-nav-item a:hover::after,
.site-nav-item a:focus::after,
.site-nav-item.is-active a::after {
  transform: scaleX(1);
}

.site-nav-item a:hover, .site-nav-item a:focus,
.site-nav-item button:hover, .site-nav-item button:focus {
  background-color: var(--rc-nav-hover-bg);
  color: var(--rc-fg);
}
.site-nav-item.is-active a {
  background-color: transparent;
  color: var(--rc-fg);
}
.site-nav-item.is-active a:hover, .site-nav-item.is-active a:focus {
  background-color: var(--rc-nav-hover-bg);
  color: var(--rc-fg);
}
.site-nav-item--icon a, .site-nav-item--icon button { padding: 1.5rem 1rem; }
.site-nav-item--icon a svg, .site-nav-item--icon button svg { display: block; }
/* The search icon is not a text link — no wipe bar; it tints gold on hover instead (design). */
.site-nav-item--icon a::after { display: none; }
.site-nav-item--icon a:hover, .site-nav-item--icon a:focus { color: var(--rc-gold); }

/* Nav search — icon expands to an inline input (see static/js/nav-search.js). */
[data-nav-search] { display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; }
.nav-search-input {
  width: 0;
  min-width: 0;
  flex-shrink: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--rc-radius);
  background: var(--rc-bg);
  color: var(--rc-fg);
  font-family: var(--rc-font-serif);
  font-size: 0.95rem;
  font-style: italic;
  outline: none;
  transition: width 0.3s ease, opacity 0.25s ease, padding 0.3s ease, border-color 0.25s ease;
}
[data-nav-search][data-open="1"] .nav-search-input {
  width: 190px;
  opacity: 1;
  padding: 0.45rem 0.7rem;
  border-color: var(--rc-border);
}
.nav-search-input::placeholder { color: var(--rc-fg-muted); font-style: italic; opacity: 0.8; }
@media (max-width: 540px) {
  [data-nav-search][data-open="1"] .nav-search-input { width: 130px; }
}

@media (max-width: 540px) {
  .site-header-inner { min-height: auto; }
  .site-brand { padding: 0.65rem 1rem; }
  .site-nav-item a { padding: 0.9rem 1.1rem; font-size: 0.85rem; letter-spacing: 0.08em; }
}

/* ============================================================================
   HOMEPAGE HERO — LARGE, LEFT-ALIGNED, FLAT BG, CINZEL NAME
   ============================================================================ */

/* ============================================================================
   ALTERNATING SECTIONS — scalable rhythm (user request).
   Every direct <section> child of <main> alternates dark/light.
   The hero is the 1st <section> (odd = dark).
   recent_posts.html outputs the 2nd <section> (even = light).
   Future sections auto-alternate as you add them. No template changes required.
   ============================================================================ */

main > section:nth-of-type(odd),
main > .home-hero {
  background-color: var(--rc-section-dark);
  color: var(--rc-section-dark-fg);
}
main > section:nth-of-type(even):not(.home-hero) {
  background-color: var(--rc-bg-hero);
  color: var(--rc-fg);
}

/* When a section is dark, flip ALL heading + paragraph + link colours inside it. */
main > section:nth-of-type(odd) h1,
main > section:nth-of-type(odd) h2,
main > section:nth-of-type(odd) h3,
main > section:nth-of-type(odd) h4,
main > section:nth-of-type(odd) .recent-posts-title,
main > section:nth-of-type(odd) .recent-posts-text,
main > section:nth-of-type(odd) .lead,
main > section:nth-of-type(odd) p {
  color: var(--rc-section-dark-fg);
}
main > section:nth-of-type(odd) .recent-posts-text,
main > section:nth-of-type(odd) .lead {
  color: color-mix(in srgb, var(--rc-section-dark-fg) 75%, transparent);
}
/* Keep the hero kicker gold — the broad `…odd p` flip above would otherwise
   recolour it to cream (it out-specifies the plain .home-hero-kicker rule). */
main > section:nth-of-type(odd) .home-hero-kicker {
  color: var(--rc-gold);
}

.home-hero {
  padding: 4.5rem 2.5rem 4rem;     /* Phase 2 — was 7rem 2.5rem 6rem; less marketing-furniture, more writing */
  text-align: left;
}

/* ============================================================================
   PAGE HERO — used by /posts/, /about/, /artifacts/, /tags/, /categories/ etc.
   Smaller than the homepage hero but uses the same dark-section visual language.
   ============================================================================ */
.page-hero {
  background-color: var(--rc-section-dark);
  color: var(--rc-section-dark-fg);
  padding: 5rem 2.5rem 4rem;
  border-bottom: 1px solid var(--rc-border);
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}
.page-hero-title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: 0.025em;            /* positive tracking suits Merriweather */
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--rc-section-dark-fg);
}
.page-hero-subtitle {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-lead);
  font-style: italic;
  font-weight: 500;
  color: color-mix(in srgb, var(--rc-section-dark-fg) 80%, transparent);
  max-width: 62ch;
  line-height: 1.5;
  margin: 0;
}
/* Links inside the dark page-hero (e.g. the Storyteq link in the About role line)
   default to the navy --rc-link, which is unreadable on the dark-green hero. Force
   them cream, gold on hover — matches the homepage hero-bio link treatment. */
.page-hero a {
  color: var(--rc-section-dark-fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--rc-section-dark-fg) 50%, transparent);
  text-underline-offset: 3px;
  transition: color var(--rc-transition), text-decoration-color var(--rc-transition);
}
.page-hero a:hover, .page-hero a:focus {
  color: var(--rc-gold);
  text-decoration-color: var(--rc-gold);
}
/* Page-hero kicker + gold rule — mirror the homepage hero kicker on section pages
   (Case Studies etc.). Gold, monospace, uppercase; the rule is a short accent bar. */
.page-hero-kicker {
  font-family: var(--rc-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rc-gold);
  margin: 0 0 1.1rem;
}
.page-hero-rule {
  width: 64px;
  height: 3px;
  background: var(--rc-gold);
  margin: 0 0 1.4rem;
}

.page-body {
  background-color: var(--rc-bg-hero);
  padding: var(--rc-space-8) var(--rc-space-5) var(--rc-space-9);
  min-height: 50vh;
}

/* ============================================================================
   BLOG POST LAYOUT — used by layouts/posts/single.html
   Centered hero, 2-column body+sidebar, social share, author bio, related.
   ============================================================================ */

.post-hero {
  background-color: var(--rc-section-dark);
  color: var(--rc-section-dark-fg);
  padding: var(--rc-space-9) var(--rc-space-5) var(--rc-space-8);
  border-bottom: 1px solid var(--rc-border);
  text-align: center;                 /* centered for blog posts (user request) */
}
.post-hero-inner {
  max-width: 70ch;
  margin: 0 auto;
}
.post-hero-title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 var(--rc-space-4);
  color: var(--rc-section-dark-fg);
}
.post-hero-meta {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: var(--fs-meta);
  color: color-mix(in srgb, var(--rc-section-dark-fg) 75%, transparent);
  margin: 0;
}

.post-layout .row { display: flex; flex-wrap: wrap; }
.post-main .post-content-body {
  margin: 0;                          /* sit at left edge of main column, not centred within it */
  max-width: none;
}

.post-sidebar { padding-left: var(--rc-space-5); }

@media (max-width: 991px) {
  .post-sidebar { padding-left: 0; margin-top: var(--rc-space-7); }
}
@media (max-width: 991px) {
  /* Phone + small-tablet (iPad portrait, small laptops): the sidebar duplicates
     primary nav and stutters the reading flow between author-bio and related-posts.
     Hide entirely; sidebar content is reachable from the primary nav + /tags/ + /categories/. */
  .post-sidebar { display: none; }
}

/* ============================================================================
   SOCIAL SHARE — "Carry it further" (renamed from "Cultivate a Conversation")
   ============================================================================ */
.social-share {
  margin: var(--rc-space-8) 0 var(--rc-space-6);
  padding: var(--rc-space-6) 0;
  border-top: 1px solid var(--rc-border);
  border-bottom: 1px solid var(--rc-border);
  text-align: center;
}
.social-share-title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.08em;
  color: var(--rc-fg);
  margin: 0 0 var(--rc-space-4);
  text-transform: none;
}
.social-share-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--rc-space-3);
  padding: 0;
  margin: 0;
  list-style: none;
}
.social-share-links li { margin: 0; }
/* Social share buttons — token-based so the pill theme-switches with the rest of the site.
   Light mode: muted-cream pill with navy text. Dark mode: bg-muted pill with light text.
   Hover (both themes): inverts to accent fill + cream text. */
.social-share-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--rc-space-2);
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--rc-fg);
  background-color: var(--rc-bg-muted);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-pill);
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: background-color var(--rc-transition), color var(--rc-transition), border-color var(--rc-transition);
}
.social-share-links a:hover, .social-share-links a:focus {
  background-color: var(--rc-accent);
  color: var(--rc-on-accent);    /* token theme-switches: cream on navy (light) / dark on sage (dark) */
  border-color: var(--rc-accent);
}
.social-share-links a .icon,
.social-share-links a svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  color: inherit;
}
.social-share-links a svg path { fill: currentColor; }

/* ============================================================================
   AUTHOR BIO — "About Rob Cheale" below each post
   ============================================================================ */
.author-bio {
  display: flex;
  gap: var(--rc-space-5);
  align-items: flex-start;
  margin: var(--rc-space-6) 0;
  padding: var(--rc-space-6);
  background-color: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  border-left: 4px solid var(--rc-gold);
}
.author-bio-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rc-bg-muted);
  flex-shrink: 0;
}
.author-bio-content { flex: 1; }
.author-bio-title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
  color: var(--rc-fg);
  margin: 0 0 var(--rc-space-2);
  text-transform: none;
}
.author-bio-content p {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--rc-fg);
  margin: 0 0 var(--rc-space-2);
}
.author-bio-content p:last-child { margin-bottom: 0; }
.author-bio-content p.author-bio-links {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--rc-fg-muted);
}
.author-bio-content a {
  color: var(--rc-link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--rc-link) 40%, transparent);
}
.author-bio-content a:hover { color: var(--rc-gold); text-decoration-color: var(--rc-gold); }

@media (max-width: 600px) {
  .author-bio { flex-direction: column; align-items: center; text-align: center; }
}

/* ============================================================================
   RELATED POSTS — "More Field Notes" (renamed from "Other Shoots from the Garden")
   ============================================================================ */
.related-posts {
  margin: var(--rc-space-8) 0 var(--rc-space-6);
  padding-top: var(--rc-space-6);
  border-top: 1px solid var(--rc-border);
}
.related-posts-title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
  color: var(--rc-fg);
  text-align: center;
  margin: 0 0 var(--rc-space-6);
  text-transform: none;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rc-space-5);
}
@media (max-width: 900px) {
  .related-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .related-posts-grid { grid-template-columns: minmax(0, 1fr); }
}
.home-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}
.home-hero-inner.has-headshot {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
}
@media (max-width: 900px) {
  .home-hero { padding: 4rem 1.5rem 3.5rem; }
  .home-hero-inner.has-headshot { grid-template-columns: 1fr; }
}

/* Hero kicker — monospace positioning line above the name (2026-07 design refresh).
   Gold, uppercase, wide tracking; the typographic opposite of the serif name below it. */
.home-hero-kicker {
  font-family: var(--rc-font-mono);
  font-size: 0.78rem;                 /* ~12.5px at 16px root */
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rc-gold);
  margin: 0 0 1.4rem;
  line-height: 1.4;
}

.home-hero-name {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 1.5rem;
  color: var(--rc-section-dark-fg);
  text-align: left;
}
.home-hero-tagline {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-lead);
  color: var(--rc-section-dark-fg);
  font-weight: 500;
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-transform: none;
  font-variant-caps: normal;
  font-style: italic;
}
.home-hero-bio p {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--rc-section-dark-fg);
  max-width: 60ch;
  margin: 0 0 1.5rem;
  font-weight: 400;
}
.home-hero-bio p:last-child { margin-bottom: 0; }
.home-hero-bio a {
  color: var(--rc-section-dark-fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--rc-section-dark-fg) 50%, transparent);
  text-underline-offset: 4px;
  transition: color var(--rc-transition), text-decoration-color var(--rc-transition);
}
.home-hero-bio a:hover, .home-hero-bio a:focus {
  color: var(--rc-gold);
  text-decoration-color: var(--rc-gold);
}
.home-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
}
.home-hero-headshot { display: flex; justify-content: center; align-items: center; }
.home-hero-headshot img {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--rc-card-shadow);
  border: 4px solid var(--rc-bg);
}

/* ============================================================================
   PARALLAX IMAGE BANDS — full-bleed photographic strips on the homepage.
   From the 2026-07 Claude Design refresh. The band is sized to the photos' 4:3
   ratio so the FULL WIDTH of the image shows on every device; on large screens the
   height is capped, which crops top/bottom (never the sides) for a cinematic strip.
   static/js/parallax.js drifts the background WITHIN the cover overflow (so it never
   reveals an edge and simply stops when there's no overflow, e.g. on phones where the
   band == the whole photo). --parallax-ratio must match the images' aspect ratio.
   ============================================================================ */
.parallax-band {
  --parallax-ratio: 2000 / 1500;       /* the photos' native 4:3 — keep in sync with the assets */
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--parallax-ratio); /* full image width on every device */
  max-height: clamp(380px, 68vh, 820px); /* cap on large/tall screens → crops top/bottom, keeps full width */
  background-color: var(--rc-section-dark);
}
.parallax-band__img {
  position: absolute;
  inset: 0;
  background-size: cover;              /* width-driven here → the whole width is always visible */
  background-position: center;         /* Y set inline per band + animated by parallax.js */
  will-change: background-position;
}
.parallax-band__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 130px 30px rgba(3, 16, 2, 0.6);
  background: radial-gradient(125% 110% at 50% 50%, rgba(3, 16, 2, 0) 52%, rgba(3, 16, 2, 0.5) 100%);
}

/* ============================================================================
   BUTTONS — chunky pill, inversion on hover (rjcheale .continue-reading-btn pattern)
   Larger CTA size per user request.
   ============================================================================ */

.btn-template-main {
  display: inline-block;
  background-color: var(--rc-accent);
  color: var(--rc-cream);
  border: 1px solid var(--rc-accent);
  border-radius: var(--rc-radius-pill);
  padding: 0.95rem 2.25rem;          /* larger CTA */
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color var(--rc-transition), color var(--rc-transition), border-color var(--rc-transition);
}
.btn-template-main:hover, .btn-template-main:focus {
  background-color: var(--rc-cream);
  color: var(--rc-accent);
  border-color: var(--rc-accent);
}

.btn-template-ghost {
  display: inline-block;
  background-color: transparent;
  color: var(--rc-fg);
  border: 1px solid var(--rc-fg);
  border-radius: var(--rc-radius-pill);
  padding: 0.95rem 2.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color var(--rc-transition), color var(--rc-transition);
}
.btn-template-ghost:hover, .btn-template-ghost:focus {
  background-color: var(--rc-accent);
  color: var(--rc-cream);
  border-color: var(--rc-accent);
}

.continue-reading-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background-color: var(--rc-cream);
  color: var(--rc-accent);
  border: 1px solid var(--rc-cream);
  border-radius: var(--rc-radius-pill);
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color var(--rc-transition), color var(--rc-transition);
}
.continue-reading-btn .icon-link {
  width: 0.95em;
  height: 0.95em;
  display: inline-block;
  vertical-align: -0.1em;
}
.continue-reading-btn:hover, .continue-reading-btn:focus {
  background-color: var(--rc-accent);
  color: var(--rc-cream);
  border-color: var(--rc-cream);
}

/* ============================================================================
   SECTIONS + CARDS
   ============================================================================ */

.home-section, .box, .box-simple {
  background-color: var(--rc-bg-muted);
  color: var(--rc-fg);
}
.home-section-blue, .home-section-dark, .bg-default, .bg-blue {
  background-color: var(--rc-section-dark);
  color: var(--rc-section-dark-fg);
}
.home-section-blue h1, .home-section-blue h2, .home-section-blue h3,
.home-section-blue h4, .home-section-blue h5, .home-section-blue h6,
.home-section-blue p, .home-section-blue .lead {
  color: var(--rc-section-dark-fg);
}

/* CSS Grid container for the homepage Recent Posts — equal card heights, no BS3 cols */
.recent-posts-grid {
  display: grid;
  /* minmax(0, 1fr) prevents track explosion when an img inside a card has a
     natural width > track size; with plain 1fr each track grows to min-content
     (= the image's natural width), bursting the max-width constraint. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rc-space-6);
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}
@media (max-width: 900px) { .recent-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .recent-posts-grid { grid-template-columns: minmax(0, 1fr); } }

/* ----------------------------------------------------------------------------
   UNIFIED CARD SYSTEM (.rc-card)
   Single primitive replacing the .box-image-text.blog (home) + .blog-post-card
   (/posts/, related) duplicates. BEM-style child classes; size variants via
   --md (home + related, 3-up) / --lg (/posts/ list, larger title).
   Always anchor-wrapped (whole-card link). No hover overlay (low-value).
   ---------------------------------------------------------------------------- */

.rc-card {
  background-color: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 12px;              /* matches rjcheale-author-site .blog-post-card border-radius */
  box-shadow: var(--rc-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;                     /* belt-and-suspenders — never burst the grid track */
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--rc-transition), transform var(--rc-transition);
}
.rc-card:hover, .rc-card:focus {
  box-shadow: var(--rc-card-shadow-hover);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

.rc-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--rc-bg-muted);
  flex-shrink: 0;
}
.rc-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.rc-card:hover .rc-card__image img { transform: scale(1.05); }

.rc-card__body {
  padding: 1.75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
}

.rc-card__title {
  font-family: var(--rc-font-serif);
  font-size: 1.4rem;              /* matches rjcheale-author-site .blog-post-card .card-title */
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  text-transform: none;
  color: var(--rc-fg);
  transition: color var(--rc-transition);
}
.rc-card:hover .rc-card__title,
.rc-card:focus .rc-card__title { color: var(--rc-gold); }

.rc-card__meta {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 0.9rem;              /* matches rjcheale-author-site .blog-post-card .card-meta */
  font-weight: 400;
  color: var(--rc-fg-muted);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  margin: 0;
}

.rc-card__text {
  font-family: var(--rc-font-serif);
  font-size: 14px;                /* matches rjcheale-author-site body text inside cards */
  line-height: 1.65;
  color: var(--rc-fg);
  margin: 0.85rem 0 0;
  flex-grow: 1;
}

/* Size modifier — --md is the default; --lg gets a slightly larger title for /posts/ list */
.rc-card--lg .rc-card__title { font-size: 1.55rem; }

/* Theme's recent_posts.html outputs <section class="bar background-white"> — neutralise to inherit
   from the alternating-section rule. */
.bar.background-white {
  background-color: inherit;
  padding: 5rem 2.5rem;
}

/* ============================================================================
   POSTS LIST — centered single-column stack of full-width cards (2026-07 refresh)
   layouts/posts/list.html
   ============================================================================ */
.posts-wrap { max-width: 760px; margin: 0 auto; }
.posts-count {
  font-family: var(--rc-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--rc-fg-muted);
  margin: 0 0 2.5rem;
}
.posts-list { display: flex; flex-direction: column; gap: 1.25rem; }
.post-row {
  display: block;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  box-shadow: var(--rc-card-shadow);
  padding: 1.75rem 2rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--rc-transition), transform var(--rc-transition);
}
.post-row:hover, .post-row:focus {
  box-shadow: var(--rc-card-shadow-hover);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}
.post-row__title {
  font-family: var(--rc-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--rc-fg);
  transition: color var(--rc-transition);
}
.post-row:hover .post-row__title, .post-row:focus .post-row__title { color: var(--rc-gold); }
.post-row__meta {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--rc-fg-muted);
  margin: 0 0 0.75rem;
}
.post-row__summary {
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rc-fg-muted);
  margin: 0;
}

/* "Coming soon" placeholder card — shared by the homepage Recent Posts and the
   Posts list when no posts are published yet. */
.coming-soon-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  box-shadow: var(--rc-card-shadow);
  padding: 3rem 2.5rem;
}
.coming-soon-card__eyebrow {
  font-family: var(--rc-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rc-sage-deep);
  margin: 0 0 1rem;
}
.coming-soon-card__lead {
  font-family: var(--rc-font-serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--rc-fg);
  margin: 0 0 0.9rem;
}
.coming-soon-card__text {
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rc-fg-muted);
  margin: 0 auto;
  max-width: 46ch;
}

/* ============================================================================
   POST BODY (single.html /about/, /posts/<slug>/) — long-form readable prose
   ============================================================================ */
.post-content-body {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--rc-fg);
  max-width: 70ch;
  margin: 0 auto;
}
.post-content-body h1, .post-content-body h2, .post-content-body h3, .post-content-body h4 {
  font-family: var(--rc-font-serif);
  color: var(--rc-fg);
  letter-spacing: 0.01em;            /* positive Merriweather tracking */
  line-height: 1.25;
  margin-top: var(--rc-space-7);
  margin-bottom: var(--rc-space-4);
}
.post-content-body h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: 0.015em;
  font-variant-caps: small-caps;     /* scholarly small-caps for h2s, like rjcheale */
}
.post-content-body h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.post-content-body h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}
/* Clickable heading anchors — render hook: layouts/_default/_markup/render-heading.html.
   scroll-margin-top keeps the target clear of the sticky header on jump. */
.post-content-body :is(h1, h2, h3, h4) { scroll-margin-top: 5rem; }
.post-content-body :is(h2, h3, h4) .heading-anchor {
  opacity: 0;
  margin-left: 0.35em;
  color: var(--rc-gold);
  font-weight: 400;
  font-size: 0.8em;
  text-decoration: none;
  transition: opacity var(--rc-transition);
}
.post-content-body :is(h2, h3, h4):hover .heading-anchor,
.post-content-body .heading-anchor:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .post-content-body :is(h2, h3, h4) .heading-anchor { opacity: 0.4; }
}
.post-content-body p { margin: 0 0 1.5rem; }
.post-content-body a {
  color: var(--rc-link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--rc-link) 40%, transparent);
  text-underline-offset: 3px;
  transition: color var(--rc-transition), text-decoration-color var(--rc-transition);
}
.post-content-body a:hover { color: var(--rc-gold); text-decoration-color: var(--rc-gold); }
.post-content-body ul, .post-content-body ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}
.post-content-body li { margin-bottom: 0.5rem; }
.post-content-body strong { font-weight: 700; color: var(--rc-fg); }
.post-content-body em { font-style: italic; }
.post-content-body code {
  font-family: var(--rc-font-mono);
  background-color: var(--rc-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--rc-border);
  font-size: 0.9em;
}
.post-content-body blockquote {
  border-left: 3px solid var(--rc-gold);
  padding-left: 1.5rem;
  margin-left: 0;
  font-style: italic;
  color: var(--rc-fg-muted);
}

/* ============================================================================
   SIDEBAR WIDGETS (/posts/ listing page — Search, Categories, Tags, RSS)
   ============================================================================ */
.panel.panel-default.sidebar-menu {
  background-color: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-card-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.panel.panel-default.sidebar-menu .panel-heading {
  background-color: var(--rc-bg-muted);
  border-bottom: 1px solid var(--rc-border);
  padding: 1rem 1.25rem;
  border-radius: 0;
}
.panel.panel-default.sidebar-menu .panel-heading .panel-title,
.panel.sidebar-menu .panel-heading h3 {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--rc-fg);
  text-transform: none;
  display: inline-block;
  border-bottom: 4px solid var(--rc-gold);    /* GOLD underline — replaces theme's blue */
  padding-bottom: var(--rc-space-2);
  line-height: 1.1;
}
.panel.panel-default.sidebar-menu .panel-body {
  padding: 1.25rem;
  background-color: var(--rc-bg);
}
.sidebar-menu ul.nav { padding: 0; margin: 0; }
.sidebar-menu ul.nav li { list-style: none; }
.sidebar-menu ul.nav li a {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--rc-fg);
  padding: 0.6rem 0.75rem;
  border-radius: 3px;
  transition: background-color var(--rc-transition), color var(--rc-transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.sidebar-menu ul.nav li a:hover, .sidebar-menu ul.nav li a:focus {
  background-color: var(--rc-bg-muted);
  color: var(--rc-gold);
}
.sidebar-menu ul.nav li a .icon-rss {
  flex-shrink: 0;
  width: 1.4em;
  height: 1.4em;
  color: var(--rc-accent);            /* RSS orange isn't on-brand; navy works against parchment */
}
.sidebar-menu ul.nav li a:hover .icon-rss { color: var(--rc-gold); }

/* Inline search input (replaces the old "Search posts" button) */
.sidebar-search-form {
  display: flex;
  border: 1px solid var(--rc-border);
  border-radius: 3px;
  overflow: hidden;
  background: var(--rc-bg);
}
.sidebar-search-input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--rc-fg);
  font-family: var(--rc-font-serif);
  font-size: var(--fs-body);
  font-style: italic;
  letter-spacing: 0.02em;
}
.sidebar-search-input::placeholder {
  color: var(--rc-fg-muted);
  font-style: italic;
  opacity: 0.8;
}
.sidebar-search-input:focus {
  outline: none;
  background: var(--rc-bg-muted);
}
.sidebar-search-btn {
  border: 0;
  background: var(--rc-accent);
  color: var(--rc-cream);
  padding: 0 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--rc-transition), color var(--rc-transition);
}
.sidebar-search-btn:hover, .sidebar-search-btn:focus {
  background: var(--rc-gold);
  color: var(--rc-accent);
}

/* Tag-cloud pills */
.sidebar-menu .tag-cloud a, .sidebar-menu div.tags a {
  display: inline-block;
  font-family: var(--rc-font-serif);
  font-size: 0.85rem;
  font-style: italic;
  background-color: var(--rc-bg-muted);
  color: var(--rc-fg);
  border: 1px solid var(--rc-border);
  border-radius: 15px;
  padding: 0.3rem 0.8rem;
  margin: 0.2rem 0.15rem;
  text-decoration: none;
  text-transform: none;
}
.sidebar-menu .tag-cloud a:hover, .sidebar-menu div.tags a:hover {
  background-color: var(--rc-accent);
  color: var(--rc-cream);
  border-color: var(--rc-accent);
}

/* /posts/ list page — 3-up grid on desktop (user-specified design intent),
   2-up on tablet, 1-up on mobile. minmax(0, 1fr) prevents track explosion. */
.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) {
  .blog-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .blog-post-grid { grid-template-columns: minmax(0, 1fr); }
}

/* legacy .blog-post-card removed — superseded by unified .rc-card system above */
/* Blog pagination buttons */
.pager .blog-pagination-btn a, .pager a {
  font-family: var(--rc-font-serif);
  font-size: 0.95rem;
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--rc-fg);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-pill);
  padding: 0.5rem 1.2rem;
  text-decoration: none;
}
.pager .blog-pagination-btn a:hover { background: var(--rc-accent); color: var(--rc-cream); border-color: var(--rc-accent); }

/* ============================================================================
   CASE STUDIES — numbered cards + sidebar (2026-07 design refresh)
   layouts/case-studies/list.html
   ============================================================================ */
.cs-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .cs-layout { grid-template-columns: minmax(0, 1fr); }
}
.cs-main { min-width: 0; }
.cs-count {
  font-family: var(--rc-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--rc-fg-muted);
  margin: 0 0 1.75rem;
}
.cs-list { display: flex; flex-direction: column; gap: 1.75rem; }

.cs-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.75rem;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-left: 4px solid color-mix(in srgb, var(--rc-border) 60%, var(--rc-fg));
  border-radius: 10px;
  box-shadow: var(--rc-card-shadow);
  padding: 2rem 2rem 1.85rem;
}
.cs-card__no {
  font-family: var(--rc-font-serif);
  font-size: 52px;
  font-weight: 700;
  color: color-mix(in srgb, var(--rc-fg) 25%, transparent);
  line-height: 0.9;
}
.cs-card__content { min-width: 0; }
.cs-card__context {
  font-family: var(--rc-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rc-sage-deep);
  margin: 0 0 0.6rem;
}
.cs-card__title {
  font-family: var(--rc-font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 0.7rem;
  color: var(--rc-fg);
}
.cs-card__outcome {
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rc-fg-muted);
  margin: 0 0 1.25rem;
  max-width: 62ch;
}
.cs-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--rc-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--rc-gold) 80%, #000);
  background: color-mix(in srgb, var(--rc-gold) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--rc-gold) 40%, transparent);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
}
.cs-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cs-tag {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 0.82rem;
  background: var(--rc-bg-muted);
  color: var(--rc-fg-muted);
  border: 1px solid var(--rc-border);
  border-radius: 15px;
  padding: 0.2rem 0.7rem;
}
@media (max-width: 520px) {
  .cs-card { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; padding: 1.5rem; }
}

/* Case Studies sidebar panels — reuse the sidebar-menu visual language. */
.cs-aside { min-width: 0; }
.cs-panel {
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-card-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.cs-panel__head {
  background: var(--rc-bg-muted);
  border-bottom: 1px solid var(--rc-border);
  padding: 1rem 1.25rem;
}
.cs-panel__title {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--rc-fg);
  display: inline-block;
  border-bottom: 4px solid var(--rc-gold);
  padding-bottom: 0.4rem;
  line-height: 1.1;
}
.cs-panel__body { padding: 1.25rem; }
.cs-panel__body p {
  font-family: var(--rc-font-serif);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--rc-fg-muted);
  margin: 0 0 0.9rem;
}
.cs-panel__body p:last-child { margin-bottom: 0; }
.cs-panel__link {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--rc-link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--rc-gold) 60%, transparent);
  text-underline-offset: 4px;
}
.cs-panel__link:hover, .cs-panel__link:focus { color: var(--rc-gold); }
@media (max-width: 900px) {
  .cs-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  .cs-panel { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .cs-aside { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================================
   ARTIFACTS — repo cards + "Next up" ghost (2026-07 design refresh, DORMANT)
   layouts/artifacts/list.html — reuses .cs-layout / .cs-aside / .cs-panel.
   ============================================================================ */
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 700px) { .artifact-grid { grid-template-columns: minmax(0, 1fr); } }
.artifact-card {
  display: flex;
  flex-direction: column;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-left: 4px solid var(--rc-gold);
  border-radius: 10px;
  box-shadow: var(--rc-card-shadow);
  padding: 2rem 2rem 1.85rem;
}
.artifact-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.artifact-card__status {
  font-family: var(--rc-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rc-sage-deep);
  background: color-mix(in srgb, var(--rc-sage-deep) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--rc-sage-deep) 30%, transparent);
  border-radius: 20px;
  padding: 0.25rem 0.7rem;
}
.artifact-card__format {
  font-family: var(--rc-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rc-fg-muted);
}
.artifact-card__title {
  font-family: var(--rc-font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 0.9rem;
  color: var(--rc-fg);
}
.artifact-card__desc {
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rc-fg-muted);
  margin: 0 0 1.5rem;
  flex-grow: 1;
}
.artifact-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rc-border);
}
.artifact-card__repo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--rc-font-serif);
  font-size: 0.9rem;
  color: var(--rc-fg);
  text-decoration: none;
  border: 1px solid var(--rc-fg);
  border-radius: var(--rc-radius-pill);
  padding: 0.45rem 1.1rem;
  transition: background-color var(--rc-transition), color var(--rc-transition);
}
.artifact-card__repo svg { display: block; width: 1em; height: 1em; fill: currentColor; }
.artifact-card__repo:hover, .artifact-card__repo:focus {
  background-color: var(--rc-accent);
  color: var(--rc-on-accent);
}
.artifact-card__note {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--rc-fg-muted);
}
.artifact-ghost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: 1px dashed color-mix(in srgb, var(--rc-border) 60%, var(--rc-fg));
  border-radius: 10px;
  padding: 2.5rem 2rem;
  min-height: 220px;
}
.artifact-ghost__eyebrow {
  font-family: var(--rc-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rc-fg-muted);
  margin-bottom: 0.9rem;
}
.artifact-ghost__text {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--rc-fg-muted);
  margin: 0;
  max-width: 26ch;
  line-height: 1.5;
}

/* ============================================================================
   TOOLS — filterable grouped cards (2026-07 design refresh)
   layouts/tools/list.html + static/js/list-filter.js
   ============================================================================ */
.tools-wrap { max-width: 1100px; margin: 0 auto; }

/* Shared section-filter box (Tools, Posts) — pairs with static/js/list-filter.js. */
.list-filter {
  display: flex;
  align-items: center;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  overflow: hidden;
  background: var(--rc-bg);
  max-width: 520px;
  margin: 0 0 0.75rem;
}
.list-filter__icon {
  display: flex;
  align-items: center;
  padding: 0 0.5rem 0 0.9rem;
  color: var(--rc-fg-muted);
  flex-shrink: 0;
}
.list-filter input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem 0.7rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--rc-fg);
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  font-style: italic;
  outline: none;
}
.list-count {
  font-family: var(--rc-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--rc-fg-muted);
  margin: 0 0 2.5rem;
}
.tools-group { margin-bottom: 3rem; }
.tools-group__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.tools-group__title {
  font-family: var(--rc-font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
  color: var(--rc-fg);
  margin: 0;
  white-space: nowrap;
}
.tools-group__rule { flex: 1; height: 1px; background: var(--rc-border); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 700px) { .tools-grid { grid-template-columns: minmax(0, 1fr); } }

.tool-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--rc-transition), transform var(--rc-transition), border-color var(--rc-transition);
}
.tool-card:hover, .tool-card:focus {
  box-shadow: var(--rc-card-shadow-hover);
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--rc-border) 50%, var(--rc-fg));
  color: inherit;
  text-decoration: none;
}
.tool-card__icon {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rc-border);
  border-radius: 8px;
  background: var(--rc-bg-header);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tool-card__letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--rc-font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: color-mix(in srgb, var(--rc-fg-muted) 60%, transparent);
}
.tool-card__icon img { position: relative; display: block; }
.tool-card__body { min-width: 0; flex: 1; }
.tool-card__head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}
.tool-card__name {
  font-family: var(--rc-font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
  color: var(--rc-fg);
}
.tool-card__tag {
  font-family: var(--rc-font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rc-sage-deep);
}
.tool-card__note {
  display: block;
  font-family: var(--rc-font-serif);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--rc-fg-muted);
}
.list-empty {
  font-family: var(--rc-font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--rc-fg-muted);
  text-align: center;
  padding: 3rem 0;
}

/* ============================================================================
   FOOTER — disclaimer + meta
   ============================================================================ */

#copyright {
  background-color: var(--rc-section-dark);
  color: var(--rc-section-dark-fg);
  padding: 2.5rem 1.25rem;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;           /* centre all children including disclaimer */
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}
.footer-disclaimer {
  font-size: var(--fs-xs);    /* 0.7× body — footer fine-print scale */
  line-height: 1.6;
  color: var(--rc-cream);
  opacity: 0.9;
  margin: 0;
  text-align: center;
  max-width: 70ch;
  margin: 0 auto;
}
.footer-disclaimer strong { color: var(--rc-cream); font-weight: 700; }
.footer-disclaimer a { color: var(--rc-gold); }
.footer-disclaimer a:hover, .footer-disclaimer a:focus { color: var(--rc-cream); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: var(--fs-xs);
  color: var(--rc-cream);
  opacity: 0.75;
  border-top: 1px solid color-mix(in srgb, var(--rc-cream) 20%, transparent);
  padding-top: 1.5rem;
  width: 100%;                    /* meta line stretches full width even though parent is align-items: center */
  align-self: stretch;
}
.footer-meta-line { margin: 0; }
.footer-meta a {
  color: var(--rc-cream);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--rc-cream) 40%, transparent);
}
.footer-meta a:hover, .footer-meta a:focus { color: var(--rc-gold); }

/* ============================================================================
   UTILITY HOOKS — small classes extracted from inline-style cleanups.
   ============================================================================ */
.blog-list-wrap { padding-top: var(--rc-space-6); }
.search-results { margin-top: var(--rc-space-6); }
.search-noscript {
  margin-top: var(--rc-space-6);
  padding: var(--rc-space-4);
  background: var(--rc-bg-muted);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
}

/* ============================================================================
   ABOUT PAGE — social pills (2026-07 design refresh)
   layouts/about/single.html
   ============================================================================ */
.about-body { max-width: 68ch; }
.about-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
}
.about-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  color: var(--rc-fg);
  text-decoration: none;
  border: 1px solid var(--rc-fg);
  border-radius: var(--rc-radius-pill);
  padding: 0.55rem 1.3rem;
  transition: background-color var(--rc-transition), color var(--rc-transition), border-color var(--rc-transition);
}
.about-social a:hover, .about-social a:focus {
  background-color: var(--rc-accent);
  color: var(--rc-on-accent);
  border-color: var(--rc-accent);
}
.about-social a svg { display: block; width: 1em; height: 1em; fill: currentColor; }

/* ============================================================================
   404 — full-bleed dark page (2026-07 design refresh)
   layouts/404.html. Always dark, independent of theme.
   ============================================================================ */
.notfound {
  background: var(--rc-section-dark);
  color: var(--rc-section-dark-fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.notfound-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding-left: 2.5rem;
  background: rgba(255, 255, 249, 0.02);
  border-bottom: 1px solid color-mix(in srgb, var(--rc-cream) 10%, transparent);
}
.notfound-brand {
  text-decoration: none;
  color: var(--rc-cream);
  font-family: var(--rc-font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.notfound-brand:hover, .notfound-brand:focus { color: var(--rc-gold); }
.notfound-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: stretch;
}
.notfound-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--rc-cream);
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 1.1rem 1.4rem;
  transition: background-color var(--rc-transition);
}
.notfound-nav a:hover, .notfound-nav a:focus { background-color: color-mix(in srgb, var(--rc-cream) 6%, transparent); }
.notfound-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2.5rem 5rem;
}
.notfound-inner { max-width: 640px; text-align: center; }
.notfound-path {
  font-family: var(--rc-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--rc-cream) 55%, transparent);
  margin: 0 0 1.5rem;
}
.notfound-status { color: var(--rc-gold); }
.notfound-code {
  font-family: var(--rc-font-serif);
  font-size: clamp(96px, 18vw, 168px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0;
  color: var(--rc-gold);
}
.notfound-lead {
  font-family: var(--rc-font-serif);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  margin: 1.25rem 0 0.75rem;
  color: var(--rc-cream);
}
.notfound-text {
  font-family: var(--rc-font-serif);
  font-size: 1.06rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--rc-cream) 72%, transparent);
  margin: 0 auto 2.5rem;
  max-width: 46ch;
}
.notfound-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.notfound-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--rc-font-serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--rc-section-dark);
  background: var(--rc-gold);
  border: 1px solid var(--rc-gold);
  border-radius: var(--rc-radius-pill);
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  transition: background-color var(--rc-transition), color var(--rc-transition), border-color var(--rc-transition);
}
.notfound-btn:hover, .notfound-btn:focus {
  background: var(--rc-cream);
  border-color: var(--rc-cream);
  color: var(--rc-section-dark);
}
.notfound-btn--ghost {
  color: var(--rc-cream);
  background: transparent;
  border-color: color-mix(in srgb, var(--rc-cream) 50%, transparent);
}
.notfound-btn--ghost:hover, .notfound-btn--ghost:focus {
  background: color-mix(in srgb, var(--rc-cream) 8%, transparent);
  border-color: var(--rc-cream);
  color: var(--rc-cream);
}
.notfound-footer {
  padding: 1.75rem 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--rc-cream) 10%, transparent);
}
.notfound-footer p {
  font-family: var(--rc-font-serif);
  font-size: var(--fs-xs);
  color: color-mix(in srgb, var(--rc-cream) 60%, transparent);
  text-align: center;
  margin: 0;
}
@media (max-width: 540px) {
  .notfound-header { flex-direction: column; padding: 0.5rem 1rem; min-height: 0; }
  .notfound-nav a { padding: 0.7rem 0.9rem; font-size: 0.85rem; }
}

/* ============================================================================
   ACCESSIBILITY PRIMITIVES
   ============================================================================ */

*:focus-visible {
  outline: 2px solid var(--rc-accent);
  outline-offset: 2px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .rc-card:hover {
    transform: none;
  }
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--rc-accent);
  color: var(--rc-cream);
  padding: 0.6em 1em;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { left: 1em; top: 1em; }
