/* ============================================================
   Larkin Space Ghost Theme
   Matches the aesthetic of larkin.space:
   dark bg · clean mono/sans type · coral accent · generous space
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* --- Variables -------------------------------------------- */
:root {
  --bg:          #0d0d0f;
  --bg-card:     #131316;
  --bg-hover:    #1a1a1f;
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.12);
  --text:        #e8e8ec;
  --text-muted:  #8a8a9a;
  --text-faint:  #4a4a5a;
  --accent:      #ff6b6b;
  --accent-dim:  rgba(255,107,107,0.15);
  --accent-glow: rgba(255,107,107,0.06);
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --font-body:   'DM Sans', sans-serif;
  --radius:      6px;
  --max-w:       720px;
  --max-w-wide:  1100px;
  --transition:  0.2s ease;
}

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Site Layout ------------------------------------------ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main { flex: 1; }

/* --- Header ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo .logo-dot {
  color: var(--accent);
}

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

/* Ghost {{navigation}} outputs a <ul class="nav"> with <li> children */
.site-nav ul,
.site-nav .nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

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

.nav-subscribe {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent) !important;
  border: 1px solid rgba(255,107,107,0.3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition) !important;
}

.nav-subscribe:hover {
  background: var(--accent-dim) !important;
  border-color: rgba(255,107,107,0.5) !important;
  color: var(--accent) !important;
}

/* --- Page Hero -------------------------------------------- */
.page-hero {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem);
  text-align: center;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--border-mid), transparent);
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.1s ease forwards;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s ease forwards;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 0.5s 0.3s ease forwards;
}

/* --- Post Feed -------------------------------------------- */
.post-feed {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
}

/* Featured post — full width strip */
.post-card.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: border-color var(--transition);
}

.post-card.featured:hover {
  border-color: var(--border-mid);
}

.post-card.featured .post-image {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.post-card.featured .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card.featured:hover .post-image img {
  transform: scale(1.03);
}

.post-card.featured .post-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Regular grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
}

.post-card .post-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-hover);
}

.post-card .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-image img {
  transform: scale(1.04);
}

.post-card .post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Post meta */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.post-reading-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.post-reading-time::before { content: '· '; }

/* Post title */
.post-title {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--text);
  transition: color var(--transition);
}

.post-card:hover .post-title { color: #fff; }

.post-card.featured .post-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 300;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  transition: gap var(--transition);
}

.read-more:hover { gap: 0.65rem; }

.read-more::after { content: '→'; }

/* Featured badge */
.featured-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border-mid);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 1rem;
}

/* --- Single Post ------------------------------------------ */
.post-header {
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem) 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

.post-header .post-meta { margin-bottom: 1.2rem; }

.post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-header .post-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
  display: block;
  -webkit-line-clamp: unset;
  margin-bottom: 2rem;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
}

.author-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.author-info { display: flex; flex-direction: column; }

.author-name {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
}

.author-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* Feature image */
.post-feature-image {
  max-width: var(--max-w-wide);
  margin: 2.5rem auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.post-feature-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* --- Post Body Content ------------------------------------ */
.post-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem) 5rem;
}

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

.gh-content h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-top: 2.5em;
  margin-bottom: -0.5em;
  color: #fff;
}

.gh-content h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 2em;
  margin-bottom: -0.5em;
}

.gh-content h4, .gh-content h5, .gh-content h6 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2em;
}

.gh-content p { color: var(--text); }

.gh-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255,107,107,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.gh-content a:hover { text-decoration-color: var(--accent); }

.gh-content strong { font-weight: 500; color: #fff; }

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

.gh-content ul, .gh-content ol {
  padding-left: 1.5rem;
  color: var(--text);
}

.gh-content li + li { margin-top: 0.4em; }

.gh-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.2em 0 0.2em 1.5rem;
  color: var(--text-muted);
  font-style: italic;
}

.gh-content blockquote p { color: var(--text-muted); }

.gh-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3em auto;
  max-width: 80px;
}

/* Code */
.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  color: #e8c4a0;
}

.gh-content pre {
  background: #0a0a0c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  line-height: 1.6;
}

.gh-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.83rem;
  color: #cdd6f4;
}

/* Images in post */
.gh-content figure {
  margin: 2em 0;
}

.gh-content figure img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}

.gh-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: 0.75rem;
}

/* Wide/Full images */
.kg-width-wide {
  margin-left: calc(50% - 50vw + clamp(1.5rem, 5vw, 4rem));
  margin-right: calc(50% - 50vw + clamp(1.5rem, 5vw, 4rem));
  max-width: min(var(--max-w-wide), calc(100vw - clamp(3rem, 10vw, 8rem)));
}

/* Callout card */
.kg-callout-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

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

/* Bookmark card */
.kg-bookmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.kg-bookmark-card:hover { border-color: var(--border-mid); }

.kg-bookmark-container {
  display: flex;
  color: var(--text) !important;
  text-decoration: none !important;
}

.kg-bookmark-content { padding: 1.2rem; flex: 1; min-width: 0; }

.kg-bookmark-title { font-weight: 500; font-size: 0.9rem; margin-bottom: 0.35rem; }

.kg-bookmark-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
}

.kg-bookmark-icon { width: 16px; height: 16px; }

.kg-bookmark-thumbnail {
  width: 140px;
  flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Post Footer / Tags ----------------------------------- */
.post-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem) 4rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.post-tag-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  transition: border-color var(--transition), color var(--transition);
}

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

/* --- Author Box ------------------------------------------ */
.author-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-box-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.author-box-name {
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.author-box-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Related Posts --------------------------------------- */
.related-posts {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 3rem clamp(1.5rem, 5vw, 4rem) 5rem;
  border-top: 1px solid var(--border);
}

.section-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

/* --- Subscribe section ----------------------------------- */
.subscribe-section {
  border-top: 1px solid var(--border);
  padding: 5rem clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}

.subscribe-inner {
  max-width: 480px;
  margin: 0 auto;
}

.subscribe-inner h2 {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.subscribe-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.subscribe-form {
  display: flex;
  gap: 0.5rem;
}

.subscribe-form input[type="email"] {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--border-mid);
}

.subscribe-form input::placeholder { color: var(--text-faint); }

.btn-subscribe {
  background: var(--accent);
  color: #0d0d0f;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
}

.btn-subscribe:hover { opacity: 0.85; }

/* --- Tags Page ------------------------------------------- */
.tag-page-header {
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem) 3rem;
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.tag-page-header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.tag-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* --- Footer --------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
}

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

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-nav ul,
.footer-nav .nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  transition: color var(--transition);
}

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

/* --- Pagination ------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem clamp(1.5rem, 5vw, 4rem) 4rem;
}

.pagination a, .pagination span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
}

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

.pagination .page-number { border-color: transparent; }

/* --- 404 ----------------------------------------------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 500;
  color: var(--border);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
}

.error-page h1 {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.btn-home {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(255,107,107,0.3);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.btn-home:hover { background: var(--accent-dim); }

/* --- No content state ----------------------------------- */
.no-posts {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-muted);
}

.no-posts p { font-family: var(--font-mono); font-size: 0.85rem; }

/* --- Animations ----------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.45s ease forwards;
}

/* --- Responsive ----------------------------------------- */
@media (max-width: 768px) {
  .post-card.featured {
    grid-template-columns: 1fr;
  }

  .post-card.featured .post-image {
    aspect-ratio: 16/9;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .site-nav .nav-item { display: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 480px) {
  .post-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
}

/* --- Ghost Card Width Classes (required) ------------------ */
.kg-width-wide {
    margin-left: calc(50% - min(42vw, 600px));
    margin-right: calc(50% - min(42vw, 600px));
    width: auto;
    max-width: min(var(--max-w-wide), 90vw);
}

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

.kg-width-full img {
    width: 100%;
    display: block;
}

/* --- Ghost Gallery Card ----------------------------------- */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* --- Ghost Video Card ------------------------------------- */
.kg-video-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.kg-video-card video {
    width: 100%;
    display: block;
}

/* --- Ghost Audio Card ------------------------------------- */
.kg-audio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- Ghost NFT / Product Card ----------------------------- */
.kg-nft-card,
.kg-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 1.5rem;
}

/* --- Ghost Toggle Card ------------------------------------ */
.kg-toggle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 500;
}

.kg-toggle-content {
    padding: 0 1.25rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Ghost Button Card ------------------------------------ */
.kg-button-card {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.kg-btn {
    display: inline-block;
    background: var(--accent);
    color: #0d0d0f;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: opacity 0.2s;
}

.kg-btn:hover { opacity: 0.85; }
.kg-btn-accent { background: var(--accent); }

/* --- Ghost Header Card ------------------------------------ */
.kg-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
}

.kg-header-card h2 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

/* --- Ghost Signup Card ------------------------------------ */
.kg-signup-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
}

/* --- Ghost File Card -------------------------------------- */
.kg-file-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-file-card-container {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    gap: 1rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.kg-file-card-container:hover { background: var(--bg-hover); }

.kg-file-card-title {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.kg-file-card-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.kg-file-card-metadata {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 0.35rem;
}

/* --- Ghost Paywall --------------------------------------- */
.gh-post-upgrade-cta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.gh-post-upgrade-cta h2 {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.gh-post-upgrade-cta a {
    display: inline-block;
    background: var(--accent);
    color: #0d0d0f;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    margin-top: 1rem;
}
