/**
 * Shared article body markup (public .rj-article-content + TinyMCE body.rj-article-content).
 * Columns: table layout for predictable % widths; responsive stack on narrow viewports.
 * Images: max-width 100% + optional rj-figure--* / data-rj-img-size variants.
 */

.rj-article-content {
  box-sizing: border-box;
}

.rj-article-content *,
.rj-article-content *::before,
.rj-article-content *::after {
  box-sizing: inherit;
}

/* --- Structured rows (local + reusable expanded) --- */

.rj-article-content .rj-row {
  margin: 1em 0;
}

.rj-article-content [data-rj-layout-type="columns"][data-rj-block="1"],
.rj-article-content [data-rj-reusable-render="1"][data-rj-layout-type="columns"] {
  display: table;
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 1rem 0;
}

.rj-article-content [data-rj-layout-type="columns"][data-rj-block="1"] > [data-rj-col],
.rj-article-content [data-rj-reusable-render="1"][data-rj-layout-type="columns"] > [data-rj-col] {
  display: table-cell;
  vertical-align: top;
  min-width: 0;
  margin: 0;
}

/* Percent widths from layout JSON (existing + new articles) */
.rj-article-content [data-rj-col][data-rj-col-width="16"] { width: 16%; }
.rj-article-content [data-rj-col][data-rj-col-width="25"] { width: 25%; }
.rj-article-content [data-rj-col][data-rj-col-width="30"] { width: 30%; }
.rj-article-content [data-rj-col][data-rj-col-width="33"] { width: 33%; }
.rj-article-content [data-rj-col][data-rj-col-width="34"] { width: 34%; }
.rj-article-content [data-rj-col][data-rj-col-width="40"] { width: 40%; }
.rj-article-content [data-rj-col][data-rj-col-width="50"] { width: 50%; }
.rj-article-content [data-rj-col][data-rj-col-width="60"] { width: 60%; }
.rj-article-content [data-rj-col][data-rj-col-width="66"] { width: 66%; }
.rj-article-content [data-rj-col][data-rj-col-width="67"] { width: 67%; }
.rj-article-content [data-rj-col][data-rj-col-width="70"] { width: 70%; }
.rj-article-content [data-rj-col][data-rj-col-width="75"] { width: 75%; }
.rj-article-content [data-rj-col][data-rj-col-width="100"] { width: 100%; }

@media (max-width: 36rem) {
  .rj-article-content [data-rj-layout-type="columns"][data-rj-block="1"],
  .rj-article-content [data-rj-reusable-render="1"][data-rj-layout-type="columns"] {
    display: block;
    width: 100%;
    border-spacing: 0;
  }

  .rj-article-content [data-rj-layout-type="columns"][data-rj-block="1"] > [data-rj-col],
  .rj-article-content [data-rj-reusable-render="1"][data-rj-layout-type="columns"] > [data-rj-col] {
    display: block;
    width: 100% !important;
    padding-bottom: 0.75rem;
  }
}

/* Spacer rows */
.rj-article-content .rj-row--spacer[data-rj-spacer-size="sm"] {
  min-height: 0.75rem;
}

.rj-article-content .rj-row--spacer[data-rj-spacer-size="md"] {
  min-height: 1.25rem;
}

.rj-article-content .rj-row--spacer[data-rj-spacer-size="lg"] {
  min-height: 2rem;
}

/* Optional space around expanded reusable blocks (per-block admin toggles) */
.rj-article-content .rj-reusable-body-spacer {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  font-size: 0;
  clear: both;
}

.rj-article-content .rj-reusable-body-spacer--before {
  min-height: 0.65rem;
}

.rj-article-content .rj-reusable-body-spacer--after {
  min-height: 0.65rem;
}

/* Body column break marker (editor / pre-wrap); removed on public after segment wrap */
.rj-article-content .rj-row--column_break[data-rj-column-break="1"] {
  margin: 0.35em 0;
  min-height: 0.25rem;
}

/* Public: full-body segments between markers (server-side ArticleBodyColumnFlow) */
.rj-article-content .rj-body-column-flow {
  display: block;
  margin: 0;
}

.rj-article-content .rj-body-column-flow > .rj-col-segment {
  display: block;
  min-width: 0;
}

/* Wide viewports only — do not use (orientation: landscape): on desktop, tall browser
   windows report portrait and the grid would never apply. */
@media (min-width: 56rem) {
  .rj-article-content .rj-body-column-flow[data-rj-column-count="2"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(1rem, 2.5vw, 2.25rem);
    row-gap: 0;
    align-items: start;
  }

  .rj-article-content .rj-body-column-flow[data-rj-column-count="3"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1rem, 2.2vw, 2rem);
    row-gap: 0;
    align-items: start;
  }

  .rj-article-content .rj-body-column-flow[data-rj-column-count="4"] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(0.85rem, 1.8vw, 1.65rem);
    row-gap: 0;
    align-items: start;
  }

  .rj-article-content .rj-body-column-flow[data-rj-column-count="5"] {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: clamp(0.75rem, 1.5vw, 1.35rem);
    row-gap: 0;
    align-items: start;
  }

  .rj-article-content .rj-body-column-flow[data-rj-column-count="6"] {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: clamp(0.65rem, 1.2vw, 1.1rem);
    row-gap: 0;
    align-items: start;
  }

  .rj-article-content .rj-body-column-flow[data-rj-column-count="7"] {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    column-gap: clamp(0.55rem, 1vw, 1rem);
    row-gap: 0;
    align-items: start;
  }

  .rj-article-content .rj-body-column-flow[data-rj-column-count="8"] {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    column-gap: clamp(0.5rem, 0.9vw, 0.85rem);
    row-gap: 0;
    align-items: start;
  }
}

/* --- Presentation blocks V1 (controlled layouts; editorial + luxury-friendly) --- */

.rj-article-content .rj-presentation {
  margin: clamp(1.35rem, 3vw, 2.25rem) 0;
}

.rj-article-content .rj-presentation__inner {
  max-width: 100%;
}

.rj-article-content .rj-presentation__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted, #7b8894);
}

.rj-article-content .rj-presentation__title--display {
  margin: 0 0 0.65rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}

.rj-article-content .rj-presentation__intro,
.rj-article-content .rj-presentation__lead {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--text-secondary, #3d3a34);
}

.rj-article-content .rj-presentation--feature-cards .rj-presentation__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.rj-article-content .rj-presentation__card {
  border: 1px solid var(--border-subtle, #ddd5cb);
  border-radius: var(--radius-card, 8px);
  padding: 0.85rem 0.95rem;
  background: var(--bg-surface, #fff);
  box-shadow: 0 1px 2px rgba(24, 32, 42, 0.05);
}

.rj-article-content .rj-presentation__card-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.rj-article-content .rj-presentation__card-body {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-secondary, #3d3a34);
}

.rj-article-content .rj-presentation--testimonial .rj-presentation__inner--quote {
  border-left: 3px solid var(--accent-primary, #c9972f);
  padding: 0.35rem 0 0.35rem 1rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0 var(--radius-card, 8px) var(--radius-card, 8px) 0;
}

.rj-article-content .rj-presentation__quote {
  margin: 0;
  padding: 0;
}

.rj-article-content .rj-presentation__quote-text {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  font-style: italic;
}

.rj-article-content .rj-presentation__attrib {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  font-style: normal;
}

.rj-article-content .rj-presentation__role {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #7b8894);
}

.rj-article-content .rj-presentation--split-brand .rj-presentation__split {
  display: table;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 1rem 0;
  margin-top: 0.5rem;
}

.rj-article-content .rj-presentation__split-col {
  display: table-cell;
  vertical-align: top;
  min-width: 0;
}

.rj-article-content .rj-presentation--cta-band .rj-presentation__inner {
  border: 1px solid var(--border-subtle, #ddd5cb);
  border-radius: var(--radius-card, 10px);
  padding: 1.15rem 1.2rem 1.25rem;
  background: linear-gradient(145deg, var(--bg-surface-alt, #f1ece5), var(--bg-surface, #fff));
}

.rj-article-content .rj-presentation__cta-body {
  margin: 0 0 1rem;
  line-height: 1.65;
}

.rj-article-content .rj-presentation__cta-wrap {
  margin: 0;
}

.rj-article-content .rj-presentation__cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--accent-primary, #c9972f);
  color: var(--text-primary, #1a1a1a);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rj-article-content .rj-presentation__cta:hover {
  background: rgba(201, 151, 47, 0.12);
}

.rj-article-content .rj-presentation--metrics .rj-presentation__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.rj-article-content .rj-presentation__metric {
  text-align: center;
  padding: 0.85rem 0.6rem;
  border: 1px solid var(--border-subtle, #ddd5cb);
  border-radius: var(--radius-card, 8px);
  background: var(--bg-surface-alt, #f1ece5);
}

.rj-article-content .rj-presentation__metric-value {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary, #1a1a1a);
}

.rj-article-content .rj-presentation__metric-label {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #7b8894);
}

.rj-article-content .rj-presentation--contact .rj-presentation__contact-body {
  line-height: 1.65;
}

/* Presentation — editorial spread (variant editorial_spread) */
.rj-article-content .rj-presentation--editorial_spread .rj-presentation__inner--editorial-spread {
  margin: 0.35rem 0 1.25rem;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread {
  display: flex;
  flex-direction: column;
  gap: 1rem 1.2rem;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__top {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1rem 1.35rem;
  align-items: stretch;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__hero {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__figure {
  margin: 0;
  flex: 1;
  min-height: 12.5rem;
  max-height: 28rem;
  border-radius: var(--radius-card, 10px);
  overflow: hidden;
  border: 1px solid var(--border-subtle, #ddd5cb);
  background: var(--bg-surface-alt, #f1ece5);
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__figure--thumb {
  min-height: 7.5rem;
  max-height: 14rem;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__hero-placeholder {
  flex: 1;
  min-height: 12.5rem;
  border-radius: var(--radius-card, 10px);
  border: 1px dashed var(--border-subtle, #c9c2b8);
  background: linear-gradient(160deg, var(--bg-surface-alt, #f1ece5), var(--bg-surface, #fff));
  opacity: 0.85;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__head {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.15rem 0 0.35rem;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__head-title {
  margin-bottom: 0.5rem;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__head-lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.55;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 1rem 1.2rem;
  align-items: start;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__thumb {
  min-width: 0;
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__mid,
.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__right {
  min-width: 0;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--text-secondary, #3d3a34);
}

.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__mid:empty,
.rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__right:empty {
  display: none;
}

/* Presentation — columns break + report spread (shared markup; report adds left support note) */
.rj-article-content .rj-presentation--editorial_columns_break .rj-presentation__inner--columns-break,
.rj-article-content .rj-presentation--report_spread .rj-presentation__inner--columns-break {
  margin: 0.35rem 0 1.35rem;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__header,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle, #ddd5cb);
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__title,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__title {
  margin-bottom: 0;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__grid,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1.1rem 1.45rem;
  align-items: start;
}

.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break--report .rj-editorial-columns-break__grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__visual,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__visual {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break--no-image .rj-editorial-columns-break__visual,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break--no-image .rj-editorial-columns-break__visual {
  display: none;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break--no-image .rj-editorial-columns-break__grid,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break--no-image .rj-editorial-columns-break__grid {
  grid-template-columns: 1fr;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__figure,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__figure {
  margin: 0;
  border-radius: var(--radius-card, 10px);
  overflow: hidden;
  border: 1px solid var(--border-subtle, #ddd5cb);
  background: var(--bg-surface-alt, #f1ece5);
  min-height: 10rem;
  max-height: 26rem;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__img,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 10rem;
  max-height: 26rem;
  object-fit: cover;
}

.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__support {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed var(--border-subtle, #c9c2b8);
  background: rgba(255, 254, 252, 0.65);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary, #3d3a34);
}

.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__support > p:first-child {
  margin-top: 0;
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__copy,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__copy {
  min-width: 0;
  font-size: clamp(0.95rem, 1.35vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-secondary, #3d3a34);
}

.rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__copy > p:first-child,
.rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__copy > p:first-child {
  margin-top: 0;
}

/* Presentation — three-spot deck (variant three_spot; max 3 columns) */
.rj-article-content .rj-presentation--three_spot .rj-presentation__inner--three-spot {
  margin: 0.35rem 0 1.2rem;
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle, #ddd5cb);
  background: linear-gradient(180deg, rgba(255, 254, 252, 0.55), transparent);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__deck-title {
  margin-bottom: 0;
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem 0.9rem;
  align-items: stretch;
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__cell {
  min-width: 0;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #d2c9bc);
  padding: 0.78rem 0.82rem 0.88rem;
  box-shadow: 0 2px 12px rgba(24, 32, 42, 0.07);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__cell:nth-child(1) {
  background: linear-gradient(168deg, #fffefb 0%, #f4ebe3 100%);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__cell:nth-child(2) {
  background: linear-gradient(168deg, #faf7f2 0%, #efe6dc 100%);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__cell:nth-child(3) {
  background: linear-gradient(168deg, #fcf9f4 0%, #f0e7de 100%);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__figure {
  margin: 0 0 0.55rem;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
  background: rgba(0, 0, 0, 0.04);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 9.5rem;
  object-fit: cover;
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__cell-title {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary, #1a1a1a);
}

.rj-article-content .rj-presentation--three_spot .rj-three-spot__cell-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.58;
  color: var(--text-secondary, #3d3a34);
}

/* Presentation — feature + side panel (variant feature_panel; 2 columns) */
.rj-article-content .rj-presentation--feature_panel .rj-presentation__inner--feature-panel {
  margin: 0.35rem 0 1.2rem;
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 1rem 1.2rem;
  align-items: stretch;
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__main {
  min-width: 0;
  padding: 0.12rem 0.35rem 0.2rem 0;
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__main-body {
  margin-top: 0.65rem;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--text-secondary, #3d3a34);
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__aside {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, #d2c9bc);
  padding: 1rem 1.05rem 1.1rem;
  background: linear-gradient(155deg, rgba(252, 249, 244, 0.98), rgba(236, 228, 216, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 22px rgba(24, 32, 42, 0.08);
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__aside--has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(185deg, rgba(255, 254, 252, 0.92) 0%, rgba(255, 252, 246, 0.72) 42%, rgba(244, 236, 224, 0.38) 100%);
  pointer-events: none;
  z-index: 0;
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__aside-inner {
  position: relative;
  z-index: 1;
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__panel-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #7b8894);
  margin-bottom: 0.4rem;
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__panel-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary, #1a1a1a);
}

.rj-article-content .rj-presentation--feature_panel .rj-feature-panel__panel-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--text-secondary, #3d3a34);
}

@media (max-width: 40rem) {
  .rj-article-content .rj-presentation--feature-cards .rj-presentation__grid,
  .rj-article-content .rj-presentation--metrics .rj-presentation__metrics {
    grid-template-columns: 1fr;
  }

  .rj-article-content .rj-presentation--split-brand .rj-presentation__split {
    display: block;
  }

  .rj-article-content .rj-presentation__split-col {
    display: block;
    width: 100%;
    padding-bottom: 0.85rem;
  }

  .rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__top {
    grid-template-columns: 1fr;
  }

  .rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__figure--hero,
  .rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__hero-placeholder {
    min-height: 10.5rem;
    max-height: 22rem;
  }

  .rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__bottom {
    grid-template-columns: 1fr;
  }

  .rj-article-content .rj-presentation--editorial_spread .rj-editorial-spread__figure--thumb {
    max-height: 12rem;
  }

  .rj-article-content .rj-presentation--three_spot .rj-three-spot__grid {
    grid-template-columns: 1fr;
  }

  .rj-article-content .rj-presentation--feature_panel .rj-feature-panel {
    grid-template-columns: 1fr;
  }

  .rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__grid,
  .rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__grid {
    grid-template-columns: 1fr;
  }

  .rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__figure,
  .rj-article-content .rj-presentation--editorial_columns_break .rj-editorial-columns-break__img,
  .rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__figure,
  .rj-article-content .rj-presentation--report_spread .rj-editorial-columns-break__img {
    min-height: 8.5rem;
    max-height: 18rem;
  }
}

/* Gallery marker rows in editor (public output expands and removes marker). */
.rj-article-content .rj-row--gallery-ref {
  margin: 1em 0;
  padding: 0.55rem 0.7rem;
  border: 1px dashed #9aa7b4;
  background: #f6f8fc;
}

.rj-article-content .rj-row--gallery-ref [data-rj-placeholder="gallery"] {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

/* --- Media: never overflow column / content width --- */

.rj-article-content img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Inline / body figures: editorial frame + caption rhythm */
.rj-article-content figure {
  margin: clamp(1.2rem, 3.2vw, 1.85rem) 0;
  max-width: 100%;
  clear: both;
}

.rj-article-content figure:not(.rj-gallery) {
  border: 1px solid var(--border-subtle, #ddd5cb);
  border-radius: var(--radius-card, 6px);
  background: var(--bg-surface-alt, #f1ece5);
  padding: 0.45rem 0.45rem 0.5rem;
  box-shadow: 0 1px 0 rgba(24, 32, 42, 0.04);
}

.rj-article-content figure:not(.rj-gallery) > img,
.rj-article-content figure:not(.rj-gallery) > a > img,
.rj-article-content figure:not(.rj-gallery) > picture > img {
  border-radius: calc(var(--radius-card, 6px) - 2px);
}

.rj-article-content figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

.rj-article-content figure iframe {
  max-width: 100%;
  border: 0;
}

.rj-article-content figcaption {
  margin: 0.45rem 0 0;
  padding: 0 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted, #7b8894);
  font-style: normal;
}

.rj-article-content figure:not(.rj-gallery) figcaption {
  max-width: var(--measure-reading, 40rem);
}

/* Standalone images in running text (no figure wrapper) */
.rj-article-content p > img:only-child,
.rj-article-content p > a:only-child > img:only-child {
  display: block;
  margin: clamp(1rem, 2.8vw, 1.5rem) auto;
  border-radius: var(--radius-md, 4px);
  box-shadow: 0 1px 3px rgba(24, 32, 42, 0.08);
}

/* Figure width caps: max-width:100% lets narrow columns shrink the used width */
.rj-article-content figure.rj-figure--content,
.rj-article-content figure.rj-figure--full {
  width: 100%;
  max-width: 100%;
}

.rj-article-content figure.rj-figure--sm {
  width: 280px;
  max-width: 100%;
}

.rj-article-content figure.rj-figure--md {
  width: 480px;
  max-width: 100%;
}

.rj-article-content figure.rj-figure--lg {
  width: 720px;
  max-width: 100%;
}

.rj-article-content figure.rj-figure--sm img,
.rj-article-content figure.rj-figure--md img,
.rj-article-content figure.rj-figure--lg img,
.rj-article-content figure.rj-figure--content img,
.rj-article-content figure.rj-figure--full img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Marker for tooling / future filters; sizing is driven by figure classes when present */
.rj-article-content img[data-rj-img-size="content"],
.rj-article-content img[data-rj-img-size="full"] {
  max-width: 100%;
  height: auto;
}

/* --- Editorial gallery (expanded from data-rj-gallery marker) --- */

.rj-article-content .rj-gallery {
  margin: clamp(1.35rem, 3.5vw, 2rem) 0;
  max-width: 100%;
  clear: both;
  padding: 0.55rem 0.6rem 0.65rem;
  border: 1px solid var(--border-subtle, #ddd5cb);
  border-radius: var(--radius-card, 6px);
  background: linear-gradient(180deg, var(--bg-surface-alt, #f1ece5) 0%, var(--bg-surface, #fff) 55%);
  box-shadow: 0 1px 2px rgba(24, 32, 42, 0.05);
}

.rj-article-content .rj-gallery__title {
  margin: 0 0 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle, #ddd5cb);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #7b8894);
}

.rj-article-content .rj-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
  gap: 0.45rem;
  margin: 0;
}

/* Display style modifiers (see app.css for full set) */
.rj-article-content .rj-gallery--style-masonry_soft .rj-gallery__grid {
  column-count: 3;
  column-gap: 0.55rem;
  display: block;
}

.rj-article-content .rj-gallery--style-masonry_soft .rj-gallery__cell {
  break-inside: avoid;
  margin-bottom: 0.55rem;
}

.rj-article-content .rj-gallery--style-showcase_strip .rj-gallery__grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.5rem;
}

.rj-article-content .rj-gallery__cell {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rj-article-content .rj-gallery__link {
  display: block;
  line-height: 0;
  border: 1px solid var(--border-subtle, #ddd5cb);
  border-radius: var(--radius-sm, 2px);
  margin: 0;
  padding: 0;
  width: 100%;
  overflow: hidden;
  background: var(--bg-surface, #fff);
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rj-article-content .rj-gallery__link:hover {
  border-color: var(--accent-primary, #c9972f);
  box-shadow: 0 2px 8px rgba(24, 32, 42, 0.08);
}

.rj-article-content .rj-gallery__link:focus {
  outline: 2px solid var(--accent-primary, #c9972f);
  outline-offset: 2px;
}

.rj-article-content .rj-gallery__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.rj-article-content .rj-gallery__caption {
  margin: 0.32rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted, #7b8894);
}

@media (max-width: 36rem) {
  .rj-article-content figure:not(.rj-gallery) {
    padding: 0.35rem 0.35rem 0.42rem;
    margin: 1.05rem 0;
  }

  .rj-article-content figcaption {
    font-size: 0.78rem;
  }

  .rj-article-content .rj-gallery {
    margin: 1.15rem 0;
    padding: 0.45rem 0.45rem 0.55rem;
  }

  .rj-article-content .rj-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.38rem;
  }

  .rj-article-content .rj-gallery__caption {
    font-size: 0.72rem;
    margin-top: 0.28rem;
  }
}

/* --- Article gallery lightbox (public article view) --- */

body.rj-gallery-lightbox-open {
  overflow: hidden;
}

.rj-gallery-lightbox[hidden] {
  display: none !important;
}

.rj-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.rj-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.rj-gallery-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.rj-gallery-lightbox__stage {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}

.rj-gallery-lightbox__nav {
  flex: 0 0 auto;
  align-self: center;
  border: 0;
  border-radius: 999px;
  width: 2.35rem;
  height: 2.35rem;
  line-height: 1;
  font-size: 1.6rem;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rj-gallery-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.rj-gallery-lightbox__nav:hover:not(:disabled) {
  background: #fff;
}

.rj-gallery-lightbox__nav:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.rj-gallery-lightbox__close {
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rj-gallery-lightbox__close:hover {
  background: #fff;
}

.rj-gallery-lightbox__close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.rj-gallery-lightbox__frame {
  max-width: 100%;
  max-height: calc(92vh - 2.5rem);
  overflow: auto;
  border-radius: var(--radius-card, 8px);
  background: #0f172a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  line-height: 0;
}

.rj-gallery-lightbox__img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 85vh;
  margin: 0 auto;
}

.rj-gallery-lightbox__caption {
  margin: 0;
  padding: 0.55rem 0.65rem 0.65rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.rj-gallery-lightbox__caption[hidden] {
  display: none !important;
}

.rj-gallery-lightbox__counter {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.85);
}

