/* Independent color palette layer. */
body.yan-color-palette-default,
body.yan-color-palette-teal {
  --ast-global-color-0: #0f766e;
  --ast-global-color-1: #115e59;
  --ast-global-color-2: #64748b;
  --ast-global-color-3: #0f172a;
  --ast-global-color-5: #f6fafc;
  --ast-global-color-6: #e2f7f6;
  --ast-border-color: rgba(15, 23, 42, 0.1);
  --yan-bg: radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.12), transparent 28%), linear-gradient(180deg, #f7fbfc 0%, #edf7f8 100%);
  --yan-surface: rgba(255, 255, 255, 0.94);
  --yan-surface-strong: #ffffff;
  --yan-shadow-soft: 0 16px 34px rgba(15, 23, 42, 0.1);
  --yan-shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
  --yan-shadow-control: 0 6px 14px rgba(15, 23, 42, 0.07);
}

body.yan-color-palette-teal {
  --ast-global-color-5: #ecfeff;
  --ast-global-color-6: #cffafe;
  --yan-bg: radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.16), transparent 30%), linear-gradient(180deg, #ecfeff 0%, #f8ffff 100%);
}

body.yan-color-palette-navy {
  --ast-global-color-0: #1e3a8a;
  --ast-global-color-1: #172554;
  --ast-global-color-2: #475569;
  --ast-global-color-3: #0f172a;
  --ast-global-color-5: #eef2f7;
  --ast-global-color-6: #dbe3ee;
  --ast-border-color: rgba(15, 23, 42, 0.14);
  --yan-bg: linear-gradient(180deg, #eef3f9 0%, #e4ebf4 100%);
  --yan-surface: rgba(255, 255, 255, 0.93);
  --yan-surface-strong: #ffffff;
  --yan-shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.11);
  --yan-shadow-card: 0 9px 20px rgba(15, 23, 42, 0.09);
  --yan-shadow-control: 0 6px 14px rgba(15, 23, 42, 0.08);
}

body.yan-color-palette-warm {
  --ast-global-color-0: #c2410c;
  --ast-global-color-1: #9a3412;
  --ast-global-color-2: #786352;
  --ast-global-color-3: #2f1e14;
  --ast-global-color-5: #fff7ed;
  --ast-global-color-6: #fed7aa;
  --ast-border-color: rgba(124, 45, 18, 0.13);
  --yan-bg: radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 30%), linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  --yan-surface: rgba(255, 250, 245, 0.93);
  --yan-surface-strong: #fffaf5;
  --yan-shadow-soft: 0 18px 40px rgba(124, 45, 18, 0.12);
  --yan-shadow-card: 0 12px 28px rgba(124, 45, 18, 0.1);
  --yan-shadow-control: 0 8px 18px rgba(124, 45, 18, 0.08);
}

body.yan-color-palette-mono {
  --ast-global-color-0: #111827;
  --ast-global-color-1: #030712;
  --ast-global-color-2: #4b5563;
  --ast-global-color-3: #111827;
  --ast-global-color-5: #f3f4f6;
  --ast-global-color-6: #e5e7eb;
  --ast-border-color: rgba(17, 24, 39, 0.12);
  --yan-bg: linear-gradient(180deg, #f8fafc 0%, #eef1f5 100%);
  --yan-surface: rgba(255, 255, 255, 0.94);
  --yan-surface-strong: #ffffff;
  --yan-shadow-soft: 0 14px 30px rgba(17, 24, 39, 0.1);
  --yan-shadow-card: 0 9px 20px rgba(17, 24, 39, 0.08);
  --yan-shadow-control: 0 6px 14px rgba(17, 24, 39, 0.07);
}

body.yan-color-palette-fresh {
  --ast-global-color-0: #16a34a;
  --ast-global-color-1: #166534;
  --ast-global-color-2: #52645a;
  --ast-global-color-3: #102018;
  --ast-global-color-5: #f0fdf4;
  --ast-global-color-6: #dcfce7;
  --ast-border-color: rgba(22, 101, 52, 0.13);
  --yan-bg: radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.14), transparent 30%), linear-gradient(180deg, #f0fdf4 0%, #e8f8ee 100%);
  --yan-surface: rgba(255, 255, 255, 0.94);
  --yan-surface-strong: #ffffff;
  --yan-shadow-soft: 0 16px 34px rgba(22, 101, 52, 0.1);
  --yan-shadow-card: 0 10px 24px rgba(22, 101, 52, 0.08);
  --yan-shadow-control: 0 6px 14px rgba(22, 101, 52, 0.07);
}

body[class*="yan-color-palette-"] .ast-primary-header-bar {
  background: color-mix(in srgb, var(--yan-surface-strong) 92%, transparent);
  border-bottom-color: var(--ast-border-color);
}

body[class*="yan-color-palette-"] .yan-home-purpose-card,
body[class*="yan-color-palette-"] .yan-sidebar-card,
body[class*="yan-color-palette-"] .yan-post-card,
body[class*="yan-color-palette-"] .yan-post-list-item,
body[class*="yan-color-palette-"] .yan-blog-category-card,
body[class*="yan-color-palette-"] .yan-blog-note-card,
body[class*="yan-color-palette-"] .yan-reading-note-card,
body[class*="yan-color-palette-"] .yan-reading-related {
  border-color: var(--ast-border-color);
  background: var(--yan-surface);
}

body.yan-color-palette-warm .yan-profile-card {
  background: radial-gradient(circle at top right, rgba(251, 146, 60, 0.18), transparent 36%), linear-gradient(180deg, rgba(255, 250, 245, 0.98) 0%, rgba(255, 237, 213, 0.92) 100%);
}

body.yan-color-palette-navy .yan-profile-card,
body.yan-color-palette-mono .yan-profile-card {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(226, 232, 240, 0.92) 100%);
}

/* Independent font layer. */
body.yan-font-system {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body.yan-font-gothic {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.yan-font-serif {
  font-family: Georgia, "Times New Roman", "AppleMyungjo", "Noto Serif KR", serif;
}

body.yan-font-rounded {
  font-family: "Arial Rounded MT Bold", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.yan-font-compact {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

body.yan-font-serif .site-title,
body.yan-font-serif .entry-title,
body.yan-font-serif .yan-home-purpose-card h1,
body.yan-font-serif .yan-blog-home-section-title,
body.yan-font-serif .yan-post-card .entry-title,
body.yan-font-serif .yan-reading-header .entry-title {
  font-family: Georgia, "Times New Roman", "AppleMyungjo", "Noto Serif KR", serif;
}

body.yan-font-rounded .yan-button,
body.yan-font-rounded .yan-primary-menu a,
body.yan-font-rounded .yan-reading-action {
  border-radius: 999px;
}

body.yan-font-compact .yan-post-card .entry-title,
body.yan-font-compact .yan-post-list-title,
body.yan-font-compact .yan-reading-meta {
  letter-spacing: -0.04em;
}

/* Design layout layer: strong structural rules stay on home/list pages only. */
body.home.yan-design-theme-editorial .yan-site-content-shell,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-site-content-shell {
  padding-top: clamp(12px, 1.6vw, 22px);
}

body.home.yan-design-theme-editorial .yan-layout-shell,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-layout-shell {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: clamp(18px, 2vw, 26px);
}

body.home.yan-design-theme-editorial .yan-blog-home-section-head,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-blog-home-section-head {
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--ast-global-color-3) 24%, transparent);
}

body.home.yan-design-theme-editorial .yan-blog-home-section-head::after,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-blog-home-section-head::after {
  display: none;
}

body.home.yan-design-theme-editorial .yan-blog-home-section-title,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-blog-home-section-title {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ast-global-color-0);
  font-size: clamp(1.42rem, 2.05vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-transform: none;
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-grid,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-grid {
  grid-template-columns: minmax(0, 1.12fr) repeat(2, minmax(0, 0.94fr));
  gap: clamp(14px, 1.6vw, 20px);
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-explore:first-child,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-explore:first-child {
  grid-column: auto;
  grid-row: auto;
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-explore:first-child .entry-title,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-explore:first-child .entry-title {
  font-size: clamp(1.16rem, 1.55vw, 1.42rem);
  -webkit-line-clamp: 2;
}

body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-head,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-results-head {
  align-items: center;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--ast-global-color-3) 24%, transparent);
}

body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-results-kicker,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-results-title {
  color: var(--ast-global-color-0);
  font-size: clamp(1.42rem, 2.05vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-transform: none;
}

body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid {
  grid-template-columns: minmax(0, 1.12fr) repeat(2, minmax(0, 0.94fr));
  gap: clamp(14px, 1.6vw, 20px);
}

body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card:first-child {
  grid-column: auto;
  grid-row: auto;
}

body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card:first-child .entry-title {
  font-size: clamp(1.16rem, 1.55vw, 1.42rem);
  -webkit-line-clamp: 2;
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-feature,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-feature,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card-feature {
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.11);
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-feature .yan-post-card-media,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-feature .yan-post-card-media,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card-feature .yan-post-card-media {
  aspect-ratio: 16 / 8.4;
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-feature .yan-post-card-body,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-feature .yan-post-card-body,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card-feature .yan-post-card-body {
  min-height: 132px;
  padding: clamp(15px, 1.5vw, 20px);
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-feature .entry-title,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-feature .entry-title,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card-feature .entry-title {
  min-height: auto;
  max-height: calc(1em * 1.18 * 2);
  font-size: clamp(1.06rem, 1.36vw, 1.3rem);
  line-height: 1.18;
  -webkit-line-clamp: 2;
}

body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-feature:first-child .entry-title,
body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-feature:first-child .entry-title,
body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card-feature:first-child .entry-title {
  font-size: clamp(1.16rem, 1.55vw, 1.42rem);
}

body.home.yan-design-theme-clean .yan-site-content-shell,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-site-content-shell {
  padding-top: clamp(22px, 3vw, 40px);
}

body.home.yan-design-theme-clean .yan-layout-shell,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-layout-shell {
  grid-template-columns: minmax(230px, 280px) minmax(0, 820px);
  justify-content: center;
  gap: clamp(28px, 4vw, 56px);
}

body.home.yan-design-theme-clean .yan-blog-home,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-blog-home {
  gap: clamp(26px, 4vw, 46px);
}

body.home.yan-design-theme-clean .yan-blog-home-section-head,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-blog-home-section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
}

body.home.yan-design-theme-clean .yan-blog-home-section-head::after,
body.home.yan-design-theme-clean .yan-blog-home-section-title::before,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-blog-home-section-head::after,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-blog-home-section-title::before {
  display: none;
}

body.home.yan-design-theme-clean .yan-blog-home-section-title,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-blog-home-section-title {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.48rem, 2.2vw, 2.05rem);
}

body.home.yan-design-theme-clean .yan-home-featured-guides .yan-post-grid,
body.home.yan-design-theme-clean .yan-home-latest-posts .yan-post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-featured-head,
body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-results-head {
  gap: 6px;
  margin-bottom: 0;
  padding: 0;
  border: 0;
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-results-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-results-title {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.48rem, 2.2vw, 2.05rem);
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-featured-head .yan-discovery-results-kicker {
  font-size: clamp(1.24rem, 1.9vw, 1.52rem);
  letter-spacing: -0.03em;
  text-transform: none;
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-results-kicker.is-list-label {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  letter-spacing: -0.03em;
  text-transform: none;
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-results-subcopy {
  font-size: 0.98rem;
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-featured-grid .entry-title {
  font-size: clamp(1.08rem, 1.75vw, 1.34rem);
  line-height: 1.16;
}

body.home.yan-design-theme-professional .yan-site-content-shell,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-site-content-shell {
  padding-top: clamp(14px, 2vw, 26px);
}

body.home.yan-design-theme-professional .yan-layout-shell,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-layout-shell {
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

body.home.yan-design-theme-professional .yan-blog-home-section-head,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-blog-home-section-head {
  margin-bottom: 4px;
  padding: 10px 12px;
  border: 1px solid var(--ast-border-color);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
}

body.home.yan-design-theme-professional .yan-blog-home-section-head::after,
body.home.yan-design-theme-professional .yan-blog-home-section-title::before,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-blog-home-section-head::after,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-blog-home-section-title::before {
  display: none;
}

body.home.yan-design-theme-professional .yan-blog-home-section-title,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-blog-home-section-title {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.18rem, 1.6vw, 1.42rem);
  letter-spacing: -0.02em;
}

body.home.yan-design-theme-professional .yan-home-featured-guides .yan-post-grid,
body.home.yan-design-theme-professional .yan-home-latest-posts .yan-post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-featured-head,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-results-head {
  margin-bottom: 4px;
  padding: 10px 12px;
  border: 1px solid var(--ast-border-color);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
}

body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-results-kicker,
body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-results-title {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.18rem, 1.6vw, 1.42rem);
  letter-spacing: -0.02em;
}

body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.home.yan-design-theme-warm .yan-site-content-shell,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-site-content-shell {
  padding-top: clamp(8px, 1.3vw, 18px);
}

body.home.yan-design-theme-warm .yan-layout-shell,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-layout-shell {
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
}

body.home.yan-design-theme-warm .yan-blog-home,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-blog-home {
  gap: clamp(18px, 2.4vw, 28px);
}

body.home.yan-design-theme-warm .yan-blog-home-section-head,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-blog-home-section-head {
  justify-content: space-between;
  padding: 4px 8px 4px 0;
}

body.home.yan-design-theme-warm .yan-blog-home-section-head::after,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-blog-home-section-head::after {
  height: 10px;
  min-width: 120px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(194, 65, 12, 0.2) 0%, rgba(251, 146, 60, 0.04) 100%);
}

body.home.yan-design-theme-warm .yan-blog-home-section-title,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-blog-home-section-title {
  padding: 10px 16px;
  border-color: rgba(194, 65, 12, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.92);
  box-shadow: 0 10px 22px rgba(124, 45, 18, 0.08);
}

body.home.yan-design-theme-warm .yan-home-featured-guides .yan-post-grid,
body.home.yan-design-theme-warm .yan-home-latest-posts .yan-post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 22px);
}

body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-featured-head,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-results-head {
  justify-content: space-between;
  padding: 0 6px 0 0;
}

body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-results-kicker,
body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-results-title {
  padding: 8px 14px;
  border: 1px solid rgba(194, 65, 12, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.92);
  box-shadow: 0 10px 22px rgba(124, 45, 18, 0.08);
}

body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-featured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 22px);
}

/* Card variants are emitted only by home/list renderers. */
body.yan-card-feature .yan-post-card-feature {
  border-width: 2px;
  box-shadow: 0 24px 52px rgba(20, 16, 11, 0.18);
}

body.yan-card-feature .yan-post-card-feature .yan-post-card-media {
  aspect-ratio: 16 / 10.6;
}

body.yan-card-feature .yan-post-card-feature .entry-title {
  font-size: clamp(1.55rem, 2.5vw, 2.45rem);
}

body.yan-card-minimal .yan-post-card-minimal,
body.yan-card-minimal .yan-post-list-item-minimal {
  border-color: rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

body.yan-card-minimal .yan-post-card-minimal .yan-post-card-media {
  aspect-ratio: 16 / 7.8;
  opacity: 0.82;
}

body.yan-card-dense .yan-post-card-dense,
body.yan-card-dense .yan-post-list-item-dense {
  border-radius: 10px;
}

body.yan-card-dense .yan-post-card-dense .yan-post-card-body {
  min-height: 104px;
  padding: 13px 14px;
}

body.yan-card-soft .yan-post-card-soft,
body.yan-card-soft .yan-post-list-item-soft {
  border-color: rgba(194, 65, 12, 0.14);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.98) 0%, rgba(255, 247, 237, 0.94) 100%);
}

body.yan-card-soft .yan-post-card-soft .yan-post-card-media {
  aspect-ratio: 4 / 3.15;
}

body.yan-card-soft .yan-post-list-item-soft .yan-post-list-media {
  border-radius: 24px;
}

body.home .yan-home-discovery-shell,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell {
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--ast-global-color-0) 7%, transparent), transparent 34%),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--yan-surface) 86%, var(--ast-global-color-5) 14%) 0%,
      color-mix(in srgb, var(--yan-surface) 92%, var(--ast-global-color-6) 8%) 100%
    );
  border-color: color-mix(in srgb, var(--ast-global-color-0) 18%, var(--ast-border-color));
}

body.home .yan-home-discovery-shell .yan-post-card,
body.home .yan-home-discovery-shell .yan-post-list-item,
body.home .yan-home-discovery-shell .yan-blog-note-card,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-post-card,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-post-list-item,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-blog-note-card {
  background:
    linear-gradient(
      180deg,
      var(--yan-surface-strong) 0%,
      color-mix(in srgb, var(--yan-surface-strong) 78%, var(--ast-global-color-5) 22%) 100%
    );
  border-color: color-mix(in srgb, var(--ast-global-color-0) 20%, var(--ast-border-color));
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.11),
    0 0 0 1px rgba(255, 255, 255, 0.78) inset;
}

body.home .yan-home-discovery-shell .yan-post-card:hover,
body.home .yan-home-discovery-shell .yan-post-card:focus-within,
body.home .yan-home-discovery-shell .yan-post-list-item:hover,
body.home .yan-home-discovery-shell .yan-post-list-item:focus-within,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-post-card:hover,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-post-card:focus-within,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-post-list-item:hover,
body.yan-blog-discovery-page:not(.single-post) .yan-article-shell .yan-post-list-item:focus-within {
  border-color: color-mix(in srgb, var(--ast-global-color-0) 32%, var(--ast-border-color));
  box-shadow:
    0 22px 44px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.82) inset;
}

body.yan-density-bold .yan-discovery-featured-grid .yan-post-card:first-child {
  grid-column: span 2;
}

body.yan-density-relaxed .yan-post-list {
  gap: 18px;
}

body.yan-density-relaxed .yan-post-list-link {
  grid-template-columns: 168px minmax(0, 1fr);
}

body.yan-density-compact .yan-post-list {
  gap: 10px;
}

body.yan-density-compact .yan-post-list-link {
  grid-template-columns: 160px minmax(0, 1fr);
}

body.yan-density-airy .yan-post-list {
  gap: 18px;
}

body.yan-density-airy .yan-post-list-link {
  grid-template-columns: 196px minmax(0, 1fr);
}

body.yan-design-theme-editorial .yan-post-card-eyebrow {
  border-radius: 4px;
  background: var(--ast-global-color-3);
  color: var(--yan-surface-strong);
}

body.yan-design-theme-clean .yan-post-card-eyebrow {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ast-global-color-0);
}

body.yan-design-theme-professional .yan-post-card-eyebrow {
  min-height: 24px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ast-global-color-0) 9%, transparent);
  font-size: 0.68rem;
}

body.yan-design-theme-warm .yan-post-card-eyebrow {
  border-color: rgba(194, 65, 12, 0.16);
  background: rgba(255, 237, 213, 0.74);
  color: #9a3412;
}

/* Single post safety: layout presets must not squeeze author/support content. */
body.single-post .yan-layout-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.single-post .yan-reading-author-card {
  overflow: hidden;
}

body.single-post .yan-reading-author-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

body.single-post .yan-reading-author-media {
  flex: 0 0 72px;
}

body.single-post .yan-reading-author-intro {
  flex: 1 1 170px;
  min-width: 170px;
  max-width: 100%;
}

body.single-post .yan-reading-author-points {
  flex: 2 1 260px;
  min-width: min(260px, 100%);
  margin-right: 0;
}

body.single-post .yan-reading-author-role-line,
body.single-post .yan-reading-author-chip {
  word-break: keep-all;
  overflow-wrap: normal;
}

body.single-post .yan-reading-author-inline-action {
  flex: 0 1 198px;
  width: 198px;
  min-width: min(198px, 100%);
  max-width: 100%;
  margin-left: auto;
}

body.single-post .yan-reading-author-inline-action .yan-button {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 921px) {
  body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-grid,
  body.home.yan-design-theme-clean .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-clean .yan-home-latest-posts .yan-post-grid,
  body.home.yan-design-theme-professional .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-professional .yan-home-latest-posts .yan-post-grid,
  body.home.yan-design-theme-warm .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-warm .yan-home-latest-posts .yan-post-grid,
  body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid,
  body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-featured-grid,
  body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-featured-grid,
  body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card:first-child {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-grid,
  body.home.yan-design-theme-clean .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-clean .yan-home-latest-posts .yan-post-grid,
  body.home.yan-design-theme-professional .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-professional .yan-home-latest-posts .yan-post-grid,
  body.home.yan-design-theme-warm .yan-home-featured-guides .yan-post-grid,
  body.home.yan-design-theme-warm .yan-home-latest-posts .yan-post-grid,
  body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid,
  body.yan-blog-discovery-page.yan-design-theme-clean:not(.single-post) .yan-discovery-featured-grid,
  body.yan-blog-discovery-page.yan-design-theme-professional:not(.single-post) .yan-discovery-featured-grid,
  body.yan-blog-discovery-page.yan-design-theme-warm:not(.single-post) .yan-discovery-featured-grid {
    grid-template-columns: 1fr;
  }

  body.home.yan-design-theme-editorial .yan-home-featured-guides .yan-post-card-explore:first-child,
  body.home.yan-design-theme-editorial .yan-home-latest-posts .yan-post-card-explore:first-child,
  body.yan-blog-discovery-page.yan-design-theme-editorial:not(.single-post) .yan-discovery-featured-grid .yan-post-card:first-child {
    grid-row: auto;
  }

  body.single-post .yan-reading-author-intro,
  body.single-post .yan-reading-author-points,
  body.single-post .yan-reading-author-inline-action {
    flex-basis: 100%;
    width: 100%;
  }

  body.single-post .yan-reading-author-inline-action {
    margin-left: 0;
  }
}
