/* ==========================================================================
   Mirth & Myth — Ghost theme styles
   --------------------------------------------------------------------------
   Colours and fonts live in :root just below.
   • The accent (wine) follows Settings → Design → Brand → Accent colour.
   • Fonts follow Settings → Design → Brand → Typography when set there;
     otherwise Cormorant Garamond (headings) and Libre Baskerville (text).
   ========================================================================== */

:root {
  --bg: #161616;            /* page background */
  --surface: #1f1c1b;       /* raised panels: contact pop-up, note cards */
  --text: #eee8df;          /* near-white body text */
  --muted: #b9b0a4;         /* secondary text */
  --wine: var(--ghost-accent-color, #7a2233);   /* accent fills: buttons, rules */
  --wine-hover: color-mix(in srgb, var(--wine) 88%, #ffffff);
  --rose: #cf7f8c;          /* wine tint for small text on dark: eyebrows, links */
  --line: rgba(238, 232, 223, 0.14);
  --paper: #ece4d6;         /* light paper for the prompt slip */

  --font-display: var(--gh-font-heading, "Cormorant Garamond"), Garamond, "Times New Roman", serif;
  --font-body: var(--gh-font-body, "Libre Baskerville"), Baskerville, Georgia, serif;

  --wrap: 1180px;
  --measure: 40rem;         /* comfortable reading width */
  --gutter: clamp(16px, 4vw, 40px);
  --space: clamp(44px, 6.5vw, 88px);   /* half the gap between two sections */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root { color-scheme: dark; }
html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.09rem);
  line-height: 1.8;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--rose); }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.9rem, 1.8rem + 4.6vw, 5.4rem); }
h2 { font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem); }
h3 { font-size: clamp(1.65rem, 1.35rem + 1.1vw, 2.25rem); }
h4 { font-size: 1.3rem; }

code { font-size: 0.9em; background: var(--surface); padding: 0.1em 0.4em; border-radius: 3px; }

:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--wine); color: var(--text); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg);
  padding: 8px 14px; border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* Eyebrow: the small line above a title. Italic, sentence case, wine tint. */
.eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--rose);
  margin: 0 0 0.75rem;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.muted { color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn,
body .kg-button-card a.kg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.2;
  height: auto;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 1px solid var(--wine);
  background: var(--wine);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover,
body .kg-button-card a.kg-btn:hover { background: var(--wine-hover); border-color: var(--wine-hover); color: var(--text); opacity: 1; }

.btn--ghost { background: transparent; border-color: rgba(238, 232, 223, 0.4); }
.btn--ghost:hover { background: transparent; border-color: var(--rose); color: var(--rose); }

.btn--small { font-size: 0.85rem; padding: 0.65em 1.25em; }

/* A button for something not yet available (e.g. a PDF still to come) */
.btn[aria-disabled="true"] {
  background: transparent;
  border: 1px dashed rgba(238, 232, 223, 0.3);
  color: var(--muted);
  cursor: default;
}
.btn[aria-disabled="true"]:hover { color: var(--muted); }

.text-link {
  color: var(--rose);
  text-decoration: underline;
  text-decoration-color: rgba(207, 127, 140, 0.45);
}
.text-link:hover { text-decoration-color: currentColor; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 1.8rem; }

/* Ghost "button" cards inside content behave like .actions */
.gh-content .kg-button-card,
.block-content .kg-button-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin: 1.8rem 0 1.1em;
}
.kg-button-card.kg-align-center { justify-content: center; }
.kg-button-card.kg-align-left { justify-content: flex-start; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(22, 22, 22, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 84px;
  padding-block: 10px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.4rem + 0.6vw, 1.85rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--text); }

.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { display: block; }
.brand-logo { height: 60px; width: auto; }
.brand-mark { height: 56px; width: 56px; }
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.8rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  padding-top: 0.08em;
}

/* Every ampersand on the site is set in Libre Baskerville italic, like the one in the logo */
.amp { font-family: "Libre Baskerville", Baskerville, Georgia, serif; font-style: italic; font-weight: 400; }

.nav {
  display: flex; align-items: center; justify-content: flex-end;
  gap: clamp(14px, 2.6vw, 34px);
  list-style: none; margin: 0; padding: 0;
}
.nav a:not(.btn) { text-decoration: none; font-size: 0.92rem; white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--rose); }
.nav a[aria-current="page"],
.nav .nav-current a:not(.btn) { text-decoration: underline; text-decoration-color: var(--wine); text-underline-offset: 0.35em; text-decoration-thickness: 2px; }

/* Hamburger button: hidden on wide screens */
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .header-inner { min-height: 72px; }
  .brand-logo { height: 48px; }
  .brand-mark { height: 46px; width: 46px; }
  .brand { gap: 11px; }

  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: 0 -8px 0 auto;
    background: transparent; border: 1px solid transparent; border-radius: 999px;
    color: var(--text); cursor: pointer; padding: 0;
    transition: border-color 0.2s ease, color 0.2s ease;
  }
  @media (hover: hover) { .nav-toggle:hover { border-color: var(--line); } }
  .nav-toggle svg { display: block; }
  .nav-toggle .nav-toggle-close { display: none; }
  .site-header.is-open .nav-toggle .nav-toggle-open { display: none; }
  .site-header.is-open .nav-toggle .nav-toggle-close { display: block; }

  /* The menu drops down over the page, below the header bar */
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100dvh - 72px); overflow: auto;
    background: rgba(22, 22, 22, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.9);
  }
  .site-header.is-open { border-bottom-color: var(--line); }
  .site-header.is-open .site-nav { display: block; }

  .nav {
    flex-direction: column; align-items: stretch; gap: 0;
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin-inline: auto;
    padding: 4px var(--gutter) 22px;
  }
  .nav li + li { border-top: 1px solid var(--line); }
  .nav a:not(.btn) { display: block; padding: 15px 0; font-size: 1.05rem; white-space: normal; }
  .nav a[aria-current="page"],
  .nav .nav-current a:not(.btn) { text-underline-offset: 0.3em; }
  .nav li.nav-contact { border-top: 0; padding-top: 14px; }
  .nav .btn--small { font-size: 0.95rem; padding: 0.75em 1.5em; }
}

@media (max-width: 480px) {
  .header-inner { min-height: 64px; }
  .brand-logo { height: 44px; }
  .brand-mark { height: 42px; width: 42px; }
  .brand-name { font-size: 1.35rem; }
}

/* ---------- Ornament divider (hand-drawn pieces between sections) ---------- */
.divider {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 32px);
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider img { width: var(--orn-w, clamp(96px, 11vw, 140px)); opacity: 0.72; }

/* ---------- Content blocks (text edited in the Ghost editor) ---------- */
.block-content > :last-child { margin-bottom: 0; }
.block-content a:not(.kg-btn) { color: var(--rose); text-decoration-color: rgba(207, 127, 140, 0.45); }
.block-content a:not(.kg-btn):hover { text-decoration-color: currentColor; }
.block-content .kg-card { margin-bottom: 1.1em; }

/* ---------- Home: hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 96px) var(--space);
}

.hero-logo { margin: 0; }
.hero-logo img { width: 100%; max-width: 640px; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo img { animation: logo-in 1.8s cubic-bezier(.2, .6, .2, 1) both; }
  @keyframes logo-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 1.8vw, 2.85rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.hero-content p { color: var(--muted); max-width: 34em; }
.hero-content > p:first-child { color: var(--text); }

/* A button card followed by a short paragraph (a link) sit on one line, like the original "actions" row */
.hero-content .kg-button-card { display: inline-flex; width: auto; margin: 1.8rem 22px 0 0; vertical-align: middle; }
.hero-content .kg-button-card + p { display: inline-block; margin: 1.8rem 0 0; vertical-align: middle; color: var(--rose); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-logo img { max-width: 520px; }
}

/* ---------- Home: feature block (Imaginal Pattern Studies) ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5.5vw, 88px);
  align-items: center;
  padding-block: var(--space);
}
/* a hairline between stacked feature blocks */
.feature + .feature { border-top: 1px solid var(--line); }
.feature-media { margin: 0; position: relative; }
.feature-media img { width: 100%; }
/* thin frame line set just inside the photograph, like a mount */
.feature-media::after {
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(238, 232, 223, 0.22);
  pointer-events: none;
}
.feature-media .credit { position: absolute; left: 0; right: 0; top: 100%; }
.feature-body h2 { margin-bottom: 0.6em; }
.feature-content > p { max-width: 33em; }
/* anything written after the button is a quiet note */
.feature-content .kg-button-card ~ p { color: var(--muted); font-size: 0.95em; font-style: italic; margin-top: 1.4rem; }
.feature-content .kg-button-card ~ p em { font-style: normal; }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
}

/* ---------- Home: Additional Reading & Material ---------- */
.reading { padding-block: var(--space); }
.reading--paged, .reading--tag { padding-top: clamp(40px, 7vw, 96px); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-head .standfirst { margin: 0.6rem 0 0; }
.section-head img { width: clamp(90px, 12vw, 150px); opacity: 0.6; margin-bottom: 6px; flex-shrink: 0; }

.reading-list { list-style: none; margin: 0; padding: 0; }
.reading-item { border-bottom: 1px solid var(--line); }
.reading-empty { padding-block: clamp(32px, 5vw, 56px); }

.reading-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(32px, 5vw, 56px);
}
.reading-card h3 { margin-bottom: 0.45em; }
.reading-card h3 a { text-decoration: none; }
.reading-card h3 a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--wine); text-decoration-thickness: 2px; }
.reading-excerpt { color: var(--muted); max-width: 32em; }
.reading-thumb { display: block; overflow: hidden; aspect-ratio: 3 / 2; }
.reading-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.reading-card:hover .reading-thumb img { transform: scale(1.025); }

@media (max-width: 760px) {
  .reading-card { grid-template-columns: 1fr; }
  .reading-thumb { order: -1; }
}

/* "Read the archive" button after the list: the list's last rule moves below the button */
.reading-list--more .reading-item:last-child { border-bottom: 0; }
.reading-more { margin: 0; padding-block: clamp(8px, 1.5vw, 16px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }

.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: clamp(24px, 4vw, 40px);
  font-size: 0.92rem;
}
.pagination-count { margin: 0; color: var(--muted); }
.pagination-prev, .pagination-next { min-width: 6em; }
.pagination-next { text-align: right; }

/* ---------- Closing invitation band ---------- */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: var(--space);
}
.closing h2 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); }
.closing p { color: var(--muted); max-width: 36em; }

.plate {
  margin: 0;
  background: #f4efe6;
  padding: 10px 10px 8px;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.9);
  transform: rotate(-1.2deg);
}
.plate img { width: 100%; filter: sepia(0.25) contrast(1.02); }

@media (max-width: 760px) {
  .closing { grid-template-columns: 1fr; }
  .plate { max-width: 260px; }
}

/* ---------- Subscribe band (Ghost members sign-up) ---------- */
.subscribe { margin-top: var(--space); border-top: 1px solid var(--line); }
.subscribe-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 24rem);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-block: var(--space);
}
.subscribe-ornament { width: clamp(44px, 5vw, 64px); opacity: 0.6; }
.subscribe h2 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); margin-bottom: 0.4em; }
.subscribe-text p { color: var(--muted); max-width: 34em; }

.subscribe-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.subscribe-input {
  flex: 1 1 14em;
  font: inherit; font-size: 0.95rem;
  color: var(--text);
  background: #161414;
  border: 1px solid rgba(238, 232, 223, 0.22);
  border-radius: 999px;
  padding: 0.8em 1.2em;
  transition: border-color 0.2s ease;
}
.subscribe-input::placeholder { color: var(--muted); opacity: 0.8; }
.subscribe-input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(207, 127, 140, 0.18); }
.subscribe-form .btn { flex-shrink: 0; }
.subscribe-loading, .subscribe-success, .subscribe-error { display: none; margin: 0; }
.subscribe-success, .subscribe-error { margin-top: 1rem; font-size: 0.95rem; }
.subscribe-error { color: #f0a3ae; }
.subscribe-form.loading .subscribe-label { display: none; }
.subscribe-form.loading .subscribe-loading { display: inline; }
.subscribe-form.success .subscribe-fields { display: none; }
.subscribe-form.success .subscribe-success { display: block; color: var(--text); }
.subscribe-form.error .subscribe-error { display: block; }

@media (max-width: 860px) {
  .subscribe-inner { grid-template-columns: 1fr; }
  .subscribe-ornament { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(48px, 7vw, 80px); margin-top: var(--space); }
.subscribe + .site-footer { margin-top: 0; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}
.footer-brand p { color: var(--muted); max-width: 26em; margin-top: 0.6rem; font-size: 0.98rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { text-decoration: none; }
.footer-contact p { margin: 0 0 6px; color: var(--muted); font-size: 0.98rem; }
.footer-contact a { color: var(--text); }
.footer-base {
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 36px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-base p { margin: 0; }
.footer-disclaimer { margin-top: 1.4em !important; }

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Generic page header (inner pages) ---------- */
.page-head { padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 56px); }
.page-head > * { max-width: 52rem; }
.page-content { padding-bottom: var(--space); }
.standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem);
  line-height: 1.3;
  color: var(--muted);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- Long-form text (articles, bios, page bodies) ---------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 0; }
.prose p { margin-bottom: 1.15em; }
.prose > h2:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(2rem, 1.5rem + 1.7vw, 2.75rem); margin: 2.4em 0 0.6em; scroll-margin-top: 100px; }
.prose h3 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem); margin: 2em 0 0.55em; scroll-margin-top: 100px; }
.prose h4 { font-family: var(--font-body); font-style: italic; font-size: 0.92rem; color: var(--rose); margin: 1.8em 0 0.6em; letter-spacing: 0; }
.prose ol, .prose ul { padding-left: 1.35em; margin: 0 0 1.3em; }
.prose li { margin-bottom: 0.65em; padding-left: 0.3em; }
.prose ol > li::marker { font-family: var(--font-display); color: var(--rose); }
.prose blockquote {
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 1.4em;
  border-left: 2px solid var(--wine);
  font-style: italic;
  color: var(--text);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose a:not(.btn):not(.kg-btn) { color: var(--rose); text-decoration-color: rgba(207, 127, 140, 0.45); }
.prose a:not(.btn):not(.kg-btn):hover { text-decoration-color: currentColor; }
.prose em { font-style: italic; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.prose strong { font-weight: 700; }

/* first paragraph of an article opens with a large initial */
.post-content > p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 4.6em;
  line-height: 0.8;
  padding: 0.06em 0.1em 0 0;
  color: var(--text);
}

/* ---------- Ghost editor cards inside long-form text ---------- */
.gh-content .kg-card { margin: 2em 0; }
.gh-content .kg-card:first-child { margin-top: 0; }
.gh-content .kg-image-card img { width: 100%; }
.gh-content figcaption,
.credit { font-size: 0.85rem; color: var(--muted); margin-top: 0.7rem; font-style: italic; text-align: left; }
.gh-content figcaption a, .credit a { color: var(--muted); }
.credit span { font-style: normal; }

/* wide and full-bleed images */
.kg-width-wide { position: relative; width: min(calc(var(--wrap) + var(--gutter) * 2), calc(100vw - var(--gutter) * 2)); max-width: none; left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; max-width: none; left: 50%; transform: translateX(-50%); }
.kg-width-full img { width: 100%; }
@media (max-width: 1000px) { .kg-width-wide { width: 100%; left: 0; transform: none; } }

.gh-content .kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.gh-content .kg-embed-card iframe { max-width: 100%; }
.gh-content .kg-callout-card { background: var(--surface); border-left: 2px solid var(--wine); border-radius: 0; color: var(--text); }
.gh-content .kg-callout-card .kg-callout-text { color: var(--text); }
.gh-content .kg-callout-card-accent { background: var(--wine); border-color: var(--wine); }
.gh-content .kg-bookmark-card .kg-bookmark-container { color: var(--text); background: var(--surface); border-color: var(--line); }
.gh-content .kg-toggle-card { background: var(--surface); border-color: var(--line); }
.gh-content .kg-toggle-heading-text, .gh-content .kg-toggle-content { color: var(--text); }
.gh-content .kg-header-card { background: var(--surface); }
.gh-content .kg-blockquote-alt { font-family: var(--font-display); font-size: 1.5em; font-style: italic; text-align: center; border: 0; padding: 0; color: var(--text); }
.gh-content .kg-code-card pre, .gh-content pre { background: var(--surface); padding: 1em 1.2em; overflow: auto; border-radius: 4px; font-size: 0.9em; line-height: 1.5; }
.gh-content table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
.gh-content th, .gh-content td { text-align: left; padding: 0.6em 0.8em; border-bottom: 1px solid var(--line); }

/* ---------- About ("Portrait" page layout) ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
  padding-block: clamp(48px, 8vw, 104px) var(--space);
}
.about-portrait { position: sticky; top: 112px; }
/* Portrait: a plain rectangle, by choice. */
.portrait { margin: 0; max-width: 480px; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.about-body h1 { margin-bottom: 0.15em; }
.role { font-style: italic; color: var(--rose); font-size: 1rem; margin-bottom: 2rem; }
.about-body .prose > p:first-child { color: var(--text); font-size: 1.08em; }
.about-body .kg-button-card { display: inline-flex; width: auto; margin: 1.8rem 22px 0 0; vertical-align: middle; }
.about-body .kg-button-card + p { display: inline-block; margin: 1.8rem 0 0; vertical-align: middle; }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about-portrait { position: static; max-width: 420px; }
}

/* ---------- Imaginal Pattern Studies ("Landing" page layout) ---------- */
.ips-hero { position: relative; }
.ips-hero-media { margin: 0; }
.ips-hero-media img { width: 100%; max-height: 88vh; object-fit: cover; object-position: center 40%; }
.ips-hero-text {
  position: absolute;
  left: 50%; top: 63%;
  isolation: isolate;
  transform: translate(-50%, -50%);
  width: min(54%, 680px);
  text-align: center;
}
.ips-hero-text::before {
  content: ""; position: absolute; inset: -18% -12%; z-index: -1;
  background: radial-gradient(closest-side, rgba(18, 18, 18, 0.62), rgba(18, 18, 18, 0));
}
.ips-hero-text h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
.ips-hero-text .standfirst { color: var(--text); margin-inline: auto; text-shadow: 0 1px 16px rgba(0, 0, 0, 0.7); }
.ips-hero-text--plain { position: static; transform: none; width: auto; text-align: left; padding: clamp(48px, 8vw, 104px) var(--gutter) 0; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; }
.ips-hero-text--plain::before { display: none; }
.ips-hero-text--plain .standfirst { color: var(--muted); margin-inline: 0; text-shadow: none; }
@media (max-width: 860px) {
  .ips-hero-text { position: static; transform: none; width: auto; text-align: left; padding: 32px var(--gutter) 0; }
  .ips-hero-text::before { display: none; }
  .ips-hero-text .standfirst { color: var(--muted); margin-inline: 0; }
}

.ips-body { position: relative; padding-block: calc(var(--space) * 2) var(--space); }
.ips-ornament { position: absolute; right: var(--gutter); top: calc(var(--space) * 2 + 0.6rem); width: min(15rem, 22vw); }
.ips-ornament img { width: 100%; max-width: 230px; margin-left: auto; opacity: 0.55; }
@media (max-width: 860px) { .ips-ornament { display: none; } }

/* The landing body is full width; ordinary text stays at reading width,
   the special blocks (steps, workbook, study, invitation) span the whole width. */
.landing-content { max-width: none; }
.landing-content > p, .landing-content > h3, .landing-content > h4,
.landing-content > blockquote, .landing-content > ol:not(.steps), .landing-content > .pdf-slot { max-width: var(--measure); }
.landing-content > h2 { font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem); margin: calc(var(--space) * 1.6) 0 0.5em; }
.landing-content > h2:first-child { margin-top: 0; }
.landing-content > h2 + p { color: var(--text); }
.landing-content > h2:first-child + p { font-size: 1.12em; }
.landing-content > h2:not(:first-child) + p { color: var(--muted); max-width: 36em; margin-top: 1rem; }
.landing-content > .kg-image-card { margin: clamp(28px, 4vw, 48px) 0; }

/* references list: plain rows with a rule between */
.landing-content > ul { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 46rem; }
.landing-content > ul > li { padding: 1.1rem 0; margin: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.98em; }
.landing-content > ul > li strong { color: var(--text); font-weight: 400; font-style: italic; }

.pdf-slot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.98rem;
}
.pdf-slot p { margin: 0; flex: 1 1 18em; }

.steps {
  list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px);
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding: 1.4rem 0 0; margin: 0; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem; line-height: 1;
  color: var(--rose);
  margin-bottom: 0.9rem;
}
.steps h3 { font-size: 1.65rem; margin: 0 0 0.5em; }
.steps p { color: var(--muted); font-size: 0.98em; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* the "found note" prompt */
.try {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: calc(var(--space) * 2) 0;
}
.slip {
  background: var(--paper);
  color: #2a2422;
  padding: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 52px);
  transform: rotate(-2deg);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.95);
  max-width: 440px;
  justify-self: center;
  position: relative;
}
.slip::before { /* a torn top edge */
  content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 8px;
  background: linear-gradient(135deg, transparent 50%, var(--paper) 50%) 0 0 / 12px 8px repeat-x,
              linear-gradient(225deg, transparent 50%, var(--paper) 50%) 0 0 / 12px 8px repeat-x;
}
.slip p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.1rem);
  line-height: 1.2;
  margin: 0;
}
.try-text p { max-width: 32em; }
.try-text .muted { font-size: 0.95em; font-style: italic; }
@media (max-width: 860px) { .try { grid-template-columns: 1fr; } .slip { justify-self: start; } }

.workbooks { padding-bottom: 0; }
.workbook {
  border-top: 1px solid var(--line);
  padding-top: clamp(32px, 5vw, 56px);
  margin-top: clamp(32px, 5vw, 56px);
}
.workbooks .workbook:first-child { margin-top: clamp(16px, 2.5vw, 28px); }
.workbook-media { margin: 0 0 clamp(28px, 4vw, 48px); }
.workbook-media a { display: block; }
.workbook-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.workbook-head h3 { font-size: clamp(2.3rem, 1.7rem + 2.1vw, 3.3rem); margin: 0 0 0.6em; }
.workbook-head h3 a { text-decoration: none; }
.workbook-head h3 a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--wine); text-decoration-thickness: 2px; }

/* the post's content, laid out for the Studies page */
.workbook-content { max-width: none; }
.workbook-content > p, .workbook-content > blockquote, .workbook-content > h3 { max-width: var(--measure); }
.workbook-content > p:first-child { color: var(--text); font-size: 1.05em; }
.workbook-content > h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.3rem); margin: 2.4em 0 0.6em; }
.workbook-content > h4 { margin-top: 2.4em; }
.workbook-content > p + h4, .article--workbook .post-content > p + h4 { margin-top: 2.4em; }

/* "The studies": a numbered list in two columns with a rule under each entry */
.workbook-content > ol, .article--workbook .post-content > ol {
  columns: 2; column-gap: clamp(32px, 5vw, 72px);
  max-width: 50rem; margin: 0 0 1.5em; padding-left: 1.6em;
}
.workbook-content > ol > li, .article--workbook .post-content > ol > li {
  break-inside: avoid; padding: 0.35em 0 0.35em 0.3em; margin: 0; border-bottom: 1px solid var(--line);
}
.workbook-content > ol > li::marker, .article--workbook .post-content > ol > li::marker { font-family: var(--font-display); color: var(--muted); }
@media (max-width: 640px) { .workbook-content > ol, .article--workbook .post-content > ol { columns: 1; } }

/* "Reading behind these ideas": plain rows with a rule between */
.workbook-content > ul, .article--workbook .post-content > ul { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 46rem; }
.workbook-content > ul > li, .article--workbook .post-content > ul > li { padding: 1.1rem 0; margin: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.98em; }
.workbook-content > ul > li strong, .article--workbook .post-content > ul > li strong { color: var(--text); font-weight: 400; font-style: italic; }

.workbook-content .excerpt { max-width: none; }
.workbook-content .kg-button-card, .article--workbook .post-content .kg-button-card { margin: 1.8rem 0 1.5rem; }

.workbook-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.workbook-grid h3 { font-size: clamp(2.3rem, 1.7rem + 2.1vw, 3.3rem); margin-top: 0; }
.workbook-grid .prose p { color: var(--text); }
.workbook-contents h4 { font-family: var(--font-body); font-style: italic; color: var(--rose); font-size: 0.92rem; letter-spacing: 0; margin: 0 0 1rem; }
.workbook-contents ol { margin: 0; padding-left: 1.6em; }
.workbook-contents li { padding: 0.35em 0 0.35em 0.3em; margin: 0; border-bottom: 1px solid var(--line); }
.workbook-contents ol > li::marker { font-family: var(--font-display); color: var(--muted); }
@media (max-width: 860px) { .workbook-grid { grid-template-columns: 1fr; } }

.excerpt {
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--surface);
  border-left: 2px solid var(--wine);
  padding: clamp(28px, 4vw, 52px);
}
.excerpt h4 { font-family: var(--font-display); font-style: normal; color: var(--text); font-size: clamp(1.6rem, 1.35rem + 0.9vw, 2.05rem); margin: 0 0 0.2em; }
.excerpt .eyebrow { margin-bottom: 0.4rem; }
.excerpt .prose { max-width: 42rem; }

.forthcoming {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  border: 1px dashed rgba(238, 232, 223, 0.22);
  padding: clamp(24px, 4vw, 40px);
}
.forthcoming .plate { transform: rotate(1.5deg); }
.forthcoming h3 { font-size: 1.75rem; margin: 0 0 0.3em; }
.forthcoming p { color: var(--muted); margin: 0; max-width: 34em; }
@media (max-width: 640px) { .forthcoming { grid-template-columns: 1fr; } }

.landing-content > .closing { padding-top: calc(var(--space) * 1.6); padding-bottom: 0; }

/* ---------- Reading (article) pages ---------- */
.article-head { padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 56px); }
.article-head > * { max-width: 52rem; }
.article-head h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.4rem); }
.article-date { color: var(--muted); font-size: 0.9rem; font-style: italic; margin-top: -0.4rem; }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--rose); }
.article-hero { margin-block: 0 clamp(48px, 7vw, 88px); }
.article-hero img { width: 100%; max-height: 78vh; object-fit: cover; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, var(--measure));
  gap: clamp(40px, 6vw, 96px);
  justify-content: start;
  padding-bottom: var(--space);
}
.article-layout.no-toc { grid-template-columns: minmax(0, var(--measure)); }

.toc { font-size: 0.85rem; }
.toc summary { cursor: pointer; font-style: italic; color: var(--rose); list-style: none; margin-bottom: 0.8rem; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: " +"; }
.toc[open] summary::after { content: " –"; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.4em 0 0.4em 1em; text-decoration: none; color: var(--muted); line-height: 1.35; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover, .toc a.is-active { color: var(--text); border-left-color: var(--rose); }

@media (min-width: 1000px) {
  .toc-wrap { position: sticky; top: 108px; align-self: start; max-height: calc(100vh - 140px); overflow: auto; }
  .toc summary { pointer-events: none; }
  .toc summary::after { content: ""; }
}
@media (max-width: 999px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { border: 1px solid var(--line); padding: 1rem 1.2rem; }
  .toc summary { margin: 0; }
  .toc[open] summary { margin-bottom: 0.8rem; }
}

.article-foot { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.prose .article-foot a { color: var(--rose); }

/* ---------- Contact pop-up ---------- */
.contact {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9);
}
.contact::backdrop { background: rgba(10, 8, 8, 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  .contact[open] { animation: dialog-in 0.28s ease-out; }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
.contact-inner { position: relative; padding: clamp(28px, 5vw, 44px); }
.contact-ornament { width: 54px; opacity: 0.6; margin-bottom: 0.8rem; }
.contact h2 { font-size: clamp(2.2rem, 1.8rem + 1.4vw, 2.7rem); margin-bottom: 0.3em; }
.contact-intro { color: var(--muted); margin-bottom: 1.6rem; }
.contact-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.contact-close:hover { color: var(--text); border-color: var(--line); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.9rem; margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 0.95rem;
  color: var(--text);
  background: #161414;
  border: 1px solid rgba(238, 232, 223, 0.22);
  border-radius: 4px;
  padding: 0.7em 0.85em;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 8em; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(207, 127, 140, 0.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 1.4rem; }
.form-note { margin: 0; color: var(--muted); font-size: 0.95rem; }
.form-note a { color: var(--text); }
.form-status { margin: 1rem 0 0; font-size: 0.98rem; min-height: 1.4em; }
.form-status.is-error { color: #f0a3ae; }
.contact .btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Simple centred pages (404, errors) ---------- */
.simple-page { text-align: center; padding-block: clamp(64px, 12vw, 160px); }
.simple-page .plate { margin: 0 auto 2.5rem; transform: rotate(-1.5deg); width: min(320px, 80%); }
.simple-page p { color: var(--muted); max-width: 30em; margin-inline: auto; }
.simple-page .actions { justify-content: center; }

/* practice numbers in article headings */
.prose h3 .num { color: var(--rose); margin-right: 0.3em; }
.hero-logo picture { display: block; }
.feature-note .title { font-style: normal; }

