
/**
 * Newdawn Journal V2 v2.1.1
 * Scoped to body classes added by the plugin.
 */

:root {
  --ndje-frame-width: 1120px;
  --ndje-reading-width: 900px;
  --ndje-opening-ratio: 3;
  --ndje-page-bg: #413470;
  --ndje-surface: #03182a;
  --ndje-surface-soft: #071f34;
  --ndje-text: #f2effa;
  --ndje-muted: #bdb7cb;
  --ndje-accent: #a989ff;
  --ndje-accent-strong: #7f47ff;
  --ndje-line: rgba(232, 228, 247, .12);
  --ndje-shadow: 0 26px 70px rgba(5, 5, 18, .28);
}

/* Shared background and width cleanup */
body.ndje-single-enabled,
body.ndje-archive-enabled {
  background: var(--ndje-page-bg);
}

body.ndje-single-enabled .site,
body.ndje-single-enabled .x-site,
body.ndje-single-enabled .x-main,
body.ndje-single-enabled .x-container,
body.ndje-single-enabled .entry-wrap,
body.ndje-single-enabled .entry-content,
body.ndje-archive-enabled .site,
body.ndje-archive-enabled .x-site,
body.ndje-archive-enabled .x-main,
body.ndje-archive-enabled .x-container {
  max-width: none;
}

/* Remove bright page rails from theme containers, without affecting content images */
body.ndje-single-enabled .entry-wrap,
body.ndje-single-enabled article.post,
body.ndje-single-enabled .single-post article,
body.ndje-single-enabled .x-main > article {
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none;
}

/* SINGLE POST — frame */
body.ndje-single-enabled article.post,
body.ndje-single-enabled .single-post article,
body.ndje-single-enabled .x-main > article,
body.ndje-single-enabled main article {
  width: min(calc(100% - 32px), var(--ndje-frame-width));
  margin: 36px auto 72px;
  background: var(--ndje-surface);
  color: var(--ndje-text);
  border-radius: 0;
  box-shadow: var(--ndje-shadow);
  overflow: hidden;
}

/* Inner wrapper */
body.ndje-single-enabled .entry-wrap,
body.ndje-single-enabled .entry-content,
body.ndje-single-enabled .x-main article > .entry-wrap {
  background: transparent !important;
}

/* Header hierarchy */
body.ndje-single-enabled .entry-header,
body.ndje-single-enabled header.entry-header,
body.ndje-single-enabled .post-header,
body.ndje-single-enabled .x-main article > header {
  padding: clamp(54px, 7vw, 104px) clamp(28px, 7vw, 84px) 42px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(131, 26, 130, .12), transparent 46%),
    linear-gradient(180deg, rgba(3, 24, 42, .98), rgba(3, 24, 42, 1));
}

body.ndje-single-enabled .entry-title,
body.ndje-single-enabled h1.entry-title,
body.ndje-single-enabled article h1 {
  max-width: 980px;
  margin: 26px auto 22px !important;
  color: var(--ndje-text) !important;
  font-size: clamp(2.15rem, 4vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: none !important;
}

body.ndje-single-enabled .entry-header .p-meta,
body.ndje-single-enabled .entry-header .entry-meta,
body.ndje-single-enabled .entry-header .meta,
body.ndje-single-enabled .post-meta {
  color: var(--ndje-muted) !important;
  font-size: .95rem;
  letter-spacing: .02em;
}

/* Category label */
body.ndje-single-enabled .entry-header .entry-categories,
body.ndje-single-enabled .entry-header .cat-links,
body.ndje-single-enabled .entry-header .category,
body.ndje-single-enabled .entry-header [rel="category tag"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d7cee8 !important;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
}

/* OPENING SCENE — full width within the article frame, cinematic height */
body.ndje-single-enabled .entry-featured,
body.ndje-single-enabled .post-thumbnail,
body.ndje-single-enabled figure.wp-block-post-featured-image,
body.ndje-single-enabled .entry-thumb {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 clamp(46px, 6vw, 78px) !important;
  border-radius: 0 !important;
  overflow: hidden;
  background: #071426;
  box-shadow:
    0 24px 65px rgba(0, 0, 0, .30),
    inset 0 1px rgba(255,255,255,.04);
}

body.ndje-single-enabled .entry-featured img,
body.ndje-single-enabled .post-thumbnail img,
body.ndje-single-enabled figure.wp-block-post-featured-image img,
body.ndje-single-enabled .entry-thumb img {
  display: block;
  width: 100% !important;
  height: auto;
  aspect-ratio: var(--ndje-opening-ratio) / 1;
  object-fit: cover;
  object-position: center;
}

/* Reading column */
body.ndje-single-enabled .entry-content,
body.ndje-single-enabled .post-content,
body.ndje-single-enabled .x-main article .entry-content {
  width: min(calc(100% - 48px), var(--ndje-reading-width));
  margin: 0 auto;
  padding: 0 0 72px;
  color: var(--ndje-text);
  font-size: clamp(1.06rem, 1.15vw, 1.23rem);
  line-height: 1.78;
}

body.ndje-single-enabled .entry-content p {
  margin: 0 0 1.55em;
}

body.ndje-single-enabled .entry-content h2,
body.ndje-single-enabled .entry-content h3,
body.ndje-single-enabled .entry-content h4 {
  color: var(--ndje-text);
  line-height: 1.18;
  margin-top: 2.1em;
  margin-bottom: .75em;
  text-wrap: balance;
}

body.ndje-single-enabled .entry-content h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.7rem);
}

body.ndje-single-enabled .entry-content h3 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

body.ndje-single-enabled .entry-content a {
  color: #c5afff;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.ndje-single-enabled .entry-content blockquote {
  margin: 2.6em 0;
  padding: 1.35em 1.5em 1.35em 1.8em;
  color: #eee9fb;
  background: rgba(122, 105, 222, .10);
  border-left: 4px solid var(--ndje-accent);
  border-radius: 0 14px 14px 0;
  font-size: 1.15em;
}

body.ndje-single-enabled .entry-content ul,
body.ndje-single-enabled .entry-content ol {
  padding-left: 1.35em;
  margin-bottom: 1.7em;
}

body.ndje-single-enabled .entry-content hr {
  border: 0;
  border-top: 1px solid var(--ndje-line);
  margin: 3.2em 0;
}

/* Executive summary / takeaway styling when headings already exist */
body.ndje-single-enabled .entry-content h2:first-child,
body.ndje-single-enabled .entry-content h2.ndje-summary-title,
body.ndje-single-enabled .entry-content h2.ndje-takeaways-title {
  position: relative;
}

body.ndje-single-enabled .entry-content .ndje-summary,
body.ndje-single-enabled .entry-content .ndje-takeaways {
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(82, 11, 241, .10), rgba(131, 26, 130, .08));
  border: 1px solid rgba(169, 137, 255, .22);
  border-radius: 18px;
}

/* Hide clutter inside article header where theme duplicates navigation */
body.ndje-single-enabled .entry-header a[href*="/blog/"],
body.ndje-single-enabled .entry-header .back-to-blog,
body.ndje-single-enabled .entry-header .return-to-blog {
  color: var(--ndje-muted);
}

/* ARCHIVE / BLOG */
body.ndje-archive-enabled .x-main,
body.ndje-archive-enabled main,
body.ndje-archive-enabled .site-main {
  width: min(calc(100% - 34px), 1410px);
  margin-left: auto;
  margin-right: auto;
}

body.ndje-archive-enabled .entry-wrap,
body.ndje-archive-enabled article.post,
body.ndje-archive-enabled .post,
body.ndje-archive-enabled .x-iso-container > article {
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Common card/grid systems */
body.ndje-archive-enabled .x-iso-container,
body.ndje-archive-enabled .posts-list,
body.ndje-archive-enabled .blog-grid,
body.ndje-archive-enabled .post-grid,
body.ndje-archive-enabled .wp-block-post-template {
  gap: 28px !important;
}

body.ndje-archive-enabled article.post,
body.ndje-archive-enabled .x-iso-container > article,
body.ndje-archive-enabled .wp-block-post {
  overflow: hidden;
  border-radius: 18px;
  background: var(--ndje-surface);
  box-shadow: 0 18px 45px rgba(10, 6, 30, .20);
  transition: transform .28s ease, box-shadow .28s ease;
}

body.ndje-archive-enabled article.post:hover,
body.ndje-archive-enabled .x-iso-container > article:hover,
body.ndje-archive-enabled .wp-block-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 58px rgba(10, 6, 30, .30);
}

body.ndje-archive-enabled .entry-featured,
body.ndje-archive-enabled .entry-thumb,
body.ndje-archive-enabled .post-thumbnail {
  position: relative;
  overflow: hidden;
  margin: 0 !important;
  border-radius: 0;
}

body.ndje-archive-enabled .entry-featured img,
body.ndje-archive-enabled .entry-thumb img,
body.ndje-archive-enabled .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .5s ease;
}

body.ndje-archive-enabled article:hover .entry-featured img,
body.ndje-archive-enabled article:hover .entry-thumb img,
body.ndje-archive-enabled article:hover .post-thumbnail img {
  transform: scale(1.025);
}

/* Reduce card overlay clutter; title remains readable */
body.ndje-archive-enabled .entry-cover,
body.ndje-archive-enabled .entry-featured .entry-wrap,
body.ndje-archive-enabled .entry-thumb .entry-wrap,
body.ndje-archive-enabled .post-thumbnail .entry-wrap {
  background: linear-gradient(180deg, transparent 36%, rgba(3, 24, 42, .92) 100%) !important;
}

body.ndje-archive-enabled .entry-header,
body.ndje-archive-enabled .entry-wrap,
body.ndje-archive-enabled .post-content {
  padding: 22px 24px 26px;
  color: var(--ndje-text);
}

body.ndje-archive-enabled .entry-title,
body.ndje-archive-enabled h2.entry-title,
body.ndje-archive-enabled .post-title {
  color: var(--ndje-text) !important;
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1.13;
  margin: 0 0 12px;
  text-wrap: balance;
  text-shadow: none !important;
}

body.ndje-archive-enabled .entry-title a,
body.ndje-archive-enabled .post-title a {
  color: inherit !important;
  text-decoration: none;
}

body.ndje-archive-enabled .p-meta,
body.ndje-archive-enabled .entry-meta,
body.ndje-archive-enabled .post-meta {
  color: var(--ndje-muted) !important;
  font-size: .82rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.ndje-archive-enabled .entry-content.excerpt,
body.ndje-archive-enabled .entry-excerpt,
body.ndje-archive-enabled .post-excerpt {
  color: #d2ccdc;
  line-height: 1.55;
}

/* Exact placeholder class added by JS */
body.ndje-archive-enabled .ndje-placeholder-hidden {
  display: none !important;
}

/* Mobile */
@media (max-width: 767px) {
  body.ndje-single-enabled article.post,
  body.ndje-single-enabled .single-post article,
  body.ndje-single-enabled .x-main > article,
  body.ndje-single-enabled main article {
    width: calc(100% - 18px);
    margin-top: 14px;
  }

  body.ndje-single-enabled .entry-header,
  body.ndje-single-enabled header.entry-header {
    padding: 50px 20px 32px;
  }

  body.ndje-single-enabled .entry-featured,
  body.ndje-single-enabled .post-thumbnail,
  body.ndje-single-enabled .entry-thumb {
    width: calc(100% - 22px);
    margin-bottom: 34px;
    border-radius: 14px;
  }

  body.ndje-single-enabled .entry-content,
  body.ndje-single-enabled .post-content {
    width: calc(100% - 36px);
    font-size: 1.04rem;
    line-height: 1.72;
  }
}


/* ============================================================
 * v1.0.1 — Pro / Ethos calibration
 * Exact structure confirmed on NewdawnBlog.com:
 * body.single-post > main.x-layout-single > article.hentry
 * ============================================================ */
body.ndje-single-enabled main.x-layout-single {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 34px clamp(14px, 3vw, 48px) 76px !important;
  background: var(--ndje-page-bg) !important;
  box-sizing: border-box;
}

body.ndje-single-enabled main.x-layout-single > article.hentry,
body.ndje-single-enabled main.x-layout-single > article.post {
  display: block !important;
  float: none !important;
  width: min(100%, var(--ndje-frame-width)) !important;
  max-width: var(--ndje-frame-width) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: var(--ndje-surface) !important;
  border: 0 !important;
  box-shadow: var(--ndje-shadow) !important;
  overflow: hidden !important;
}

body.ndje-single-enabled main.x-layout-single > article.hentry > .entry-wrap,
body.ndje-single-enabled main.x-layout-single > article.post > .entry-wrap {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Remove Ethos white gutters generated around the single-post content. */
body.ndje-single-enabled main.x-layout-single::before,
body.ndje-single-enabled main.x-layout-single::after,
body.ndje-single-enabled main.x-layout-single > article.hentry::before,
body.ndje-single-enabled main.x-layout-single > article.hentry::after {
  display: none !important;
  content: none !important;
}

/* Exact title/header area inside the calibrated article. */
body.ndje-single-enabled main.x-layout-single > article.hentry .entry-header {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}

body.ndje-single-enabled main.x-layout-single > article.hentry .entry-title {
  color: var(--ndje-text) !important;
}

/* Keep large imagery expansive while text remains readable. */
body.ndje-single-enabled main.x-layout-single > article.hentry .entry-featured,
body.ndje-single-enabled main.x-layout-single > article.hentry .post-thumbnail,
body.ndje-single-enabled main.x-layout-single > article.hentry .entry-thumb {
  width: calc(100% - clamp(32px, 5vw, 72px)) !important;
  max-width: none !important;
}

body.ndje-single-enabled main.x-layout-single > article.hentry .entry-content {
  width: min(calc(100% - 44px), var(--ndje-reading-width)) !important;
  max-width: var(--ndje-reading-width) !important;
}

/* Ethos breadcrumb/header spacing: preserve navigation, reduce dead space. */
body.ndje-single-enabled .x-breadcrumb-wrap,
body.ndje-single-enabled .x-breadcrumbs-wrap {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

@media (max-width: 767px) {
  body.ndje-single-enabled main.x-layout-single {
    padding: 12px 9px 42px !important;
  }

  body.ndje-single-enabled main.x-layout-single > article.hentry,
  body.ndje-single-enabled main.x-layout-single > article.post {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* ==========================================================
   NEWDAWN JOURNAL V2 — PHASES 1–4
   Reading Experience · Header · Typography · Opening Scene
   ========================================================== */

/* Ethos confirmed structure */
body.ndje-single-enabled main.x-layout-single,
body.ndje-single-enabled .x-layout-single,
body.ndje-single-enabled .x-main.x-layout-single {
  width: 100% !important;
  max-width: none !important;
  padding-left: clamp(12px, 2vw, 28px) !important;
  padding-right: clamp(12px, 2vw, 28px) !important;
}

body.ndje-single-enabled main.x-layout-single > article.hentry,
body.ndje-single-enabled .x-layout-single > article.hentry {
  width: min(100%, var(--ndje-frame-width)) !important;
  max-width: var(--ndje-frame-width) !important;
  margin: clamp(18px, 3vw, 38px) auto 78px !important;
}

/* Compact Pro/Ethos masthead on journal pages */
body.ndje-compact-header .masthead,
body.ndje-compact-header .x-masthead,
body.ndje-compact-header header.masthead {
  min-height: 0 !important;
}

body.ndje-compact-header .x-logobar,
body.ndje-compact-header .x-navbar,
body.ndje-compact-header .e-header,
body.ndje-compact-header .x-bar {
  min-height: 0 !important;
}

body.ndje-compact-header .x-logobar-inner {
  padding-top: clamp(10px, 1.4vw, 18px) !important;
  padding-bottom: clamp(8px, 1.2vw, 15px) !important;
}

body.ndje-compact-header .x-navbar-inner {
  min-height: 50px !important;
}

body.ndje-compact-header .x-brand img,
body.ndje-compact-header .x-logobar img {
  max-height: clamp(56px, 7vw, 92px) !important;
  width: auto !important;
}

body.ndje-compact-header .x-breadcrumb-wrap {
  margin: 0 !important;
  padding: 9px clamp(18px, 4vw, 52px) !important;
  min-height: 0 !important;
  line-height: 1.35 !important;
}

body.ndje-compact-header .x-breadcrumbs {
  margin: 0 !important;
  font-size: .78rem !important;
  opacity: .78;
}

/* Article opening: less empty height, stronger hierarchy */
body.ndje-single-enabled .entry-header,
body.ndje-single-enabled header.entry-header,
body.ndje-single-enabled .post-header,
body.ndje-single-enabled .x-main article > header {
  padding: clamp(38px, 5vw, 72px) clamp(24px, 6vw, 74px) clamp(30px, 3.5vw, 44px) !important;
}

body.ndje-single-enabled .entry-title,
body.ndje-single-enabled h1.entry-title,
body.ndje-single-enabled article h1 {
  max-width: 1040px !important;
  margin-top: 18px !important;
  margin-bottom: 17px !important;
  font-family: "Orbitron", "Ailerons", "Lato", sans-serif;
  font-size: clamp(2rem, 3.75vw, 4.25rem) !important;
  font-weight: 500;
  line-height: 1.08 !important;
  letter-spacing: -.018em !important;
}

/* Article typography: automated, broad but comfortable */
body.ndje-single-enabled .entry-content,
body.ndje-single-enabled .post-content,
body.ndje-single-enabled .x-main article .entry-content {
  width: min(calc(100% - 48px), var(--ndje-reading-width)) !important;
  max-width: var(--ndje-reading-width) !important;
  font-family: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.08rem, 1.05vw, 1.22rem) !important;
  line-height: 1.82 !important;
  letter-spacing: .006em;
}

body.ndje-single-enabled .entry-content > p:first-of-type {
  font-size: 1.08em;
  line-height: 1.76;
  color: #f0edf8;
}

body.ndje-single-enabled .entry-content h2 {
  font-family: "Orbitron", "Ailerons", "Lato", sans-serif;
  font-weight: 500;
  letter-spacing: -.012em;
}

body.ndje-single-enabled .entry-content h3,
body.ndje-single-enabled .entry-content h4 {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  letter-spacing: .005em;
}

body.ndje-single-enabled .entry-content img:not(.avatar) {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 2.2em;
  margin-bottom: 2.2em;
  border-radius: 10px;
}

/* Do not force article text into newspaper columns */
body.ndje-single-enabled .entry-content,
body.ndje-single-enabled .post-content {
  columns: auto !important;
  column-count: 1 !important;
}

/* Mobile opening scene: less extreme crop */
@media (max-width: 767px) {
  body.ndje-single-enabled .entry-featured img,
  body.ndje-single-enabled .post-thumbnail img,
  body.ndje-single-enabled figure.wp-block-post-featured-image img,
  body.ndje-single-enabled .entry-thumb img {
    aspect-ratio: 16 / 8.5;
  }

  body.ndje-compact-header .x-brand img,
  body.ndje-compact-header .x-logobar img {
    max-height: 62px !important;
  }
}


:root {
  --ndje-frame-width: 1080px;
  --ndje-reading-width: 860px;
}

body.ndje-single-enabled.single-post article.hentry > .entry-header,
body.ndje-single-enabled.single-post article.hentry header.entry-header,
body.ndje-single-enabled.single-post .x-main article.hentry > header,
body.ndje-single-enabled.single-post .x-main article > .entry-header {
  position: relative !important;
  isolation: isolate;
  min-height: clamp(330px, 34vw, 430px) !important;
  padding: clamp(54px, 7vw, 88px) clamp(28px, 6vw, 72px) !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #061426 !important;
  background-image:
    linear-gradient(rgba(4, 10, 24, .42), rgba(4, 10, 24, .52)),
    var(--ndje-opening-scene-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.ndje-single-enabled.single-post article.hentry > .entry-header::after,
body.ndje-single-enabled.single-post article.hentry header.entry-header::after,
body.ndje-single-enabled.single-post .x-main article.hentry > header::after,
body.ndje-single-enabled.single-post .x-main article > .entry-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 8, 42, .08), rgba(4, 9, 22, .28)),
    radial-gradient(circle at 50% 45%, transparent 20%, rgba(2, 6, 18, .24) 100%);
  pointer-events: none;
}

body.ndje-single-enabled.single-post article.hentry > .entry-header > *,
body.ndje-single-enabled.single-post article.hentry header.entry-header > *,
body.ndje-single-enabled.single-post .x-main article.hentry > header > *,
body.ndje-single-enabled.single-post .x-main article > .entry-header > * {
  position: relative;
  z-index: 1;
}

body.ndje-single-enabled.single-post .entry-header .entry-title,
body.ndje-single-enabled.single-post .entry-header h1,
body.ndje-single-enabled.single-post article.hentry > header h1 {
  width: min(100%, 920px) !important;
  max-width: 920px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  color: #f5f2fb !important;
  text-shadow: 0 3px 22px rgba(0,0,0,.58);
  font-size: clamp(2.1rem, 4.5vw, 4.6rem) !important;
  line-height: 1.05 !important;
}

body.ndje-single-enabled.single-post .entry-header .p-meta,
body.ndje-single-enabled.single-post .entry-header .entry-meta,
body.ndje-single-enabled.single-post .entry-header a {
  color: rgba(245, 242, 251, .86) !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.65);
}

body.ndje-single-enabled.single-post article.hentry > .entry-featured,
body.ndje-single-enabled.single-post article.hentry > .post-thumbnail,
body.ndje-single-enabled.single-post article.hentry > figure.wp-block-post-featured-image {
  display: none !important;
}

body.ndje-single-enabled.single-post main.x-layout-single > article.hentry,
body.ndje-single-enabled.single-post .x-layout-single > article.hentry {
  width: min(calc(100% - 32px), var(--ndje-frame-width)) !important;
  max-width: var(--ndje-frame-width) !important;
}

@media (max-width: 767px) {
  body.ndje-single-enabled.single-post article.hentry > .entry-header,
  body.ndje-single-enabled.single-post article.hentry header.entry-header,
  body.ndje-single-enabled.single-post .x-main article.hentry > header,
  body.ndje-single-enabled.single-post .x-main article > .entry-header {
    min-height: 300px !important;
    padding: 44px 22px !important;
  }
}


/* ==========================================================
   NEWDAWN JOURNAL V2.2 — CANONICAL OPENING SCENE
   ========================================================== */
:root {
  --ndje-frame-width: 1080px;
  --ndje-reading-width: 860px;
  --ndje-hero-height: 410px;
  --ndje-overlay: .42;
  --ndje-opening-image: none;
}

body.ndje-opening-scene-enabled main.x-layout-single,
body.ndje-opening-scene-enabled .x-layout-single,
body.ndje-opening-scene-enabled .x-main.x-layout-single {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(10px, 2vw, 26px) !important;
}

body.ndje-opening-scene-enabled main.x-layout-single > article.hentry,
body.ndje-opening-scene-enabled .x-layout-single > article.hentry,
body.ndje-opening-scene-enabled main article.hentry {
  width: min(calc(100% - 20px), var(--ndje-frame-width)) !important;
  max-width: var(--ndje-frame-width) !important;
  margin: clamp(18px, 3vw, 38px) auto 78px !important;
  overflow: hidden;
  background: #03182a;
}

/* Existing Ethos title header becomes the image-led Opening Scene. */
body.ndje-opening-scene-enabled article.hentry > .entry-header,
body.ndje-opening-scene-enabled article.hentry > header.entry-header,
body.ndje-opening-scene-enabled .x-main article.hentry > header,
body.ndje-opening-scene-enabled .x-main article > .entry-header,
body.ndje-opening-scene-enabled .entry-wrap > .entry-header {
  position: relative !important;
  isolation: isolate;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: var(--ndje-hero-height) !important;
  padding: clamp(48px, 7vw, 84px) clamp(24px, 6vw, 70px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden !important;
  background-color: #061426 !important;
  background-image:
    linear-gradient(rgba(2, 7, 20, var(--ndje-overlay)), rgba(2, 7, 20, var(--ndje-overlay))),
    var(--ndje-opening-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  border: 0 !important;
  box-shadow: inset 0 -90px 110px rgba(1,4,14,.16) !important;
}

body.ndje-opening-scene-enabled article.hentry > .entry-header > *,
body.ndje-opening-scene-enabled article.hentry > header.entry-header > *,
body.ndje-opening-scene-enabled .x-main article.hentry > header > *,
body.ndje-opening-scene-enabled .x-main article > .entry-header > * {
  position: relative;
  z-index: 1;
}

body.ndje-opening-scene-enabled .entry-header .entry-title,
body.ndje-opening-scene-enabled .entry-header h1,
body.ndje-opening-scene-enabled article.hentry > header h1 {
  width: min(100%, 940px) !important;
  max-width: 940px !important;
  margin: 20px auto 18px !important;
  color: #f7f3ff !important;
  font-family: "Orbitron", "Ailerons", "Lato", sans-serif !important;
  font-size: clamp(2.1rem, 4.2vw, 4.35rem) !important;
  font-weight: 500 !important;
  line-height: 1.06 !important;
  letter-spacing: -.018em !important;
  text-wrap: balance;
  text-shadow: 0 3px 24px rgba(0,0,0,.72) !important;
}

body.ndje-opening-scene-enabled .entry-header .p-meta,
body.ndje-opening-scene-enabled .entry-header .entry-meta,
body.ndje-opening-scene-enabled .entry-header .meta,
body.ndje-opening-scene-enabled .entry-header a,
body.ndje-opening-scene-enabled .entry-header [rel="category tag"] {
  color: rgba(248,245,255,.88) !important;
  text-shadow: 0 2px 14px rgba(0,0,0,.72) !important;
}

body.ndje-opening-scene-enabled .entry-content,
body.ndje-opening-scene-enabled .post-content,
body.ndje-opening-scene-enabled .x-main article .entry-content {
  width: min(calc(100% - 44px), var(--ndje-reading-width)) !important;
  max-width: var(--ndje-reading-width) !important;
  margin-inline: auto !important;
}

/* v2.2 hides duplicate featured-media blocks after JavaScript confirms the hero image. */
body.ndje-opening-scene-enabled.ndje-has-opening-image.ndje-hide-duplicate-featured article.hentry > .entry-featured,
body.ndje-opening-scene-enabled.ndje-has-opening-image.ndje-hide-duplicate-featured article.hentry > .post-thumbnail,
body.ndje-opening-scene-enabled.ndje-has-opening-image.ndje-hide-duplicate-featured article.hentry > figure.wp-block-post-featured-image,
body.ndje-opening-scene-enabled.ndje-has-opening-image.ndje-hide-duplicate-featured .entry-wrap > .entry-featured {
  display: none !important;
}

@media (max-width: 767px) {
  body.ndje-opening-scene-enabled article.hentry > .entry-header,
  body.ndje-opening-scene-enabled article.hentry > header.entry-header,
  body.ndje-opening-scene-enabled .x-main article.hentry > header,
  body.ndje-opening-scene-enabled .x-main article > .entry-header {
    min-height: min(var(--ndje-hero-height), 330px) !important;
    padding: 42px 20px !important;
  }
  body.ndje-opening-scene-enabled .entry-header .entry-title,
  body.ndje-opening-scene-enabled .entry-header h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem) !important;
  }
}


/* ==========================================================
   NEWDAWN JOURNAL V2.3 — READING FIELD + COMPACT META
   ========================================================== */

body.ndje-opening-scene-enabled article.hentry {
  background: transparent !important;
  box-shadow: none !important;
}

/* Compact metadata line */
body.ndje-compact-meta .ndje-meta-line {
  margin-top: 14px;
  color: rgba(244,239,250,.78);
  font-size: .88rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,.42);
}
body.ndje-compact-meta .ndje-legacy-meta-hidden {
  display: none !important;
}

/* Reduce title block height now that metadata is condensed */
body.ndje-opening-scene-enabled .entry-header,
body.ndje-opening-scene-enabled header.entry-header {
  padding-top: clamp(42px, 5vw, 68px) !important;
  padding-bottom: clamp(36px, 4vw, 56px) !important;
}

/* Classic: preserves existing appearance */
body.ndje-reading-field-classic .entry-content,
body.ndje-reading-field-classic .post-content {
  background: transparent !important;
}

/* Soft Gradient: darker center, soft transparent edges, no box */
body.ndje-reading-field-soft .entry-content,
body.ndje-reading-field-soft .post-content,
body.ndje-reading-field-soft article.hentry .content {
  position: relative;
  isolation: isolate;
  background: transparent !important;
}
body.ndje-reading-field-soft .entry-content::before,
body.ndje-reading-field-soft .post-content::before,
body.ndje-reading-field-soft article.hentry .content::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -34px;
  bottom: -44px;
  left: 50%;
  width: min(1180px, 132vw);
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--ndje-reading-field) 0%, transparent) 5%,
    color-mix(in srgb, var(--ndje-reading-field) 52%, transparent) 20%,
    color-mix(in srgb, var(--ndje-reading-field) 86%, transparent) 36%,
    var(--ndje-reading-field) 50%,
    color-mix(in srgb, var(--ndje-reading-field) 86%, transparent) 64%,
    color-mix(in srgb, var(--ndje-reading-field) 52%, transparent) 80%,
    color-mix(in srgb, var(--ndje-reading-field) 0%, transparent) 95%,
    transparent 100%
  );
  pointer-events: none;
}

/* Seamless: almost invisible atmospheric field */
body.ndje-reading-field-seamless .entry-content,
body.ndje-reading-field-seamless .post-content,
body.ndje-reading-field-seamless article.hentry .content {
  position: relative;
  isolation: isolate;
  background: transparent !important;
}
body.ndje-reading-field-seamless .entry-content::before,
body.ndje-reading-field-seamless .post-content::before,
body.ndje-reading-field-seamless article.hentry .content::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -28px;
  bottom: -38px;
  left: 50%;
  width: min(1120px, 126vw);
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--ndje-reading-field) 52%, transparent) 0%,
    color-mix(in srgb, var(--ndje-reading-field) 32%, transparent) 48%,
    transparent 78%
  );
  pointer-events: none;
}

/* Browsers without color-mix get a graceful Newdawn fallback. */
@supports not (background: color-mix(in srgb, #000 50%, transparent)) {
  body.ndje-reading-field-soft .entry-content::before,
  body.ndje-reading-field-soft .post-content::before,
  body.ndje-reading-field-soft article.hentry .content::before {
    background: linear-gradient(90deg, transparent 0%, rgba(50,15,70,.35) 20%, rgba(50,15,70,.92) 50%, rgba(50,15,70,.35) 80%, transparent 100%);
  }
  body.ndje-reading-field-seamless .entry-content::before,
  body.ndje-reading-field-seamless .post-content::before,
  body.ndje-reading-field-seamless article.hentry .content::before {
    background: radial-gradient(ellipse at center, rgba(50,15,70,.42) 0%, rgba(50,15,70,.18) 50%, transparent 78%);
  }
}

@media (max-width: 767px) {
  body.ndje-reading-field-soft .entry-content::before,
  body.ndje-reading-field-soft .post-content::before,
  body.ndje-reading-field-soft article.hentry .content::before,
  body.ndje-reading-field-seamless .entry-content::before,
  body.ndje-reading-field-seamless .post-content::before,
  body.ndje-reading-field-seamless article.hentry .content::before {
    width: calc(100vw - 10px);
  }
  body.ndje-compact-meta .ndje-meta-line {
    font-size: .74rem;
    line-height: 1.6;
  }
}
