:root {
  --ct-black: #101010;
  --ct-cream: #f7f1e7;
  --ct-sand: #e8d7bd;
  --ct-gold: #b98343;
  --ct-rust: #8f4f2f;
  --ct-green: #18392f;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ct-cream);
  color: var(--ct-black);
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

/* Single article title — smaller than default Tailwind 8xl on desktop */
@media (min-width: 1024px) {
  body.single .ct20-single-title {
    font-size: 3rem;
    line-height: 1;
  }
}

.display-font {
  font-family: 'Playfair Display', Georgia, serif;
}

.glass {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass--article {
  background: rgba(255, 255, 255, 0.82);
}

.hero-bg {
  background-size: cover;
  background-position: center;
}

.feature-card img,
.article-card img,
.mini-card img,
.related-card img,
.side-card img,
.image-grid img {
  transition: transform 0.6s ease;
}

.feature-card:hover img,
.article-card:hover img,
.mini-card:hover img,
.related-card:hover img,
.side-card:hover img,
.image-grid:hover img {
  transform: scale(1.06);
}

.soft-shadow {
  box-shadow: 0 24px 80px rgba(16, 16, 16, 0.1);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--ct-gold);
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.current-menu-item::after {
  width: 100%;
}

.noise {
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}

.noise--light {
  background-image: radial-gradient(rgba(0, 0, 0, 0.055) 1px, transparent 1px);
}

/* Article typography */
.article-body p {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(16, 16, 16, 0.78);
  margin-top: 1.35rem;
}

.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-top: 4rem;
  margin-bottom: 1.2rem;
  color: #101010;
}

.article-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-body a {
  color: #8f4f2f;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-body strong {
  color: #101010;
  font-weight: 800;
}

.article-body ul,
.article-body ol {
  margin-top: 1.35rem;
  padding-left: 1.5rem;
  color: rgba(16, 16, 16, 0.78);
  line-height: 1.9;
}

.article-body {
  overflow-wrap: anywhere;
  word-wrap: break-word;
  max-width: 100%;
}

.article-body img {
  border-radius: 2rem;
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

.article-body iframe,
.article-body video,
.article-body embed,
.article-body object {
  max-width: 100%;
}

.article-body figure,
.article-body .wp-block-image {
  max-width: 100%;
}

.article-body pre {
  overflow-x: auto;
  max-width: 100%;
}

.article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.article-body .wp-block-image img {
  width: 100%;
  height: auto;
}

.info-card strong {
  display: inline-block;
  min-width: 100px;
  color: #101010;
}

/* Mobile nav */
#ct-mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

#ct-mobile-nav.is-open {
  max-height: 480px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* —— Ads —— */

.ct20-ad__link {
  display: block;
  line-height: 0;
}

.ct20-ad__img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Nav header — above wallpapers (corners stay clickable) */
.ct20-site-header {
  z-index: 10090;
}

/* Leaderboard — below wallpapers so side ads are never covered */
.ct20-leaderboard-wrap {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10030;
}

.ct20-leaderboard-wrap--below-nav {
  position: relative;
  z-index: 10030;
}

.ct20-leaderboard-inner {
  width: fit-content;
  max-width: min(1140px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.ct20-leaderboard-wrap .ct20-leaderboard,
.ct20-leaderboard-wrap .ct20-ad--leaderboard {
  width: fit-content;
  max-width: min(1140px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.ct20-leaderboard-wrap .ct20-ad__link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  line-height: 0;
}

.ct20-leaderboard-wrap .ct20-ad__img {
  display: block;
  width: min(1140px, 100%);
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

/* Wallpaper anchor — full width row, does not sit beside the ad */
.ct20-leaderboard-wrap .ct20-wallpaper-anchor-nav {
  width: 100%;
  flex: 0 0 auto;
  align-self: stretch;
}

/* Wallpaper — fixed L/R, above content + leaderboard */
.ct20-wallpaper {
  display: none;
  pointer-events: none;
  z-index: 10080;
}

body.ct20-has-wallpaper .ct20-wallpaper {
  display: block;
}

/* In-flow anchor — JS reads bottom edge for fixed wallpaper top offset */
.ct20-wallpaper-anchor {
  position: relative;
}

/* Anchor at bottom of leaderboard block (articles/categories) */
.ct20-wallpaper-anchor-nav {
  display: block;
  width: 100%;
  height: 0;
  line-height: 0;
  pointer-events: none;
}

/* Fallback until JS runs — single/category pages (under nav) */
body.ct20-wallpaper-below-nav.ct20-has-wallpaper {
  --ct-wallpaper-top: 7rem;
}

.ct20-wallpaper__side {
  position: fixed;
  width: 175px;
  pointer-events: auto;
  z-index: 10081;
  top: var(--ct-wallpaper-top, 820px);
  max-height: calc(100vh - var(--ct-wallpaper-top, 820px) - 16px);
  overflow: visible;
  transition: top 0.35s ease;
}

.ct20-wallpaper__side--left {
  left: max(0px, calc((100vw - 1280px) / 2 - 195px));
}

.ct20-wallpaper__side--right {
  right: max(0px, calc((100vw - 1280px) / 2 - 195px));
}

.ct20-wallpaper__unit .ct20-ad__img {
  width: 175px;
  height: auto;
  max-height: 695px;
  object-fit: contain;
  object-position: top center;
}

/* Hide wallpaper when viewport too narrow */
@media (max-width: 1535px) {
  body.ct20-has-wallpaper .ct20-wallpaper {
    display: none;
  }

  body.ct20-has-wallpaper {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 1536px) {
  body.ct20-has-wallpaper #primary,
  body.ct20-has-wallpaper main,
  body.ct20-has-wallpaper section,
  body.ct20-has-wallpaper article,
  body.ct20-has-wallpaper .hero-bg,
  body.ct20-has-wallpaper .ct20-wallpaper-anchor {
    position: relative;
    z-index: 1 !important;
  }

  body.ct20-has-wallpaper .soft-shadow,
  body.ct20-has-wallpaper .article-card,
  body.ct20-has-wallpaper .feature-card {
    z-index: 1;
  }
}

/* MPU 300×250 — full bleed, no label/padding */
.ct20-mpu-wrap {
  padding: 0;
  margin: 0;
}

.ct20-mpu-wrap--sidebar,
.ct20-mpu-wrap--sidebar-top,
.ct20-mpu-wrap--in-details {
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.ct20-mpu-wrap--sidebar-top {
  background: transparent;
}

/* Sidebar MPU — stays in column flow (sticky via parent lg:sticky) */
.ct20-mpu-wrap--home,
.ct20-mpu-wrap--sidebar-top {
  position: relative;
  z-index: 1;
}

.ct20-latest-sidebar,
.ct20-article-sidebar {
  align-self: flex-start;
}

.ct20-sidebar-toc__list {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.ct20-article-details .ct20-mpu-wrap--in-details {
  max-width: 100%;
}

.ct20-article-details .ct20-mpu .ct20-ad__img {
  width: 100%;
}

.ct20-mpu,
.ct20-mpu-wrap,
.ct20-mpu__unit,
.ct20-mpu .ct20-ad__link,
.ct20-mpu .ct20-ad--mpu {
  background: transparent;
}

.ct20-mpu {
  padding: 0;
  margin: 0;
  line-height: 0;
}

.ct20-mpu__unit,
.ct20-mpu .ct20-ad__link {
  display: block;
  width: 300px;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.ct20-mpu .ct20-ad__img {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 250px;
  object-fit: contain;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.ct20-mpu--mobile .ct20-mpu__unit,
.ct20-mpu--mobile .ct20-ad__link,
.ct20-mpu--mobile .ct20-ad__img {
  margin-left: auto;
  margin-right: auto;
}

/* Homepage featured panel — gap below hero (was -4rem / too tight) */
.ct20-home-featured {
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .ct20-home-featured {
    margin-top: -1.5rem;
  }
}

@media (min-width: 1024px) {
  .ct20-home-featured {
    margin-top: -2rem;
  }
}

/* —— Mobile layout: prevent horizontal scroll —— */

@media (max-width: 1023px) {
  body.single .ct20-single-hero,
  body.single .ct20-single-main {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body.single .ct20-single-main > .max-w-7xl {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ct20-leaderboard-wrap {
    overflow-x: clip;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .ct20-leaderboard-inner,
  .ct20-leaderboard-wrap .ct20-leaderboard,
  .ct20-leaderboard-wrap .ct20-ad--leaderboard,
  .ct20-leaderboard-wrap .ct20-ad__link {
    width: 100%;
    max-width: 100%;
  }

  .ct20-leaderboard-wrap .ct20-ad__img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .ct20-mpu__unit,
  .ct20-mpu .ct20-ad__link,
  .ct20-mpu .ct20-ad__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .ct20-mpu-wrap--sidebar,
  .ct20-mpu-wrap--sidebar-top,
  .ct20-mpu-wrap--in-details,
  .ct20-mpu-wrap--home {
    max-width: 100%;
    width: 100%;
  }

  .ct20-article-details .ct20-mpu .ct20-ad__img {
    height: auto;
    max-height: none;
  }
}
