/* ============================================================
   Build with Andrew — Ghost Theme Stylesheet
   ============================================================ */

/* ---- Self-hosted Geist variable fonts ---- */
@font-face {
  font-family: "Geist Sans";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  /* Paper — cool slate off-whites */
  --paper-0: #F2F4F6;
  --paper-1: #E8EBEF;
  --paper-2: #DCE0E6;
  --paper-3: #C5CCD4;

  /* Ink — deep midnight slate */
  --ink-0: #0A1220;
  --ink-1: #1A2333;
  --ink-2: #3E4858;
  --ink-3: #6E7585;
  --ink-4: #9DA3B0;

  /* Cyan — primary accent */
  --accent-50: #E6F7FA;
  --accent-100: #C8EEF5;
  --accent-300: #5EC9D9;
  --accent-500: #00B8D4;
  --accent-700: #008DA8;
  --accent-900: #005A6B;

  /* Deep — secondary swatches */
  --deep-50: #DDE6EC;
  --deep-300: #506478;
  --deep-500: #2A3A50;
  --deep-700: #1A2333;

  /* Semantic */
  --success: #2E9F5C;
  --warning: #C18A1E;
  --danger: #D14545;
  --info: var(--accent-500);

  /* Font families */
  --font-geist-sans: "Geist Sans";
  --font-geist-mono: "Geist Mono";
  --font-display: var(--font-geist-sans), "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --font-body: var(--font-geist-sans), "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --font-mono: var(--font-geist-mono), "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Type scale */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 22px;
  --fs-xl: 28px;
  --fs-2xl: 36px;
  --fs-3xl: 48px;
  --fs-4xl: 64px;
  --fs-5xl: 84px;

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-body: 1.6;
  --lh-loose: 1.75;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.06em;
  --tracking-caps: 0.12em;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 0 rgba(10, 18, 32, 0.06);
  --shadow-2: 0 1px 2px rgba(10, 18, 32, 0.05), 0 1px 0 rgba(10, 18, 32, 0.03);
  --shadow-3: 0 4px 16px rgba(10, 18, 32, 0.07), 0 1px 0 rgba(10, 18, 32, 0.03);
  --shadow-4: 0 16px 40px rgba(10, 18, 32, 0.12), 0 2px 0 rgba(10, 18, 32, 0.03);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(10, 18, 32, 0.04);

  /* Layout */
  --measure-prose: 64ch;
  --measure-narrow: 44ch;
  --gutter: clamp(20px, 4vw, 48px);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-med: 220ms;
  --dur-slow: 360ms;

  /* Semantic color aliases */
  --bg: var(--paper-0);
  --bg-raised: var(--paper-1);
  --bg-sunken: var(--paper-2);
  --fg: var(--ink-0);
  --fg-body: var(--ink-1);
  --fg-muted: var(--ink-2);
  --fg-subtle: var(--ink-3);
  --border: var(--paper-3);
  --border-strong: var(--ink-4);
  --link: var(--accent-500);
  --link-hover: var(--accent-700);
}

/* ============================================================
   BASE RESETS
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; }

/* ============================================================
   BASE BODY
   ============================================================ */

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg-body);
  font-feature-settings: "ss01", "cv11";
}

/* ============================================================
   SEMANTIC TYPE CLASSES
   ============================================================ */

.bwa-body, body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--fg-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

.bwa-h1, h1 {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
  text-wrap: balance;
  margin: 0;
}

.bwa-h2, h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
  margin: 0;
}

.bwa-h3, h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0;
}

.bwa-h4, h4 {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}

.bwa-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--accent-700);
}

.bwa-lede {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.bwa-p, p {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--fg-body);
  text-wrap: pretty;
}

.bwa-small, small {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}

.bwa-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.bwa-quote, blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
  border-left: 2px solid var(--accent-500);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
}

.bwa-code, code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-2);
  color: var(--accent-700);
  padding: 0.12em 0.4em;
  border-radius: var(--radius-xs);
}

.bwa-pre, pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.55;
  background: var(--ink-0);
  color: var(--paper-0);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.bwa-link, a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-100);
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}
.bwa-link:hover, a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--accent-300);
}

.bwa-signature {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  color: var(--accent-700);
  letter-spacing: -0.02em;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   PROSE — Ghost post.html styled to match design
   ============================================================ */

.prose { max-width: var(--measure-prose); }
.prose p { font-family: var(--font-body); font-size: 18px; line-height: 1.65; color: var(--ink-1); margin: 20px 0; text-wrap: pretty; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; color: var(--ink-0); margin: 48px 0 4px; }
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; color: var(--ink-0); margin: 32px 0 4px; }
.prose ul, .prose ol { font-family: var(--font-body); font-size: 18px; line-height: 1.65; color: var(--ink-1); padding-left: 24px; margin: 20px 0; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent-500); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--accent-100); }
.prose a:hover { color: var(--accent-700); text-decoration-color: var(--accent-300); }
.prose blockquote { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.2; letter-spacing: -0.025em; color: var(--ink-0); border-left: 2px solid var(--accent-500); padding-left: 24px; margin: 36px 0; text-wrap: balance; }
.prose pre { font-family: var(--font-mono); font-size: 13px; line-height: 1.55; background: var(--ink-0); color: var(--paper-0); padding: 20px; border-radius: 8px; overflow-x: auto; margin: 24px 0; }
.prose :not(pre) > code { font-family: var(--font-mono); font-size: 0.92em; background: var(--paper-2); color: var(--accent-700); padding: 0.12em 0.4em; border-radius: var(--radius-xs); }
.prose img { border-radius: 8px; border: 1px solid var(--paper-3); }
.prose figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; margin-top: 10px; }

@media (max-width: 640px) {
  .prose p, .prose ul, .prose ol { font-size: 17px; }
  .prose h2 { font-size: 26px; margin-top: 36px; }
  .prose blockquote { font-size: 22px; }
}

/* ============================================================
   KOENIG CARD WIDTH CLASSES — required by GScan
   ============================================================ */

.kg-width-wide {
    width: 85vw;
    max-width: 1200px;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ============================================================
   NAV
   ============================================================ */

.nav {
  border-bottom: 1px solid var(--paper-3);
  background: rgba(242, 244, 246, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.nav-brand:hover { color: var(--fg); text-decoration: none; }

.nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--accent-500);
  vertical-align: baseline;
  position: relative;
  top: -1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: all 120ms;
}

.nav-link:hover { color: var(--ink-0); text-decoration: none; }

.nav-link.is-active {
  color: var(--ink-0);
  background: var(--paper-1);
}

.nav-search {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink-0);
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  transition: background var(--dur-fast) var(--ease-out);
}

.nav-search:hover { background: var(--paper-1); }

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink-0);
}

@media (max-width: 640px) {
  .nav-menu-btn { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-0);
    border-bottom: 1px solid var(--paper-3);
    padding: 8px var(--gutter) 16px;
    box-shadow: var(--shadow-3);
  }
  .nav-links.is-open { display: flex; }
  .nav-link {
    padding: 12px 8px;
    border-radius: 0;
    border-bottom: 1px solid var(--paper-3);
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  margin-top: 96px;
  border-top: 1px solid var(--paper-3);
  background: var(--paper-1);
  padding: 56px var(--gutter) 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-top: 0;
  padding-bottom: 0;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--ink-0);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.footer-tagline {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-2);
  max-width: 40ch;
  line-height: 1.55;
}

.footer-col-head {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col-link {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-1);
  text-decoration: none;
}

.footer-col-link:hover { color: var(--accent-700); text-decoration: none; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--paper-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-left: 0;
  padding-right: 0;
}

.footer-meta-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* dot decorators for nav brand / footer brand / meta line */
.footer-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-500);
  vertical-align: baseline;
  position: relative;
  top: -1px;
}

.footer-dot-sm {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
  vertical-align: middle;
}

@media (max-width: 640px) {
  .footer { margin-top: 64px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================================
   Subscribe partials (card / hero / inline)
   Ported from SubscribeBlock.module.css.
   Ghost members form success state: the form receives a "success" class when
   submission succeeds (e.g. .subscribe-form.success). Confirm the exact class
   name ("success" vs "sent") during a live signup test — Ghost's members.js
   version may differ.
   ========================================================================== */

/* Shared input + button + feedback */
.subscribe-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  background: var(--paper-0);
  border: 1px solid var(--paper-3);
  border-radius: 8px;
  color: var(--ink-0);
  outline: none;
}
.subscribe-input:focus { border-color: var(--accent-500); }

.subscribe-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  background: var(--accent-500);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.subscribe-btn:hover { opacity: 0.9; }

.subscribe-success {
  display: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--success);
  padding: 12px 14px;
  background: #E3F0E8;
  border-radius: 8px;
}

/* Show success message when Ghost adds the success state class to the form */
.subscribe-form.success .subscribe-success { display: block; }

.subscribe-error {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--danger);
}
.subscribe-error:empty { display: none; }

/* Card variant */
.subscribe-card {
  background: var(--paper-1);
  border: 1px solid var(--paper-3);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.subscribe-card .subscribe-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--ink-0);
}
.subscribe-card .subscribe-sub {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.subscribe-card .subscribe-form { display: flex; gap: 8px; }
.subscribe-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-3);
}
.subscribe-note b { color: var(--ink-2); font-weight: 600; }

/* Hero variant — homepage masthead */
.subscribe-hero {
  margin-top: 32px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.subscribe-hero .subscribe-form { display: flex; gap: 8px; }
/* sits on dark masthead → muted-on-dark note text */
.subscribe-hero .subscribe-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-4);
}

/* Inline variant */
.subscribe-inline {
  border-top: 1px solid var(--paper-3);
  border-bottom: 1px solid var(--paper-3);
  padding: 28px 0;
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.subscribe-copy { flex: 1 1 240px; }
.subscribe-inline .subscribe-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--ink-0);
}
.subscribe-inline .subscribe-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}
.subscribe-inline .subscribe-form {
  display: flex;
  gap: 8px;
  flex: 1 1 320px;
  max-width: 420px;
}

@media (max-width: 640px) {
  .subscribe-card .subscribe-form,
  .subscribe-inline .subscribe-form,
  .subscribe-hero .subscribe-form { flex-direction: column; }
  .subscribe-card { padding: 24px; }
}

/* ============================================================
   SYSTEM ANCHOR — feature-image fallback SVG
   ============================================================ */

.system-anchor {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-1);
  color: var(--ink-3);
}

.system-anchor svg {
  width: 60%;
  max-width: 120px;
  height: auto;
}

/* ============================================================
   POST CARD — list layout (.card → .post-card)
   ============================================================ */

.post-card {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--paper-3);
}

.post-card-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

/* Hover via ancestor — apply on the article element */
.post-card:hover .post-card-title { color: var(--accent-700); }

.post-card-media {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--paper-1);
  order: 2;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

.post-card-body {
  order: 1;
}

.post-card-title {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink-0);
  text-wrap: balance;
  transition: color var(--dur-fast) var(--ease-out);
}

.post-card-dek {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 60ch;
}

/* Compact layout (.compact → .post-card.is-compact) */

.post-card.is-compact {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 16px 0;
}

.post-card.is-compact .post-card-media { display: none; }

.post-card.is-compact .post-card-title {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.post-card.is-compact .post-card-dek { display: none; }

.post-card.is-compact:hover .post-card-title { color: var(--accent-700); }

@media (max-width: 640px) {
  .post-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .post-card-media { display: none; }
  .post-card-title { font-size: 22px; }
}

/* ============================================================
   FEATURED CARD (.featured → .featured-card)
   ============================================================ */

.featured-card {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  padding: 24px 0;
}

.featured-card-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

.featured-card:hover .featured-card-title { color: var(--accent-700); }

.featured-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: var(--paper-1);
}

.featured-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.featured-card-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.featured-card-title {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink-0);
  text-wrap: balance;
  transition: color var(--dur-fast) var(--ease-out);
}

.featured-card-dek {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
  letter-spacing: -0.015em;
}

.featured-card .bwa-meta {
  margin-top: 22px;
}

@media (max-width: 960px) {
  .featured-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .featured-card-media { order: -1; }
  .featured-card-title { font-size: 34px; }
}

@media (max-width: 640px) {
  .featured-card-title { font-size: 28px; }
}

/* ============================================================
   HOME PAGE — masthead, section, recent strip, hire CTA
   Ported from home.module.css
   ============================================================ */

/* Full-bleed dark hero band */
.masthead {
  background: var(--ink-0);
  padding: 80px 0 56px;
}

.masthead-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--paper-0);
  margin: 0;
  text-wrap: balance;
}

.masthead-tagline {
  margin-top: 28px;
  max-width: 36ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 3.5vw, 22px);
  line-height: 1.35;
  color: var(--paper-2);
  letter-spacing: -0.015em;
}

/* Section wrapper (featured + recent) */
.section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.section:first-of-type {
  border-top: 1px solid var(--paper-3);
}

/* Recent dispatches header */
.recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.recent-head-title { margin: 0; }

.recent-archive-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-500);
  text-decoration: underline;
  text-decoration-color: var(--accent-100);
  text-underline-offset: 3px;
}

.recent-archive-link:hover {
  color: var(--accent-700);
  text-decoration-color: var(--accent-300);
}

/* Recent posts strip — stacked list (post-cards already handle grid/layout) */
.strip {
  display: flex;
  flex-direction: column;
}

/* Hire CTA section */
.hire {
  margin-top: 64px;
  margin-bottom: 64px;
}

.hire-inner {
  background: var(--ink-0);
  color: var(--paper-0);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}

.hire-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hire-title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--paper-0);
}

.hire-body {
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--paper-2);
  line-height: 1.55;
  max-width: 38ch;
}

/* Primary button — used in hire CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-0);
  background: var(--paper-0);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--paper-2);
  color: var(--ink-0);
  text-decoration: none;
}

.btn-icon {
  margin-left: -2px;
}

@media (max-width: 960px) {
  .hire-inner {
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .masthead { padding-top: 56px; }
  .hire-title { font-size: 22px; }
}

/* ============================================================
   SINGLE POST — article layout
   Ported from post.module.css
   ============================================================ */

.article { max-width: 720px; margin: 0 auto; padding: 64px var(--gutter) 0; }

.article-header { margin-bottom: 28px; }

.article-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--ink-0);
  margin: 0;
  text-wrap: balance;
}

.article-dek {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 3.5vw, 22px);
  line-height: 1.4;
  color: var(--ink-2);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.article-byline {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-3);
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.article-hero {
  margin: 0 calc(var(--gutter) * -1) 36px;
}

.article-hero figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 10px;
}

.article-signoff {
  margin-top: 24px;
  margin-bottom: 64px;
}

.article-related {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--paper-3);
}

.article-related .strip {
  margin-top: 16px;
}

@media (max-width: 640px) {
  .article { padding-top: 40px; }
  .article-hero { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
}

/* ============================================================
   GENERIC PAGE (page.hbs)
   Ported from app/[slug]/page.module.css
   ============================================================ */

.page { max-width: 720px; margin: 0 auto; padding: 64px var(--gutter) 96px; }

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--ink-0);
  margin: 0 0 28px;
  text-wrap: balance;
}

.page-feature {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--paper-3);
  margin-bottom: 28px;
  display: block;
}

@media (max-width: 640px) { .page { padding-top: 40px; } }

/* ============================================================
   ABOUT PAGE (page-about.hbs)
   Ported from app/about/about.module.css
   Rename map: .hero→.about-hero, .services→.about-services,
   .serviceGrid→.about-service-grid, .how→.about-how,
   .cta→.about-cta (and sub-elements)
   ============================================================ */

/* Hero */
.about-hero {
  padding: 64px var(--gutter) 32px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}

.about-hero-title {
  margin: 14px 0 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink-0);
  text-wrap: balance;
}

.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Services */
.about-services {
  border-top: 1px solid var(--paper-3);
  padding: 56px 0;
}

.about-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.035em;
  color: var(--ink-0);
  margin: 0 0 16px;
}

.about-services-intro {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 60ch;
}

.about-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-service-card {
  padding: 28px;
  background: var(--paper-1);
  border: 1px solid var(--paper-3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-service-card .icon { color: var(--accent-500); }

.about-service-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--ink-0);
}

.about-service-body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

.about-service-eg {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* How I work */
.about-how {
  padding: 40px 0;
  max-width: 720px;
  margin: 0 auto;
}

.about-how-list {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-1);
  padding: 0;
  list-style: none;
  margin: 0;
}

.about-how-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--paper-3);
}

.about-how-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-500);
  letter-spacing: 0.04em;
  padding-top: 4px;
}

.about-how-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink-0);
  display: block;
}

.about-how-body {
  color: var(--ink-2);
  font-size: 16px;
}

/* Hire CTA */
.about-cta {
  margin: 24px auto 0;
  padding: 0 0 80px;
}

.about-cta-inner {
  background: var(--ink-0);
  color: var(--paper-0);
  border-radius: 20px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}

.about-cta-title {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--paper-0);
}

.about-cta-body {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.4;
  color: var(--paper-2);
  letter-spacing: -0.015em;
  max-width: 40ch;
}

.about-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-cta-cal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-cta-cal:hover { color: var(--paper-1); text-decoration: underline; }

/* Responsive */
@media (max-width: 960px) {
  .about-hero { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 360px; }
  .about-service-grid { grid-template-columns: 1fr; }
  .about-cta-inner { grid-template-columns: 1fr; padding: 32px; }
}

/* ============================================================
   ARCHIVE PAGE (custom-archive.hbs)
   Ported from app/archive/archive.module.css
   Rename map: .head→.archive-head, .filterBar→.archive-filter,
   .list→.archive-list, .year→.archive-year
   ============================================================ */

/* Archive page wrapper — no extra padding needed; .container handles gutters */
.archive { padding-top: 0; }

/* Header */
.archive-head {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 0 32px;
}

/* Title — inherits .bwa-h1 but override to match design */
.archive-head .bwa-h1 {
  font-weight: 700;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

/* Sticky filter bar */
.archive-filter {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 0;
  position: sticky;
  top: 64px;
  background: rgba(242, 244, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-3);
  z-index: 5;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Filter buttons */
.archive-filter-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.archive-filter-btn:hover {
  color: var(--ink-0);
  border-color: var(--ink-4);
  background: var(--paper-1);
}

.archive-filter-btn.is-active {
  color: var(--ink-0);
  background: var(--ink-0);
  border-color: var(--ink-0);
  color: var(--paper-0);
}

/* Post list */
.archive-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
}

/* Year separator heading */
.archive-year {
  margin: 32px 0 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-0);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.035em;
  color: var(--ink-0);
}

/* Individual post row */
.archive-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--paper-3);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-fast) var(--ease-out);
}

.archive-item:hover { background: var(--paper-1); }
.archive-item:hover .archive-item-title { color: var(--accent-700); }

.archive-item-date {
  flex-shrink: 0;
  color: var(--ink-3);
}

.archive-item-title {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink-0);
  letter-spacing: -0.01em;
  transition: color var(--dur-fast) var(--ease-out);
}

.archive-item-topic {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-700);
  background: var(--accent-50);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .archive-filter { top: 0; }
  .archive-item { grid-template-columns: 1fr; gap: 4px; }
  .archive-item-date { font-size: 11px; }
  .archive-item-topic { display: none; }
}

/* ── Error / 404 page ───────────────────────────────────── */
.error-page {
  max-width: 720px;
  margin-inline: auto;
  padding-block: 96px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.error-page .bwa-lede {
  max-width: 42ch;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0 16px;
}

.pagination .older-posts,
.pagination .newer-posts {
  color: var(--accent-700);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.pagination .older-posts:hover,
.pagination .newer-posts:hover {
  opacity: 0.75;
}

.pagination .page-number {
  color: var(--ink-3);
  font-size: var(--fs-sm);
}

/* ============================================================
   MASTHEAD TITLE — per-word spans (injected by theme.js)
   ============================================================ */

/* Connector words ("with", "and", etc.) — muted, lighter weight.
   Matches .titleWith in home.module.css: color: var(--ink-4), font-weight: 400 */
.title-connector {
  color: var(--ink-4);
  font-weight: 400;
}

/* Accent dot after the last word of the masthead title */
.masthead-title::after {
  content: "";
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  margin-left: 0.1em;
  border-radius: var(--radius-pill);
  background: var(--accent-500);
  vertical-align: 0.1em;
}
