/**
 * XGene Stage 4 R4 — Regulatory Record + Editorial regression corrective.
 * Loaded last on Stage 4 intelligence surfaces and article singles.
 */

/* --------------------------------------------------------------------------
   1. Article flow cleanup — empty/legacy blocks must not occupy visual space.
   -------------------------------------------------------------------------- */
.xg-article-reading .xg-editorial-reading-content .xg-reading-empty,
.xg-article-reading .xg-editorial-reading-content [data-xg-reading-pruned="true"] {
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}
.xg-article-reading .xg-editorial-reading-content > .xg-first-reading-block {
  margin-top:0 !important;
  padding-top:0 !important;
}
.xg-article-reading .xg-editorial-reading-content > .xg-first-reading-block.wp-block-group,
.xg-article-reading .xg-editorial-reading-content > .xg-first-reading-block.wp-block-columns {
  margin-top:0 !important;
}

/* R4 keeps the rail readable while it is docked and prevents it from visually
   colliding with the article-end / related-content boundary. */
@media (min-width:1101px) {
  .xg-article-reading .xg-editorial-reading-layout {
    padding-top:clamp(2rem,3.25vw,2.8rem) !important;
  }
  .xg-article-reading .xg-editorial-reading-rail.xg-toc-docked {
    border-radius:1rem;
  }
  .xg-article-reading .xg-editorial-reading-rail.xg-toc-bottomed {
    bottom:clamp(2rem,3vw,3rem) !important;
  }
  .xg-article-reading .xg-editorial-reading-rail.xg-toc-bottomed .xg-editorial-toc {
    max-height:min(52vh,31rem) !important;
  }
}

/* --------------------------------------------------------------------------
   2. Regulatory Record single — dedicated evidence-record presentation.
   -------------------------------------------------------------------------- */
.xg190-reg-record-single {
  background:linear-gradient(180deg,#fff 0%,#fbfdff 48%,#fff 100%);
}
.xg190-reg-record-single .xg190-hero--reg-record-single {
  padding:clamp(2.7rem,4.2vw,4.2rem) 0 clamp(2.35rem,3.5vw,3.4rem);
  background:
    radial-gradient(circle at 83% 22%,rgba(33,185,211,.15),transparent 26%),
    linear-gradient(122deg,#062947 0%,#0a3e61 52%,#08767e 100%);
}
.xg190-reg-record-single .xg190-hero--reg-record-single .xg190-hero__grid {
  grid-template-columns:minmax(0,1.3fr) minmax(24rem,.7fr);
  gap:clamp(2.25rem,4vw,4.6rem);
}
.xg190-reg-record-single .xg190-hero--reg-record-single h1 {
  max-width:24ch !important;
  margin:.2em 0 .35em !important;
  font-size:clamp(2.35rem,3.5vw,3.7rem) !important;
  line-height:1.01 !important;
  letter-spacing:-.045em !important;
  text-wrap:balance;
}
.xg190-reg-record-single .xg190-hero--reg-record-single .xg190-hero__lead {
  max-width:54rem;
  font-size:clamp(1rem,1.15vw,1.16rem);
  line-height:1.62;
}
.xg190-reg-record-single .xg190-hero--reg-record-single .xg190-graph {
  width:min(100%,29.5rem);
  border-radius:1.55rem;
}
.xg190-reg-record-single .xg190-hero--reg-record-single .xg190-graph__core {
  width:8.3rem;
  height:8.3rem;
}
.xg190-reg-record-single .xg190-hero--reg-record-single .xg190-graph__core strong {
  font-size:1.12rem;
}
.xg190-record-hero-facts {
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  margin-top:1.25rem;
}
.xg190-record-hero-facts > span {
  display:flex;
  flex-direction:column;
  min-width:10rem;
  max-width:19rem;
  padding:.62rem .78rem;
  border:1px solid rgba(255,255,255,.22);
  border-radius:.7rem;
  background:rgba(255,255,255,.075);
  backdrop-filter:blur(8px);
}
.xg190-record-hero-facts small {
  color:#8fe9e9;
  font-size:.6rem;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.xg190-record-hero-facts strong {
  margin-top:.16rem;
  overflow-wrap:anywhere;
  color:#fff;
  font-size:.78rem;
  line-height:1.32;
}

.xg190-record-signal-strip {
  border-bottom:1px solid var(--xg190-line);
  background:#fff;
}
.xg190-record-signal-strip__grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.xg190-record-signal-strip__grid > div {
  min-width:0;
  padding:1rem 1.15rem;
  border-right:1px solid var(--xg190-line);
}
.xg190-record-signal-strip__grid > div:last-child { border-right:0; }
.xg190-record-signal-strip span {
  display:block;
  color:var(--xg190-teal);
  font-size:.62rem;
  font-weight:900;
  letter-spacing:.1em;
}
.xg190-record-signal-strip strong {
  display:block;
  margin:.18rem 0;
  color:var(--xg190-navy);
  font-size:.88rem;
}
.xg190-record-signal-strip small {
  display:block;
  overflow-wrap:anywhere;
  color:#667d91;
  font-size:.74rem;
  line-height:1.4;
}

.xg190-reg-record-single .xg190-section--record-body {
  padding:clamp(3rem,5vw,5rem) 0 clamp(4rem,6vw,6rem);
  background:linear-gradient(180deg,#f7fafc 0%,#fff 18%,#fff 100%);
}
.xg190-reg-record-single .xg190-record-layout {
  grid-template-columns:minmax(14rem,17rem) minmax(0,51rem);
  gap:clamp(2rem,4vw,4rem);
  justify-content:center;
}
.xg190-reg-record-single .xg190-record-meta {
  top:calc(var(--xg-header-offset,110px) + 1rem);
  border-color:#cfdee8;
  background:linear-gradient(180deg,#f8fbfd,#fff);
  box-shadow:0 .8rem 2.2rem rgba(8,43,73,.055);
}
.xg190-reg-record-single .xg190-prose--record {
  min-width:0;
  padding:clamp(1.5rem,2.6vw,2.3rem);
  border:1px solid #dbe6ee;
  border-radius:1.2rem;
  background:#fff;
  box-shadow:0 1rem 3rem rgba(8,43,73,.055);
  color:#29445b;
  font-size:clamp(1rem,.98rem + .12vw,1.075rem);
  line-height:1.78;
}
.xg190-reg-record-single .xg190-prose--record > *:first-child {
  margin-top:0 !important;
}
.xg190-reg-record-single .xg190-prose--record p {
  margin:0 0 1.28em;
  color:#334f66;
}
.xg190-reg-record-single .xg190-prose--record h2 {
  margin:2.7rem 0 .8rem;
  padding-top:1rem;
  border-top:1px solid #dce7ef;
  color:var(--xg190-navy);
  font-size:clamp(1.65rem,2.25vw,2.25rem);
  line-height:1.12;
}
.xg190-reg-record-single .xg190-prose--record h3 {
  margin:2rem 0 .7rem;
  color:#164667;
  font-size:1.32rem;
  line-height:1.22;
}
.xg190-reg-record-single .xg190-prose--record img,
.xg190-reg-record-single .xg190-prose--record figure {
  max-width:100%;
}
.xg190-reg-record-single .xg190-prose--record img {
  display:block;
  height:auto;
  margin:1.8rem auto;
  border:1px solid #e0e9ef;
  border-radius:.9rem;
  box-shadow:0 .7rem 2rem rgba(8,43,73,.07);
}
.xg190-reg-record-single .xg190-prose--record .wp-block-group,
.xg190-reg-record-single .xg190-prose--record .wp-block-columns {
  max-width:100%;
}
.xg190-reg-record-single .xg190-prose--record .wp-block-group.has-background,
.xg190-reg-record-single .xg190-prose--record .wp-block-column.has-background {
  border:1px solid #dce7ef;
  border-radius:1rem;
  box-shadow:none;
}
.xg190-reg-record-single .xg190-related {
  border-top:1px solid #dbe6ee;
}

@media (max-width:1050px) {
  .xg190-reg-record-single .xg190-hero--reg-record-single .xg190-hero__grid {
    grid-template-columns:1fr;
  }
  .xg190-reg-record-single .xg190-hero--reg-record-single .xg190-graph {
    width:min(100%,32rem);
    margin-inline:0;
  }
  .xg190-reg-record-single .xg190-record-layout {
    grid-template-columns:minmax(13rem,16rem) minmax(0,1fr);
  }
}
@media (max-width:760px) {
  .xg190-reg-record-single .xg190-hero--reg-record-single h1 {
    max-width:none !important;
    font-size:clamp(2.15rem,9.5vw,3rem) !important;
  }
  .xg190-record-hero-facts { display:grid; grid-template-columns:1fr; }
  .xg190-record-hero-facts > span { max-width:none; }
  .xg190-record-signal-strip__grid { grid-template-columns:1fr 1fr; }
  .xg190-record-signal-strip__grid > div:nth-child(2) { border-right:0; }
  .xg190-record-signal-strip__grid > div:nth-child(-n+2) { border-bottom:1px solid var(--xg190-line); }
  .xg190-reg-record-single .xg190-record-layout { grid-template-columns:1fr; }
  .xg190-reg-record-single .xg190-prose--record { padding:1.1rem; border-radius:1rem; }
}
