body.post-template {
  background: radial-gradient(circle at 30% 40%, rgba(255,205,120,0.1), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(93,174,255,0.12), transparent 70%);
  background-color: #0b0f14;
  color: #e6edf3;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-y: auto;
}

.post-container {
  display: flex;
  justify-content: center;
  padding: clamp(20px, 5vw, 60px) clamp(8px, 4vw, 16px);
}

.post-article {
  width: 100%;
  max-width: min(1080px, 90vw);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  padding: clamp(20px, 5vw, 48px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  transition: padding 0.3s ease, border-radius 0.3s ease;
}

.post-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-title {
  font-size: 2.2rem;
  margin: 0 0 8px;
  color: #fff;
}

.post-meta {
  color: #9fb1c3;
  font-size: 0.95rem;
}

/* === Post Content === */
.post-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.post-content p {
  margin: 1em 0;
}

.post-content strong {
  color: #fff;
  font-weight: 600;
}

.post-content em {
  font-style: italic;
  color: #d0d8e2;
}

/* Bullet points */
.post-content ul, .post-content ol {
  margin: 1em 0 1em 1.5em;
  padding-left: 1em;
}

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

/* Links */
.post-content a {
  color: #5daeff;
  text-decoration: none;
  border-bottom: 1px solid rgba(93,174,255,0.4);
}
.post-content a:hover {
  color: #ffcd78;
  border-color: rgba(255,205,120,0.5);
}


/* === Bookmark Glass Styling (inline with content width) === */
.kg-bookmark-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px) saturate(180%) brightness(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  color: #fff;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;  /* space above/below */
}

.kg-bookmark-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* Make Ghost default content wrapper not limit width too much */
.post-content .kg-card,
.kg-width-wide,
.kg-width-full {
  max-width: none;
}

/* Remove default opaque backgrounds */
.kg-bookmark-container,
.kg-bookmark-content,
.kg-bookmark-thumbnail,
.kg-bookmark-metadata {
  background: transparent !important;
}

/* === Layout === */
.kg-bookmark-container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  text-decoration: none;
}

/* === Text Area === */
.kg-bookmark-content {
  flex: 2;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kg-bookmark-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.95);
}

.kg-bookmark-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

/* === Image === */
.kg-bookmark-thumbnail {
  flex: 1;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.kg-bookmark-card:hover .kg-bookmark-thumbnail img {
  transform: scale(1.05);
}

.kg-bookmark-publisher {
  color: rgba(0, 0, 0, 0);
}

.kg-bookmark-icon {
  border-radius: 5px;
}

/* === Mobile === */
@media (max-width: 700px) {
  .kg-bookmark-container {
    flex-direction: column;
  }
  .kg-bookmark-thumbnail {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    height: 180px;
    border-radius: 0 0 16px 16px;
  }
}

.post-container,
.kg-card,
.post-full-content,
.article-card {
  background: rgba(30, 35, 45, 0); /* semi-transparent navy glass */
  backdrop-filter: blur(22px) saturate(180%) brightness(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
  transition: background 0.3s ease, transform 0.3s ease;
}

/* === Final Fix: Perfectly Even Koenig Gallery (Ghost-safe) === */

/* Reset Ghost defaults */
.kg-gallery-card,
.kg-gallery-container,
.kg-gallery-row,
.kg-gallery-image {
  all: unset;
  display: revert;
  box-sizing: border-box;
}

/* Outer card */
.kg-gallery-card {
  display: block;
  width: 100%;
  margin: 24px 0;
}

/* Frosted glass container */
.kg-gallery-container {
  width: 100%;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(20px) saturate(170%) brightness(1.06);
  -webkit-backdrop-filter: blur(20px) saturate(170%) brightness(1.06);
  box-shadow: 0 12px 34px rgba(0,0,0,.45);
  box-sizing: border-box;
}

/* Kill Ghost flex behaviour completely */
.kg-gallery-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: stretch;
  align-items: stretch;
}

/* Ensure Ghost’s injected row flex wrappers don’t break spacing */
.kg-gallery-row > div {
  display: contents !important; /* flatten layout, remove ghost rows */
}

/* Normalise each image wrapper */
.kg-gallery-image {
  flex: none !important;           /* cancel Ghost inline flex */
  width: 100% !important;          /* force full grid width */
  overflow: hidden;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08),
              0 6px 18px rgba(0,0,0,.35);
  transition: transform .3s ease, box-shadow .3s ease;
}

.kg-gallery-image:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

/* Image */
.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
  border-radius: 16px;
}

.kg-gallery-image:hover img {
  transform: scale(1.02);
}

/* Caption */
.kg-gallery-card figcaption {
  margin-top: 12px;
  text-align: center;
  color: rgba(230,237,243,.75);
  font-size: .9rem;
}

/* Mobile */
@media (max-width: 780px) {
  .kg-gallery-container {
    padding: 12px;
    border-radius: 16px;
  }

  .kg-gallery-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* === Reset Ghost's wrapper === */
.kg-card.kg-button-card,
.kg-button-card.kg-align-center {
  all: unset !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 2rem 0 !important;
}

/* === Base button === */
.kg-btn.kg-btn-accent {
  position: relative;
  display: inline-block;
  background: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 42px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.6s ease,
    background 0.4s ease;
}

/* === Fading overlay (for gentle brightening) === */
.kg-btn.kg-btn-accent::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* === Hover: fade + smooth grow === */
.kg-btn.kg-btn-accent:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.kg-btn.kg-btn-accent:hover::before {
  opacity: 1;
}

/* === Shimmer highlight === */
.kg-btn.kg-btn-accent::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-130%);
  opacity: 0;
  transition:
    transform 1.2s ease-in-out,
    opacity 0.8s ease;
  pointer-events: none;
}

/* === Hover shimmer === */
.kg-btn.kg-btn-accent:hover::after {
  transform: translateX(130%);
  opacity: 1;
}

/* === Single Image Card – Dark Glass Style === */
.kg-image-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 32px auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(18px) saturate(180%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(1.1);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  max-width: 900px;
  padding: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kg-image-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

/* The image itself */
.kg-image-card img.kg-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.kg-image-card img.kg-image:hover {
  transform: scale(1.01);
}

/* Optional caption below the image */
.kg-image-card figcaption {
  margin-top: 10px;
  text-align: center;
  color: rgba(240, 240, 240, 0.85);
  font-size: 0.95rem;
  font-style: italic;
}

/* Mobile responsiveness */
@media (max-width: 780px) {
  .kg-image-card {
    margin: 24px 12px;
    border-radius: 14px;
    padding: 8px;
  }
  .kg-image-card img.kg-image {
    border-radius: 10px;
  }
}

/* === Toggle Card – Refined Smooth Expand === */
.kg-toggle-card {
  margin: 16px 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: box-shadow 0.4s ease, transform 0.35s ease;
}

.kg-toggle-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  user-select: none;
}

.kg-toggle-card-icon svg {
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.9);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon svg {
  transform: rotate(90deg);
}

/* === Smooth Content Expand === */
.kg-toggle-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  padding: 0 18px;
  transition:
    max-height 0.7s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    padding 0.6s ease;
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-content {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  padding: 12px 18px 18px;
  transition:
    max-height 0.8s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.5s ease 0.1s,
    transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    padding 0.5s ease;
}

/* === Text Fade + Slide In === */
.kg-toggle-content > * {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-content > * {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}
/* === Koenig Callouts – Glass Themed with Distinct Colours === */
.kg-callout-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  margin: 16px 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kg-callout-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.5);
}

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

.kg-callout-text {
  line-height: 1.6;
  color: inherit;
}

/* === COLOUR VARIANTS === */
.kg-callout-card-white {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.kg-callout-card-grey {
  background: rgba(100, 100, 100, 0.25);
  border-color: rgba(120, 120, 120, 0.3);
}

.kg-callout-card-blue {
  background: rgba(0, 120, 255, 0.25);
  border-color: rgba(0, 120, 255, 0.35);
}

.kg-callout-card-green {
  background: rgba(50, 205, 50, 0.25);
  border-color: rgba(50, 205, 50, 0.35);
}

.kg-callout-card-yellow,
.kg-callout-card-accent {
  background: rgb(255 214 93 / 67%);
  border-color: rgba(255, 215, 0, 0.45);
}

.kg-callout-card-red {
  background: rgba(255, 50, 50, 0.25);
  border-color: rgba(255, 50, 50, 0.35);
}

.kg-callout-card-pink {
  background: rgba(255, 105, 180, 0.25);
  border-color: rgba(255, 105, 180, 0.35);
}

.kg-callout-card-purple {
  background: rgba(160, 90, 255, 0.25);
  border-color: rgba(160, 90, 255, 0.35);
}

/* === Subtle Lift on Hover === */
.kg-callout-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

/* === Koenig Video Card – Glass Style ============================ */
.kg-video-card {
  margin: 24px 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kg-video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

/* Video container keeps aspect ratio */
.kg-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  background: rgba(0, 0, 0, 0.3);
}

.kg-video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

/* Optional: make overlay play button centered and subtle */
.kg-video-large-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  padding: 16px;
  transition: all 0.3s ease;
}

.kg-video-large-play-icon:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) scale(1.08);
}

/* Remove ugly default focus outlines */
.kg-video-card button:focus {
  outline: none;
  box-shadow: none;
}

/* Caption */
.kg-video-card figcaption {
  margin-top: 8px;
  color: rgba(230, 237, 243, 0.85);
  font-size: 0.95rem;
  text-align: center;
}

/* === Audio Player Icons & Bars Patch ========================= */

/* Icons (Play, Pause, Mute, etc.) */
.kg-audio-play-icon svg,
.kg-audio-pause-icon svg,
.kg-audio-unmute-icon svg,
.kg-audio-mute-icon svg {
  stroke: #ffffff !important;
  fill: none !important;
  opacity: 0.9;
  transition: all 0.25s ease;
}

.kg-audio-play-icon:hover svg,
.kg-audio-pause-icon:hover svg,
.kg-audio-unmute-icon:hover svg,
.kg-audio-mute-icon:hover svg {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

/* Progress and Volume Bars */
.kg-audio-seek-slider,
.kg-audio-volume-slider {
  width: 100%;
  accent-color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  height: 4px;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.3s ease;
}

.kg-audio-seek-slider:hover,
.kg-audio-volume-slider:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Slider Thumbs */
.kg-audio-seek-slider::-webkit-slider-thumb,
.kg-audio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.kg-audio-seek-slider::-webkit-slider-thumb:hover,
.kg-audio-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #fff;
}

/* === Glassy Embed Card (Spotify, YouTube, etc.) === */
.kg-embed-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(180%) brightness(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(1.2);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 1.5rem auto; /* keeps spacing consistent with other cards */
}

.kg-embed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

/* Ensure iframe inherits radius & fits */
.kg-embed-card iframe {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* Caption styling */
.kg-embed-card figcaption {
  margin-top: 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* === Koenig File Card – Glass Themed (Fixed Background Override) === */
.kg-file-card,
.kg-file-card-container {
  background: rgba(255, 255, 255, 0.03) !important;  /* transparent glass */
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kg-file-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

/* Layout */
.kg-file-card-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 24px !important;
  text-decoration: none !important;
}

/* Left side text */
.kg-file-card-contents {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kg-file-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.kg-file-card-metadata {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Right side icon */
.kg-file-card-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  width: 58px;
  height: 58px;
  transition: all 0.3s ease;
}

.kg-file-card-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
  opacity: 0.9;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.kg-file-card-container:hover .kg-file-card-icon {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.kg-file-card-container:hover .kg-file-card-icon svg {
  transform: scale(1.1);
  opacity: 1;
}

/* Kill Ghost default white overlay */
.kg-file-card *,
.kg-file-card-container * {
  background: transparent !important;
}

/* Responsive */
@media (max-width: 600px) {
  .kg-file-card-container {
    flex-direction: row;
    align-items: center;
    padding: 14px 18px !important;
  }
  .kg-file-card-icon {
    width: 48px;
    height: 48px;
  }
}
