@keyframes scroll {
	0% {
		transform: translateY(0);
	}
	30% {
		transform: translateY(100px);
	}
}

  .hero-intro {
    position: relative;
    min-height: 100dvh;
    padding: 6rem 0;
    margin-top: -92px;
    align-items: center;
    display: flex;
  }

  @media screen and (min-width: 1200px) {
    .hero-intro {
      margin-top: -108px;
    }
  }

  .home-template {
    .site-header {
      position: relative;
      z-index: 999;
      background-color: transparent;
      --page-background-color: #141414;
      --page-background-grayscale: #1F1F1F;
      --text-color-main: #F0F0F0;
      --text-color-dark: #FFFFFF;
      --text-color-light: #A2A2A2;
      --text-color-main-inverted: #ffffff;
      --border-color: #2D2D2D;
      --border-color-light: #F1F1F1;
      --border-color-inverted: #272930;
      --button-background-color: #FFF;
      --button-text-color: #000;
      --shadow-color: #B7C5CB;
      --shadow-light-color: rgba(30, 33, 35, 0.5);
      --shadow: 0px 4px 10px var(--shadow-color);
    }
  }

  .home-template {
    .intro-title, .intro-description, .hero-email-subscription input {
      color: #fff;
    }
  }

  .hero-intro-media {
    height: 100%;
    width: 100%;
    left: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    z-index: 0;
  }

  [data-theme="dark"] figure.hero-intro-media:after {
    position: absolute;
    width: 100%;
    height: 20%;
    content: "";
    bottom: 0;
    left: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.55), var(--page-background-color));
  }

  .hero-intro-img {
    display: block;
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    filter: brightness(0.6) contrast(1.1) saturate(1.1);
  }

.home-template main { margin-top: 0; }

.intro-container { 
  position: relative;
  z-index: 1;
}

.section-what-is-on {
  max-width: 1080px;
}

@media screen and (min-width: 992px) {
  .collection-items-wrap.family-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.post-excerpt { margin: 0.75rem 0; } 

@media screen and (min-width: 768px) { 
  .post-card-latest { flex-direction: row; }
  .post-card-latest .post-img-wrap { flex: 1; margin-bottom: 0; margin-right: 2rem; }
  .post-card-latest .post-info-wrap { flex: 1; }
}

@media screen and (min-width: 992px) {
  .post-card-latest .post-img-wrap { flex: 3; margin-right: 3rem; }
  .post-card-latest .post-info-wrap { flex: 2; }
}

.collection-post-slider .post-img-wrap { margin: 0; }
.collection-post-slider .post-img-wrap img {
  aspect-ratio: 1/1;
  filter: brightness(.6) contrast(1.25);
}
.collection-post-slider .item-title { 
  position: absolute;
  bottom: 0;
  padding: 1.5rem;
}

.partner-logos {
  max-width: 1080px;
  margin: 0 auto;
  display: flex; 
  flex-wrap: wrap; 
  gap: 1.5rem; 
  justify-content: center; 
  align-items: center; 
}

.partner-logos figure { margin: 0; }
.partner-logos figure + figure { margin-top: 0!important; }
.partner-logos img { height: 32px; width: auto; }

@media (min-width: 768px) { 
  .partner-logos {
    gap: 2rem; 
  }
}

[data-theme="dark"] .partner-logos img {
  filter: invert(1);
}

.section-header.mb-2 { margin-bottom: 2rem; }

.hero-icon {
  position: absolute;
  bottom: 2rem;
  left: calc(50% - 16px);

  svg { 
    stroke: #fff; 
    width: 32px;
  }

  #wheel { animation: scroll ease 1.5s infinite; }
}

@media (min-width: 768px) { 
  .hero-icon {
    bottom: 3rem;
    left: calc(50% - 20px);

    svg { 
      width: 40px;
    }
  }
}

.item-title.text-white a {
  color: #fff;
}

@media screen and (min-width: 1200px) {
  .mobile-menu-toggle, .mobile-only-items {
    display: flex;
  }
}

.is-menu-open .nav-main { 
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media screen and (max-width: 1199px) {
  .nav-main {
    position: fixed;
    top: calc(var(--announcement-bar-height, 0px) + 92px);
    max-height: calc(100vh - 120px - var(--announcement-bar-height, 0px));
  }
}

@media screen and (min-width: 1200px) {
  .nav-main {
    position: fixed;
    top: calc(var(--announcement-bar-height, 0px) + 100px);
    left: 0;
    max-height: calc(100vh - 100px - var(--announcement-bar-height, 0px));
    background-color: var(--page-background-color);
    width: 100%;
    height: 100%;
    display: none;
    overflow-y: auto;
    z-index: 99;
  }
  .is-menu-open .nav-main, .is-menu-open .nav-right {
    display: flex;
  }
  .nav-item-container {
    display: block;
    width: 100%;
    border-top: 1px solid var(--border-color);
  }
  
  .nav-item {
    display: block;
    height: auto;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-item .nav-link {
    width: 100%;
    height: 48px;
    line-height: 48px;
    justify-content: space-between;
    padding: 0 12px;
  }
  .nav-item>ul {
    display: none;
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translate3d(0, 0, 0);
    box-shadow: none;
    max-width: none;
    z-index: inherit;
    background: 0 0;
    top: 0;
    left: 0;
    border: none;
    border-radius: 0;
    margin-left: 0;
    padding: 0;
    border-top: 1px solid var(--border-color);
  }
  .nav-item>ul li .nav-link {
    padding: 0 1.5rem 0 2.5rem;
    border-radius: 0;
  }
  .nav-right {
    position: fixed;
    bottom: 0;
    left: 0;
    max-height: calc(100vh - 56px);
    background-color: var(--page-background-color);
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: none;
    justify-content: space-between;
    z-index: 100;
  }
  .nav-right .search {
    display: none;
  }
  .is-menu-open .nav-right .theme-toggle {
    order: 2;
  }
  .nav-right .nav-item-container {
    display: flex;
    flex-direction: row;
    justify-content: right;
    margin: 0;
    width: auto;
    border: none;
  }
  .nav-right .nav-item-container .nav-item {
    border-bottom: none;
  }
  .nav-item.active>ul {
    display: block;
  }
}

@media screen and (min-width: 1320px) {
  .nav-item .nav-link { padding: 0; }
}

.nav-right, .nav-item-container {
  max-width: 1290px;
  margin: 0 auto;
}

.nav-right {
  left: 50%;
  transform: translateX(-50%);
}

.is-menu-open .hero-intro {
  opacity: 0;
  visibility: hidden;
}

body.is-menu-open {
  overflow: hidden;
}

.nav-header {
  display: none;

  ul { 
    display: flex; 
    gap: 32px; 
    font-size: 20px;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    list-style: none;

    a { cursor: pointer; }

    a:hover {
      color: var(--ghost-accent-color);
    }
  }
}

.home-template.is-menu-open .site-header {
  background-color: var(--page-background-color);
}

.nav-header-right-items {
  display: flex;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}

@media screen and (min-width: 1200px) {
  .nav-header { display: block; }
  .nav-header-right-items { display: flex; }
  .nav-header-right-items { gap: 24px; }
}

@media screen and (max-width: 767px) {
    .footer-bottom {
        flex-direction: column-reverse;
        align-items: center;
    }
}

.footer-bottom-right {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media screen and (min-width: 768px) {
    .footer-bottom-right {
        flex: 1;
    }
    .back-to-top {
        flex: initial;
    }
    .footer-bottom {
        flex-direction: row;
        align-items: space-between;
    }
}

.nav-main-news h3 { 
  max-width: 1322px;
  margin: 0 auto 16px;
  padding: 0 16px;
}

.nav-main-news {
  margin: 16px auto 48px;
  display: none;
}

@media screen and (min-width: 1200px) {
  .nav-main-news { display: block; }
}

.nav-main-news .post-excerpt {
  color: var(--text-color-light);
}

/* ===================================================
    POLMANARKIVET LIVING ARKIV DESIGN LANGUAGE V1
   =================================================== */

/*=====================================================
    TYPOGRAPHY OVERRIDES
    NEW HIERARCHY: Body text = Sans-serif, H1/H2 = Serif, H3-H6 = Sans-serif, Blockquotes = Serif
=====================================================*/

/* Change the main body text to use the sans-serif UI font */
body {
  font-family: var(--font-ui);
}

/* Set H1 and H2 to use the serif body font */
h1, .h1,
h2, .h2 {
  font-family: var(--font-body);
}

/* Set blockquotes and pull quotes to use the serif body font */
.single-post-content blockquote {
  font-family: var(--font-body);
}

/*=====================================================
    CONTENT STYLING
    Post-specific elements and text formatting
=====================================================*/

/* ==== DROP CAP ==== */
/* Creates decorative first letter for posts tagged with 'drop-cap' */
.tag-hash-drop-cap .single-post-content > p:first-child:not(.blockquote-attribution)::first-letter,
.tag-hash-drop-cap .single-post-content > blockquote:first-child + p.blockquote-attribution + p::first-letter {
  font-family: var(--font-body);
  color: var(--accent-color);
  font-weight: 700;
  font-size: 5rem;
  float: left;
  line-height: 0.8;
  padding-right: 0.75rem;
  margin-top: 0.2rem;
}

/* ==== END OF ARTICLE FLEURON ==== */
/* Custom signature mark that appears at the end of articles (except those tagged 'no-fleuron') */
.post-template:not(.tag-no-fleuron) .single-post-content::after {
  content: '';
  display: block;
  width: 30px;
  height: 30px;
  margin: 3rem auto 0;
  background-color: var(--accent-color); 
  mask-image: var(--signature-mark-url);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: var(--signature-mark-url);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

/* ==== LEDE PARAGRAPH ==== */
/* Special styling for introductory paragraphs */
.section-lede {
  font-family: var(--font-body); 
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-color-dark);
  text-align: center;
  max-width: 700px;
  margin: 1rem auto 3rem;
}

/* ==== INLINE CODE ("ARCHIVAL TAG") ==== */
/* Custom styling for inline code elements to look like archival tags */
.single-post-content p > code,
.single-post-content li > code {
  background-color: var(--page-background-grayscale);
  color: var(--text-color-main);
  padding: 0.2em 0.5em;
  border-radius: var(--size-8);
  border: 1px solid var(--border-color);
  font-family: var(--font-ui);
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  vertical-align: baseline;
  transition: all 0.2s ease;
  display: inline-block;
  margin: 2px 0.4em 2px 0;
}

/* ==== LITTLEFOOT FOOTNOTES ==== */
/* Your existing Littlefoot and footnote styles */
.littlefoot{
  --button-background-color:#949494;
  --button-text-color:#fff;
  --button-active-background-color:#3f3f3f;
  --button-active-text-color:#fff;
  --button-border-radius:8px;
  --button-border-radius:0.5rem;
  --button-height:16px;
  --button-height:1rem;
  --button-margin:0 1.6px;
  --button-margin:0 0.1rem;
  --button-padding:0 9.6px;
  --button-padding:0 0.6rem;
  --button-transition:background-color 0.25s ease,color 0.25s ease;
  --popover-background-color:#f5f5f5;
  --popover-text-color:#111;
  --popover-border:1px solid #949494;
  --popover-border-radius:8px;
  --popover-border-radius:0.5rem;
  --popover-max-height:15em;
  --popover-max-width:90%;
  --popover-horizontal-padding:22.4px;
  --popover-horizontal-padding:1.4rem;
  --popover-vertical-padding:9.6px;
  --popover-vertical-padding:0.6rem;
  --popover-shadow:0 0 8px rgba(0,0,0,.302);
  --popover-transform-origin:50% 0;
  --popover-transform:scale(0.1) translateZ(0);
  --popover-active-transform:scale(1) translateZ(0);
  --popover-transition:opacity 0.25s ease,transform 0.25s ease;
  --popover-width:22em;
  --popover-scroll-indicator-color:#3f3f3f;
  --popover-tooltip-size:8px;
  --popover-tooltip-size:0.5rem;position:relative
}
.littlefoot {
  --popover-background-color: var(--page-background-color);
  --popover-horizontal-padding: 1rem;
  --popover-vertical-padding: 1rem;
  --popover-text-color: var(--text-color-main);
  --popover-border:1px solid var(--border-color);
}

.littlefoot__button{background-color:var(--button-background-color);border:0;border:var(--button-border,0);border-radius:var(--button-border-radius);color:var(--button-text-color);cursor:pointer;display:inline-block;font-size:12px;font-size:var(--button-font-size,12px);font-size:.75rem;font-size:var(--button-font-size,.75rem);font-weight:400;font-weight:var(--button-font-weight,initial);height:var(--button-height);margin:var(--button-margin);padding:var(--button-padding);-webkit-text-decoration:none;text-decoration:none;transition:var(--button-transition);vertical-align:middle}.littlefoot__button.is-active,.littlefoot__button:active,.littlefoot__button:focus,.littlefoot__button:hover{background-color:var(--button-active-background-color);color:var(--button-active-text-color)}.littlefoot__button svg{float:left;height:4.8px;height:.3rem}.littlefoot__popover{border:var(--popover-border);border-radius:var(--popover-border-radius);box-shadow:var(--popover-shadow);margin:calc(var(--popover-tooltip-size) + var(--button-height)) 0;max-width:var(--popover-max-width);position:absolute;top:0;transform:var(--popover-transform);transform-origin:var(--popover-transform-origin);transition:var(--popover-transition);width:var(--popover-width);z-index:1}.littlefoot__popover.is-above{bottom:0;top:auto}.littlefoot__popover.is-active{transform:var(--popover-active-transform)}.littlefoot__wrapper{position:relative;z-index:1}.littlefoot__content,.littlefoot__wrapper{border-radius:var(--popover-border-radius)}.littlefoot__content{-webkit-overflow-scrolling:touch;background-color:var(--popover-background-color);color:var(--popover-text-color);font-family:initial;font-family:var(--popover-font-family,initial);font-size:medium;font-size:var(--popover-font-size,initial);font-style:normal;font-style:var(--popover-font-style,initial);font-weight:400;font-weight:var(--popover-font-weight,initial);line-height:normal;line-height:var(--popover-line-height,normal);max-height:var(--popover-max-height);overflow:auto;padding:var(--popover-vertical-padding) var(--popover-horizontal-padding)}.littlefoot__content img{max-width:100%}.littlefoot__content:focus{outline:none}.is-scrollable{--arrow-x:calc(var(--popover-horizontal-padding)*-1);--arrow-y:calc(var(--popover-vertical-padding)/2)}.is-scrollable .littlefoot__content:after{bottom:0;color:var(--popover-scroll-indicator-color);content:"\21E3";display:block;left:0;opacity:1;position:sticky;text-align:center;transform:translateX(var(--arrow-x)) translateY(var(--arrow-y));transition:var(--popover-transition);width:var(--popover-horizontal-padding)}.is-scrollable.is-fully-scrolled .littlefoot__content:after{opacity:0}.littlefoot__tooltip{--tooltip-margin:calc(var(--popover-tooltip-size)*-1);background-color:var(--popover-background-color);border:var(--popover-border);box-shadow:var(--popover-shadow);height:calc(var(--popover-tooltip-size)*2);margin-left:var(--tooltip-margin);position:absolute;transform:rotate(45deg);width:calc(var(--popover-tooltip-size)*2)}.is-below .littlefoot__tooltip{top:var(--tooltip-margin)}.is-above .littlefoot__tooltip{bottom:var(--tooltip-margin)}@media (max-width:767px){.littlefoot__popover{border-radius:0;border-width:1px 0 0;bottom:0;left:0!important;margin:0;max-width:100%!important;position:fixed;right:0;top:auto;transform:translateY(100%);width:100%}.littlefoot__popover.is-active{transform:translateY(0)}.littlefoot__wrapper{border-radius:0;max-width:100%!important;transform:none}.littlefoot__tooltip{display:none}}@media not print{.littlefoot--print{display:none}}@media print{.littlefoot__button,.littlefoot__popover{display:none}}

.littlefoot__wrapper a {
  text-decoration: underline;
}
.littlefoot__button { 
    height: fit-content;
    font-size: 14px;
    font-variant: small-caps;
    line-height: 18px;
}

/* Polmanarkivet Custom Footnote Style */
.littlefoot__button {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: var(--font-ui);
  color: var(--text-color-light);
  font-size: 0.75em;
  font-weight: 600;
  vertical-align: super;
  line-height: 1;
  margin: 0;
  height: auto;
}

.littlefoot__button:hover,
.littlefoot__button.is-active {
  background-color: transparent !important;
  background-image: none !important;
  color: var(--accent-color);
}

/* NEW: Footnote list styles */
.footnotes-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  font-size: 0.875rem; 
}

.footnotes-title {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color-dark);
}

.footnotes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footnote-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
}

.footnote-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.footnote-number {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 1.5rem;
}

.footnote-content {
  flex: 1;
  line-height: 1.5;
  color: var(--text-color-light);
}

.footnote-content p {
  margin: 0;
}

.footnote-content p + p {
  margin-top: 0.5rem;
}

/* Fix the return arrow links - override the .single-post-content link styles */
.footnote-backlink {
    color: var(--ghost-accent-color, var(--accent-color, #d4af37));
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Override the specific .single-post-content link styles for footnote arrows */
.single-post-content .footnotes-section .footnote-backlink {
    text-decoration: none !important;
    background: none !important;
    color: var(--ghost-accent-color, var(--accent-color, #d4af37)) !important;
    transition: none !important;
}

.single-post-content .footnotes-section .footnote-backlink:hover {
    background: none !important;
    color: var(--ghost-accent-color, var(--accent-color, #d4af37)) !important;
}

/*=====================================================
    INTERACTIVE ELEMENTS
    Buttons, CTAs, and user interaction components
=====================================================*/

/* ==== ANIMATED STATS (OUR STORY) ==== */
/* Main container for the stats section */
.container-stats {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
  border-radius: 0;
}

/* Main heading: "The Story in Data" */
.container-stats h4 {
  font-family: var(--font-body);
  font-size: 1.5rem;
  margin-bottom: 3rem;
}

/* The grid of stat cards */
.cards-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Default to 3 columns */
  gap: 2rem;
  width: 100%;
}

/* Individual stat card styling */
.cards-stats > div {
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  padding: 1.5rem;
  background-color: var(--page-background-color);
  transition: all 0.2s ease-in-out;
}

.cards-stats > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

/* The animated number */
.cards-stats h2 {
  font-family: var(--font-ui);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

/* The description text */
.cards-stats p {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-color-light);
  margin-top: 0.5rem;
}

/* Responsive adjustments for the grid */
@media (max-width: 992px) {
  .cards-stats {
    grid-template-columns: repeat(2, 1fr); /* Switch to 2 columns for tablets */
  }
}
@media (max-width: 600px) {
  .cards-stats {
    grid-template-columns: 1fr; /* Switch to 1 column for mobile */
  }
}

/* --- Dark Mode Overrides --- */
[data-theme=dark] .cards-stats > div {
    background-color: var(--page-background-grayscale);
}
[data-theme=dark] .cards-stats > div:hover {
    border-color: var(--accent-color);
}

/* ==== SECONDARY BUTTON ==== */
/* Alternative button style for secondary actions */
.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color-main);
}

.btn-secondary:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #1C1A19;
}

/* ==== CONTENT CTA ("SUPPORTER'S INVITATION") ==== */
/* Styles the subscription/support CTA box in posts */
.gh-post-upgrade-cta-content {
  background-color: #EAE0C8 !important;
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  padding: 2.5rem;
}

/* CTA heading styling */
.gh-post-upgrade-cta-content h2 {
  color: var(--text-color-dark) !important;
  font-size: 1.75rem;
}

/* CTA description paragraph styling */
.gh-post-upgrade-cta-description {
  color: var(--text-color-dark) !important; 
  font-size: 1.125rem;
  line-height: 1.6; 
  margin: 1.5rem 0; 
  text-align: center; 
}

/* CTA primary button styling */
.gh-post-upgrade-cta-content .gh-btn {
  display: inline-flex !important;
  align-items: center !important;
  background: var(--button-background-color) !important;
  color: var(--button-text-color) !important;
  border-radius: var(--size-99) !important;
  height: 48px;
  font-size: 1rem;
  padding: 0 1.5rem;
  transition: all 0.2s ease;
}

/* CTA button hover effect */
.gh-post-upgrade-cta-content .gh-btn:hover {
  background: var(--accent-gradient) !important;
  color: #1C1A19 !important;
}

/* CTA "Already a supporter?" text styling */
.gh-post-upgrade-cta-content p small {
  color: var(--text-color-light);
}

/* CTA "Sign in" link styling */
.gh-post-upgrade-cta-content p small a {
  color: var(--text-color-dark);
  text-decoration: underline;
  background: none !important; 
}
.gh-post-upgrade-cta-content p small a:hover {
  color: var(--accent-color);
}
.gh-post-upgrade-cta-content p small a::after {
  display: none !important; 
}

/*=====================================================
    LAYOUT COMPONENTS
    Cards, footers, and structural elements
=====================================================*/
  
/* ==== LOGO SIZE ==== */
.gh-head-logo img {
   max-height: 60px; 
   height: 100%;
}

/* ==== CONTRIBUTE CARDS ==== */
/* Main grid for the first set of cards */
.contribute-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2-column layout for desktop */
  gap: 2rem;
}

/* Individual card styling */
.contribute-card {
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  padding: 1.5rem;
  background-color: var(--page-background-color);
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
}

.contribute-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

.contribute-card h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.contribute-card p {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-color-main);
  line-height: 1.5;
  flex-grow: 1;
}

/* 'Skills & Focus' label */
.card-skills-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color-light);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Container for the skill tags */
.card-skills span {
  display: inline-block;
  background-color: var(--page-background-grayscale);
  color: var(--text-color-main);
  padding: 0.2em 0.5em;
  border-radius: var(--size-8);
  border: 1px solid var(--border-color);
  font-family: var(--font-ui);
  font-size: 0.8em;
  font-weight: 500;
  margin: 0.25rem 0.25rem 0 0;
}

/* Container for the final, single card row */
.contribute-card-single-row {
    display: flex;
    justify-content: flex-start; 
    margin-top: 2rem;
}

/* Styling for the card within the single row */
.contribute-card-single-row .contribute-card {
    width: 100%;
    max-width: calc(50% - 1rem); 
}

/* On any screen 992px wide or smaller, switch to a single, stacked column */
@media (max-width: 992px) {
  .contribute-cards-grid {
    grid-template-columns: 1fr;
  }
  .contribute-card-single-row .contribute-card {
      /* Allow the single card to take up full width on smaller screens */
      max-width: 100%;
  }
}

/* Dark Mode Overrides */
[data-theme=dark] .contribute-card {
    background-color: var(--page-background-grayscale);
}
[data-theme=dark] .contribute-card:hover {
    border-color: var(--accent-color);
}

/* ==== RESEARCH PROJECT CARDS ==== */
.three-box {
   width: 70vw;
  margin-left: calc(50% - 35vw);
  grid-column: wide-start/wide-end;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  
  }
  @media screen and (max-width:767px) {
    .three-box {
       grid-template-columns: 1fr; }
  }
  
  .three-box .kg-product-card-container {
    height: 100%;
    align-items: center;
  }

.two-box {
   width: 100vw;
  margin-left: calc(60% - 35vw);
  grid-column: wide-start/wide-end;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  
  }
  @media screen and (max-width:767px) {
    .two-box {
       grid-template-columns: 1fr; }
  }
  
  .two-box .kg-product-card-container {
    height: 100%;
    align-items: center;
  }

/* ==== BOOKMARK CARD ==== */
/* Custom styling for bookmark cards with typography hierarchy and hover effects */

/* Bookmark card typography - title uses serif, description uses sans-serif */
.single-post-content .kg-bookmark-title {
  font-family: var(--font-body) !important;
}

.single-post-content .kg-bookmark-description {
  font-family: var(--font-ui) !important;
}

/* Bookmark card hover lift effect */
.single-post-content .kg-bookmark-card a.kg-bookmark-container {
  transition: all 0.25s ease;
}

.single-post-content .kg-bookmark-card a.kg-bookmark-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ==== FILE UPLOAD CARD ("ARCHIVAL DOCUMENT SLIP") ==== */
/* Custom styling for file cards with archival document styling */

/* File card container with background and hover effect */
.kg-file-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #EAE0C8;
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease-in-out;
}

.kg-file-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* File card content styling */
.kg-file-card-icon {
  color: var(--accent-color);
}

.kg-file-card-metadata {
  flex-grow: 1;
}

.kg-file-card-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color-dark);
  transition: color 0.2s ease;
}

.kg-file-card:hover .kg-file-card-title {
  color: var(--accent-color);
}

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

.kg-file-card-button {
  color: var(--text-color-main);
  transition: color 0.2s ease;
}

.kg-file-card-button:hover {
  color: var(--accent-color);
}

/* ==== IMAGE STYLING ("THE GALLERY WALL") ==== */
/* Frame-like styling for images with selective hover effects */

/* Single image styling - shadow only, no zoom (excludes full-width and #no-frames tagged content) */
body:not(.tag-hash-no-frames) .single-post-content .kg-image-card:not(.kg-width-full) img {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: var(--size-16);
  transition: box-shadow 0.25s ease;
}

body:not(.tag-hash-no-frames) .single-post-content .kg-image-card:not(.kg-width-full) img:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Gallery image styling - includes zoom to signal clickability */
body:not(.tag-hash-no-frames) .single-post-content .kg-gallery-image img {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}

body:not(.tag-hash-no-frames) .single-post-content .kg-gallery-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ==== TOGGLE ELEMENT ("THE SCHOLARLY DIVDER") ==== */
/* Minimalist toggle/accordion styling that acts as a content divider */

/* Toggle container - transparent with top border divider */
.single-post-content .kg-toggle-card {
  background-color: transparent;
  border: none;
  border-top: 1px solid var(--border-color);
  border-radius: 0;
  padding: 1rem 0 0;
  margin: 2rem 0;
  box-shadow: none;
}

.single-post-content .kg-toggle-card:hover {
  transform: none;
  box-shadow: none;
}

/* Toggle heading and interaction */
.single-post-content .kg-toggle-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0;
}

.single-post-content .kg-toggle-heading-text {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color-dark);
  transition: color 0.2s ease;
}

.single-post-content .kg-toggle-card:hover .kg-toggle-heading-text {
  color: var(--accent-color);
}

/* Toggle icon */
.single-post-content .kg-toggle-card-icon {
  color: var(--accent-color);
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.single-post-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon {
  transform: rotate(45deg);
}

/* Toggle content with accent border */
.single-post-content .kg-toggle-content {
  color: var(--text-color-main);
  line-height: 1.6;
  margin-top: 1rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent-color);
}

/* ==== PRODUCT CARD ("BIBLIOGRAPHY CARD") ==== */
/* Enhanced product cards with typography hierarchy and hover interactions */

/* Product card hover effect */
.single-post-content .kg-product-card-container {
  transition: all 0.25s ease;
}

.single-post-content .kg-product-card-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Product card typography - title serif, description sans-serif */
.single-post-content .kg-product-card h4.kg-product-card-title {
  font-family: var(--font-body);
  transition: color 0.25s ease;
}

.single-post-content .kg-product-card-container:hover h4.kg-product-card-title {
  color: var(--accent-color);
}

.single-post-content .kg-product-card .kg-product-card-description p {
  font-family: var(--font-ui);
}

/* ==== CALLOUT CARD ("CURATOR'S NOTE") ==== */
/* Custom styling for callout cards used as curator notes */
.single-post-content .kg-callout-card {
  background-color: #EAE0C8;
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
}

/* ==== SPLIT HEADER CARD ==== */
/* Custom styling for split layout header cards */
.single-post-content .kg-header-card.kg-layout-split {
  border-radius: var(--size-8);
  overflow: hidden;
  background-color: transparent;
}

/* Split header card - text side */
.single-post-content .kg-header-card.kg-layout-split .kg-header-card-content {
  background-color: #EAE0C8;
  padding: 2rem;
}

/* Split header card - image side */
.single-post-content .kg-header-card.kg-layout-split .kg-header-card-image {
  background-color: transparent;
}

/* Split header card typography */
.single-post-content .kg-header-card .kg-header-card-header {
  font-family: var(--font-body);
  color: var(--text-color-dark);
}

.single-post-content .kg-header-card .kg-header-card-subheader {
  font-family: var(--font-ui);
  color: var(--text-color-main);
  line-height: 1.5;
}

/* Split header card button */
.single-post-content .kg-header-card .kg-header-card-button {
  background: var(--button-background-color);
  color: var(--button-text-color);
  border-radius: var(--ui-radius);
}

.single-post-content .kg-header-card .kg-header-card-button:hover {
  background: var(--accent-gradient);
  color: #1C1A19;
}

/* --- FOOTER DESIGN --- */

/* Overlapping Footer Seal Effect */
/* Creates an overlapping seal image effect in the footer */
.site-footer {
  position: relative;
  margin-top: 60px;
}

.footer-seal-image {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: auto;
  z-index: 2; /* Ensures it sits on top of all other content */
}

/* Newsletter Sign-up Section */
.footer-newsletter-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    padding-top: 4.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color-inverted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-newsletter-content {
    flex: 1 1 350px;
}

.footer-newsletter-heading {
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color-main-inverted);
    margin-bottom: 0.75rem;
}

.footer-newsletter-description {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-color-light-inverted);
    max-width: 50ch;
    margin: 0;
}

.footer-newsletter-form-wrap {
    flex: 1 1 400px;
    min-width: 280px;
    margin-top: 0.5rem;
}

/* --- NEWSLETTER FORM STYLING (Using existing working classes) --- */
.footer-email-form {
    max-width: 100%;
}

.footer-input-group {
    /* This should use your existing .input-group .input-group-inline classes */
    /* No custom styling needed - the working classes handle everything */
}

.footer-email-input {
    /* This should use your existing .input-filed class */
    /* No custom styling needed */
}

.footer-subscribe-button {
    /* This should use your existing .esub-submit class */
    /* No custom styling needed */
}

/* Footer-specific styling for the notice text */
.footer-notice-text {
    font-size: 0.75rem;
    margin-top: 1rem;
    font-family: var(--font-ui);
    color: var(--text-color-light-inverted);
    text-align: center;
}

/* Logo and Socials Row */
.footer-support-socials-row {
    display: grid;
    grid-template-columns: auto 1fr auto; 
    align-items: center;
    gap: 3rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color-inverted);
    margin-bottom: 2rem;
}

.footer-support-socials-row .footer-logo {
    justify-self: start;
}

.footer-support-links {
    text-align: center;
    justify-self: center; 
}

.footer-support-heading {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color-main-inverted);
    margin-bottom: 0.75rem;
}

.support-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    flex-wrap: wrap;
}

.support-list a {
    font-weight: 600;
    color: var(--text-color-main-inverted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.support-list a:hover {
    color: var(--text-color-main-inverted);
}

.footer-support-socials-row .social-links {
    display: flex;
    gap: 1rem;
    justify-self: end;
    align-items: center;
}

/* Media Queries --- */
@media (max-width: 768px) {
    .footer-newsletter-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding-top: 2rem;
        padding-bottom: 1rem;
    }
    
    .footer-newsletter-content {
        margin-bottom: 0;
        flex: none !important;
    }
    
    .footer-newsletter-form-wrap {
        width: 100%;
        flex: none;
        margin-top: 0;
    }
    
    .footer-support-socials-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        text-align: center;
        gap: 1.5rem;
        justify-items: center;
    }
    
    .footer-support-socials-row .footer-logo {
        grid-row: 1;
        justify-self: center !important;
    }
    
    .footer-support-socials-row .social-links {
        grid-row: 2;
        justify-self: center !important;
    }
    
    .footer-support-links {
        grid-row: 3;
        justify-self: center !important;
        text-align: center;
    }
}

/* ==== STYLE GUIDE COLOR SWATCHES ==== */
/* Interactive color swatches for the style guide page */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

.swatch-card {
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  overflow: hidden;
  transition: all 0.2s ease;
}

.swatch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.swatch-color {
  height: 120px;
  border-bottom: 1px solid var(--border-color);
}

.swatch-info {
  padding: 1rem;
  font-family: var(--font-ui);
}

.swatch-info .name {
  font-weight: 700;
  color: var(--text-color-dark);
}

.swatch-info .hex {
  font-size: 0.875rem;
  color: var(--text-color-light);
  margin-top: 0.25rem;
}

.swatch-description {
  font-size: 0.875rem;
  color: var(--text-color-light);
  margin-top: 0.75rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.swatch-card:hover .swatch-description {
  opacity: 1;
}

/* ==== AUTHOR PAGE DOSSIER HEADER ==== */
/* Avatar */
.archive-cover .avatar-wrap {
  width: 136px !important;
  height: 136px !important;
  padding: 0.5rem !important;
  border-radius: var(--size-8) !important;
  border: 1px solid var(--accent-color) !important;
}
.archive-cover .avatar-wrap img {
  border-radius: var(--size-8) !important;
}

/* Typography */
.archive-cover .name {
  font-family: var(--font-body);
}

/* Custom HR Divider */
hr.section-divider {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 4rem 0;
}

/* ==== OUR PEOPLE PAGE ("CURATORIAL DOSSIER") ==== */
/* People page grid layout */
.author-cards-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

/* Author card layout - side-by-side design */
.author-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
}

/* Author avatar styling - square with hover effect */
.author-card .avatar-wrap {
  width: 96px;
  height: 96px;
  border-radius: var(--size-8);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: border-color 0.25s ease;
}

.author-card:hover .avatar-wrap {
  border-color: var(--accent-color);
}

.author-card .avatar-wrap img {
  border-radius: var(--size-8);
}

/* Author information styling */
.author-card .author-info {
  text-align: left;
  margin-top: 0;
}

.author-card .author-info .name {
  font-family: var(--font-body);
  margin-bottom: 0.5rem;
}

.author-card .author-info .author-meta {
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ==== ABOUT THE AUTHOR BOX ("DOSSIER STYLE") ==== */
/* Author box hover effect */
.about-author-wrap {
  transition: border-color 0.25s ease;
}

.about-author-wrap:hover {
  border-color: var(--accent-color);
}

/* Author bio avatar - square styling */
.about-author .avatar-wrap img {
  border-radius: var(--size-8) !important;
}

/* Author bio name - serif font */
.about-author .name {
  font-family: var(--font-body);
  font-size: 1.25rem;
}

/* ==== RELATED POSTS AND RELATED PEOPLE ==== */
/* Enhanced related posts cards with hover effects */

/* Base Card Styling */
.related-posts-section .post-card,
.related-posts-section .fm-card {
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  overflow: hidden;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.related-posts-section .post-card:hover,
.related-posts-section .fm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

/* Content & Typography */

/* Text container in the 'posts' card */
.related-posts-section .post-info-wrap {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Add proper padding to the 'people' card text elements */
.related-posts-section .fm-card .fm-title {
    padding: 1rem 1rem 0 1rem;
}
.related-posts-section .fm-card .read-more {
    padding: 0 1rem 1rem 1rem;
}

/* Style both titles with the SERIF font */
.related-posts-section .post-title,
.related-posts-section .fm-title {
  font-family: var(--font-body);
  flex-grow: 1; /* Pushes the meta/link to the bottom */
}

.related-posts-section .post-title a,
.related-posts-section .fm-title a {
  transition: color 0.25s ease;
}

.related-posts-section .post-card:hover .post-title a,
.related-posts-section .fm-card:hover .fm-title a {
  color: var(--accent-color);
}

/* Style the metadata in 'posts' card */
.related-posts-section .post-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-color-light);
  margin-top: 1rem;
}

/* Style the "Read bio" link to be more prominent */
.related-posts-section .read-more {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color-main);
  margin-top: 1rem;
  transition: color 0.2s ease;
}

.related-posts-section .fm-card:hover .read-more {
  color: var(--accent-color);
}

/* Image Zoom Effect */

.related-posts-section .post-img,
.related-posts-section .fm-card img {
  transition: transform 0.25s ease;
}

.related-posts-section .post-card:hover .post-img,
.related-posts-section .fm-card:hover img {
  transform: scale(1.03);
}

@media (max-width: 767px) {
  .related-posts-section .row > div,
  .related-posts-section .fm-card {
    margin-bottom: 2rem;
  }
}

/* ==== TAG LIST ("ARCHIVAL LABELS") ==== */
/* Enhanced tag list styling with archival label design */

/* Tag item styling - rounded rectangles with hover effect */
.tag-list-wrap .tag-item {
  border-radius: var(--size-8) !important;
  transition: all 0.2s ease-in-out;
  padding-right: 1rem;
}

.tag-list-wrap .tag-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Tag typography - serif font */
.tag-list-wrap .tag-name {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
}

.tag-list-wrap .tag-name:before {
  display: none;
}

/* "See All" button consistency */
.tag-list-wrap .all-tags-link {
  border-radius: var(--size-8) !important;
}

/* ==== DONATE WALL ==== */
/* Styles Donate Wall to HTML card snippet to match paywall */

/* Main container for our custom card */
.kg-card-donate-wall {
  background-color: #EAE0C8;
  border: 1px solid var(--border-color);
  border-radius: var(--size-8);
  padding: 2.5rem;
  text-align: center;
  margin: 2rem auto;
}

/* The main headline */
.kg-card-donate-wall h2 {
  font-family: var(--font-body);
  color: var(--text-color-dark);
  font-size: 1.75rem;
  margin-top: 0;
}

/* The description paragraph */
.kg-card-donate-wall p {
  font-family: var(--font-ui);
  color: var(--text-color-main);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 60ch;
  margin: 1rem auto;
}

/* The button */
.kg-card-donate-wall .kg-card-donate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-background-color);
  color: var(--button-text-color);
  border-radius: var(--size-99);
  height: 48px;
  font-size: 1rem;
  font-family: var(--font-ui);
  font-weight: 700;
  text-decoration: none;
  padding: 0 1.5rem;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

/* Button hover effect */
.kg-card-donate-wall .kg-card-donate-button:hover {
  background: var(--accent-gradient);
  color: #1C1A19;
}

/* ==== SIGNUP CTA PARTIAL ==== */
/* Styles content for signup-cta partial */
.member-cta {
  margin-bottom: 4rem;
}

.cta-member-wrap {
  padding: 3rem 1.5rem;
  border-radius: var(--size-16);
  position: relative;
  border: 2px dashed var(--accent-color);
  margin-inline: auto;
}

.cta-member-wrap > * {
  position: relative;
  z-index: 2;
}

.cta-member-content {
  max-width: var(--content-width);
  margin-inline: auto;
  text-align: center;
}

.cta-member-content hr {
  max-width: 400px;
  margin-inline: auto;
  margin-block: 2rem 2rem;
}

.cta-member-title {
  font-family: var(--font-body); 
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-member-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-color-main);
}

@media screen and (min-width: 768px) {
  .cta-member-subtitle {
    font-size: 1.25rem;
  }
}

.cta-member-action {
  margin: 3rem auto 0;
  text-align: center;
}

.cta-member-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-background-color);
  color: var(--button-text-color);
  border-radius: var(--size-99);
  height: 48px;
  font-size: 1rem;
  font-family: var(--font-ui);
  font-weight: 700;
  text-decoration: none;
  padding: 0 1.75rem;
  transition: all 0.2s ease;
}

.cta-member-button:hover {
  background: var(--accent-gradient);
  color: #1C1A19;
}

/*=====================================================
    DARK MODE OVERRIDES
    Dark mode variants for all above elements
=====================================================*/

/* Dark Mode Bookmark Card */
[data-theme=dark] .single-post-content .kg-bookmark-card a.kg-bookmark-container::after {
  background-color: var(--page-background-grayscale);
}

[data-theme=dark] .single-post-content .kg-bookmark-title,
[data-theme=dark] .single-post-content .kg-bookmark-description,
[data-theme=dark] .single-post-content .kg-bookmark-metadata {
  color: var(--text-color-dark);
}

/* Dark Mode Toggle Element */
[data-theme=dark] .single-post-content .kg-toggle-card {
  border-top-color: var(--border-color);
}

[data-theme=dark] .single-post-content .kg-toggle-heading-text {
  color: var(--text-color-dark);
}

[data-theme=dark] .single-post-content .kg-toggle-card:hover .kg-toggle-heading-text {
  color: var(--accent-color);
}

[data-theme=dark] .single-post-content .kg-toggle-content {
  color: var(--text-color-main);
}

/* Dark Mode Product Card */
[data-theme=dark] .single-post-content .kg-product-card-container {
  background-color: var(--page-background-grayscale);
  border-color: var(--border-color);
}

[data-theme=dark] .single-post-content .kg-product-card-container:hover {
  border-color: var(--accent-color);
}

[data-theme=dark] .single-post-content .kg-product-card h4.kg-product-card-title,
[data-theme=dark] .single-post-content .kg-product-card .kg-product-card-description {
  color: var(--text-color-dark);
}

/* Dark Mode File Upload Card */
[data-theme=dark] .kg-file-card {
  background-color: #2a2a2a;
  border-color: #3C3B39;
}

[data-theme=dark] .kg-file-card:hover {
  border-color: var(--accent-color);
}

[data-theme=dark] .kg-file-card-title {
  color: var(--text-color-dark);
}

[data-theme=dark] .kg-file-card:hover .kg-file-card-title {
  color: var(--accent-color);
}

[data-theme=dark] .kg-file-card-caption {
  color: var(--text-color-light);
}

[data-theme=dark] .kg-file-card-button {
  color: var(--text-color-main);
}

/* Dark Mode Our People Page */
[data-theme=dark] .author-card {
  background-color: var(--page-background-grayscale);
}

[data-theme=dark] .author-card .avatar-wrap {
  border-color: var(--border-color);
}

[data-theme=dark] .author-card:hover .avatar-wrap {
  border-color: var(--accent-color);
}

/* Dark Mode About Author Box */
[data-theme=dark] .about-author-wrap {
  background-color: var(--page-background-grayscale);
}

/* Dark Mode Related Posts */
[data-theme=dark] .related-posts-section .post-card,
[data-theme=dark] .related-posts-section .fm-card {
  background-color: var(--page-background-grayscale);
}

/* Dark Mode Tag List */
[data-theme=dark] .tag-list-wrap .tag-item:hover {
  background-color: var(--page-background-grayscale);
}

/* Dark Mode Header Background Fix */
/* Ensures header background matches page background in dark mode */
[data-theme=dark] .site-header {
  background-color: var(--page-background-color);
}

/* Dark Mode Texture Override */
/* Prevents light mode paper texture from showing in dark mode */
[data-theme=dark] body {
  background-image: none;
}

/* Dark Mode Callout Card */
[data-theme=dark] .single-post-content .kg-callout-card {
    background-color: #2a2a2a; 
    border-color: #3C3B39;
}

[data-theme=dark] .single-post-content .kg-callout-card,
[data-theme=dark] .single-post-content .kg-callout-card a {
    color: var(--text-color-main);
}

/* Dark Mode Content CTA */
[data-theme=dark] .gh-post-upgrade-cta-content {
  background-color: #141414 !important;
  border: 1px solid var(--border-color);
}

/* Dark Mode Split Header Card */
[data-theme=dark] .single-post-content .kg-header-card.kg-layout-split .kg-header-card-content {
  background-color: var(--page-background-grayscale) !important;
}

[data-theme=dark] .single-post-content .kg-header-card-heading[style*="color"] {
  color: var(--text-color-dark) !important;
}

[data-theme=dark] .single-post-content .kg-header-card-subheading[style*="color"] {
  color: var(--text-color-main) !important;
}

/* --- Dark Mode Donate Wall --- */
[data-theme=dark] .kg-card-donate-wall {
  background-color: #141414;
}