/* ═══════════════════════════════════════════════════════
   TONETHREAD — Ghost Theme Stylesheet
   Dark editorial. Cormorant Garamond body.
   Bebas Neue masthead. DM Mono metadata.
   Spectral Binary gold accent system.
   ═══════════════════════════════════════════════════════ */

/* ── VARIABLES ───────────────────────────────────────── */
:root {
  --bg:           #1a1814;
  --surface:      #211f1b;
  --surface-2:    #272420;
  --border:       #332f28;
  --border-2:     #3e3a32;
  --text:         #c8c4bc;
  --text-muted:   #7a756e;
  --text-faint:   #4a4740;
  --white:        #f0ede8;
  --accent:       #c8a96e;
  --accent-dark:  #8a7040;
  --accent-warm:  #d4714a;
  --accent-cool:  #7eb8c4;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Cormorant Garamond', Georgia, serif;
  --font-mono:    'DM Mono', monospace;

  --max-w:        1200px;
  --content-w:    680px;
  --gap:          2rem;

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    16px;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET & BASE ────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 20px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── GRAIN OVERLAY ───────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── HEADER ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 24, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.site-logo:hover { opacity: 0.75; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav .nav {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.8rem;
}

.site-nav .nav a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav .nav a:hover { color: var(--text); }

.nav-subscribe,
.nav-account {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-subscribe:hover {
  background: var(--accent);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-muted);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ── HOME HERO ───────────────────────────────────────── */
.home-hero {
  padding: 7rem 2.5rem 5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.home-hero-inner { max-width: 700px; }

.home-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.kicker-line {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.kicker-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-title {
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.home-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.home-meta-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-meta-sep {
  color: var(--border-2);
  font-size: 0.7rem;
}

/* ── POST FEED ───────────────────────────────────────── */
.post-feed-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2.5rem 6rem;
}

/* Featured card */
.post-card--featured {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}

.post-card--featured .post-card-inner { flex: 1; }

.post-card--featured .post-card-title {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.12;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}

.post-card--featured .post-card-title a { transition: color 0.2s ease; }
.post-card--featured .post-card-title a:hover { color: var(--accent); }

.post-card--featured .post-card-excerpt {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.8rem;
  max-width: 520px;
}

.post-card--featured .post-card-image {
  width: 220px;
  flex-shrink: 0;
}

.post-card--featured .post-card-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.post-card--featured:hover .post-card-image img { filter: grayscale(0%); }

/* Grid cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
}

.post-card--grid {
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--border);
  padding-right: 2rem;
}

.post-card--grid:last-child { border-bottom: none; }

.post-card-title--small {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.post-card-title--small a { transition: color 0.2s ease; }
.post-card-title--small a:hover { color: var(--accent); }

.post-card-excerpt--small {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

/* Shared card elements */
.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.post-date,
.post-read {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.post-card-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease, gap 0.2s ease;
}

.post-card-link:hover { color: var(--accent); gap: 0.7rem; }

.link-arrow { transition: transform 0.2s ease; }
.post-card-link:hover .link-arrow { transform: translateX(3px); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding-top: 4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pagination a {
  border: 1px solid var(--border-2);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, color 0.2s;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }

/* ── SINGLE POST ─────────────────────────────────────── */
.post-header {
  padding: 6rem 2.5rem 4rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--surface) 0%, var(--bg) 100%);
}

.post-header-inner {
  max-width: var(--content-w);
  margin: 0 auto;
}

.post-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.kicker-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker-line {
  display: block;
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.post-title {
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.post-subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.post-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.post-byline-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.post-author { color: var(--text); }
.post-byline-sep { opacity: 0.4; }

.member-badge {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* Feature image */
.post-feature-image {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 0;
}

.post-feature-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.post-image-caption {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.8rem;
}

/* Post body layout */
.post-body-wrapper {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 4rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 2.5rem 5rem;
  align-items: start;
}

.post-body-wrapper--page {
  grid-template-columns: 1fr;
  max-width: var(--content-w);
}

/* ── GHOST CONTENT STYLES ────────────────────────────── */
.gh-content {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text);
  font-weight: 300;
}

.gh-content > * + * { margin-top: 1.5em; }

.gh-content h2 {
  font-family: var(--font-body);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.gh-content h3 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}

.gh-content h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.gh-content p { margin-bottom: 1.4em; }

/* Drop cap on first paragraph */
.gh-content > p:first-of-type::first-letter {
  font-family: var(--font-body);
  font-size: 5.2rem;
  font-weight: 600;
  line-height: 0.78;
  float: left;
  margin-right: 0.1em;
  margin-top: 0.1em;
  color: var(--accent);
}

.gh-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dark);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.gh-content a:hover { color: var(--white); }

.gh-content strong {
  font-weight: 600;
  color: var(--white);
}

.gh-content em { font-style: italic; }

.gh-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  background: var(--surface);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--white);
  line-height: 1.6;
}

.gh-content blockquote p::before { content: none; }

.gh-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.gh-content ul, .gh-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4em;
}

.gh-content li { margin-bottom: 0.5em; }

.gh-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--accent-cool);
}

.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent-cool);
}

.gh-content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Ghost card types */
.kg-image-card { margin: 2.5rem 0; }
.kg-image-card img { border-radius: var(--radius-md); }

.kg-gallery-card { margin: 2.5rem 0; }
.kg-gallery-container { display: flex; flex-wrap: wrap; gap: 8px; }
.kg-gallery-image { flex: 1 1 calc(33% - 8px); }
.kg-gallery-image img { border-radius: var(--radius-sm); }

.kg-callout-card {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2.5rem 0;
}

.kg-callout-emoji { font-size: 1.4rem; flex-shrink: 0; }

.kg-toggle-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 2rem 0;
}

.kg-toggle-heading {
  padding: 1rem 1.5rem;
  background: var(--surface);
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
}

.kg-toggle-content { padding: 1.5rem; }

/* ── SIDEBAR ─────────────────────────────────────────── */
.post-sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 88px;
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.sidebar-toc {
  list-style: none;
  margin-bottom: 2.5rem;
}

.sidebar-toc a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-left: 1px solid var(--border);
  padding-left: 0.8rem;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.4;
}

.sidebar-toc a:hover,
.sidebar-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.sidebar-share {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.share-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.share-link:hover { color: var(--accent); }

/* ── POST FOOTER ─────────────────────────────────────── */
.post-footer { border-top: 1px solid var(--border); }

.post-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem 5rem;
}

.post-footer-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  margin-right: 0.5rem;
  margin-bottom: 3rem;
  transition: color 0.2s, border-color 0.2s;
}

.post-footer-tag:hover { color: var(--accent); border-color: var(--accent-dark); }

/* Subscribe CTA */
.post-subscribe-cta {
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  background: var(--surface);
  margin: 3rem 0;
}

.cta-inner {
  padding: 2.5rem 3rem;
}

.cta-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.cta-title {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 1.8rem;
  max-width: 460px;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.15s ease;
}

.cta-button:hover {
  background: var(--white);
  transform: translateY(-1px);
}

/* Continue reading */
.post-next { margin-top: 3rem; }

.post-next-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.2rem;
}

.post-next-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.post-next-card {
  background: var(--surface);
  padding: 1.5rem;
  transition: background 0.2s;
}

.post-next-card:hover { background: var(--surface-2); }

.post-next-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.post-next-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
}

/* ── ARCHIVE / TAG ───────────────────────────────────── */
.archive-header {
  padding: 6rem 2.5rem 4rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.archive-header-inner { max-width: var(--content-w); margin: 0 auto; }

.archive-kicker {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.archive-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.archive-description {
  font-style: italic;
  color: var(--text-muted);
  max-width: 480px;
}

/* ── ERROR PAGE ──────────────────────────────────────── */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2.5rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: 8rem;
  letter-spacing: 0.1em;
  color: var(--border-2);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.error-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 1rem;
}

.error-description {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.error-home {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.2s;
}

.error-home:hover { opacity: 0.7; }

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
}

.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}

.footer-logo:hover { color: var(--accent); }

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 0.6rem;
}

.footer-nav .nav {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.footer-nav .nav a {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-nav .nav a:hover { color: var(--accent); }

/* ── SCROLL REVEAL ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .post-body-wrapper {
    grid-template-columns: 1fr;
    max-width: var(--content-w);
  }

  .post-sidebar { display: none; }
}

@media (max-width: 768px) {
  html { font-size: 18px; }

  .site-header-inner { padding: 0 1.5rem; }

  .site-nav .nav { display: none; }
  .site-nav .nav.is-open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1.5rem; z-index: 200; gap: 1.2rem; }
  .nav-toggle { display: flex; }

  .home-hero,
  .post-feed-wrapper,
  .post-header,
  .post-body-wrapper,
  .post-footer-inner,
  .archive-header,
  .site-footer-inner { padding-left: 1.4rem; padding-right: 1.4rem; }

  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card-image { display: none; }

  .post-grid { grid-template-columns: 1fr; }

  .post-next-grid { grid-template-columns: 1fr; }

  .cta-inner { padding: 2rem 1.5rem; }
}

/* ── GHOST PORTAL BUTTON OVERRIDE ────────────────────── */
.gh-portal-triggerbtn { display: none !important; }

/* ── REQUIRED KG CARD WIDTH CLASSES ─────────────────── */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 2.5rem auto;
  transform: translateX(calc(50% - 50vw * 0.85));
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: 100vw;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.kg-width-full img,
.kg-width-wide img {
  width: 100%;
  height: auto;
}

/* ── MEMBERS / PAYWALL ───────────────────────────────── */
.gh-post-upgrade-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 3rem;
  text-align: center;
  margin: 3rem 0;
}

.gh-post-upgrade-cta h2 {
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 1rem;
}

.gh-post-upgrade-cta a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  margin-top: 1.5rem;
  text-decoration: none;
  transition: background 0.2s;
}

.gh-post-upgrade-cta a:hover { background: var(--white); }

/* ── COMMENTS ────────────────────────────────────────── */
.gh-comments {
  margin: 4rem 0 0;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

