/* Native media presentation, with migration-specific treatments kept scoped. */
.geniart-carousel-loop > .geniart-carousel-controls { order: 99; }
/* Gallery captions stay saved in Gutenberg, but the presentation is image-only.
 * Override core's gallery caption layouts in both the site and editor canvas. */
.wp-block-gallery figcaption { display: none !important; }
.geniart-before-after__control.is-overlay { position: absolute; inset: 0; z-index: 3; margin: 0; cursor: ew-resize; touch-action: pan-y; font-size: 0; }
.geniart-before-after__control.is-overlay input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.geniart-before-after__stage:has(input:focus-visible) .geniart-before-after__divider::after { outline: 2px solid #ffa300; outline-offset: 3px; }
.geniart-before-after__divider { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; pointer-events: none; z-index: 2; color: transparent; }
.geniart-before-after__divider::after { content: '‹ ›'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid white; border-radius: 50%; color: white; background: #17121ddd; box-shadow: 0 2px 12px #0006; font: 700 24px/1 sans-serif; white-space: pre; }
.geniart-content .gi-icon-text { padding: 1.4rem; margin-block: 1rem; border: 1px solid var(--gi-border); border-radius: 16px; background: var(--gi-surface); }
.geniart-content .gi-icon-text > h3 { margin-top: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.geniart-content .gi-icon-text > h3::before { content: none; }
.geniart-content .gi-icon-text > :last-child { margin-bottom: 0; }
.geniart-content .geniart-office-discord-cta {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 28px;
  width: 100%;
  margin-block: 24px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid #a78bfa66;
  border-radius: 18px;
  background: linear-gradient(115deg, #462071, #342663 55%, #182c47);
  color: #fff;
  text-decoration: none;
}
.geniart-office-discord-title { font-size: clamp(20px, 2.5vw, 30px); line-height: 1.2; }
.geniart-office-discord-description { grid-column: 1; color: #e2dcf4; font-size: 15px; line-height: 1.5; }
.geniart-office-discord-action {
  grid-column: 2; grid-row: 1 / 3;
  padding: 12px 18px; border-radius: 999px;
  background: #fff; color: #382064; font-size: 15px; font-weight: 700;
}
.geniart-office-discord-cta:focus-visible { outline: 3px solid #ffad00; outline-offset: 4px; }
.geniart-office-discord-cta:hover .geniart-office-discord-action { background: #eee7ff; }
@media (max-width: 600px) {
  .geniart-content .geniart-office-discord-cta { grid-template-columns: 1fr; }
  .geniart-office-discord-action { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}
.geniart-office-hours .geniart-office-brief {
  margin: 0 0 32px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #8a63ce55;
  border-left: 4px solid #ffad00;
  border-radius: 16px;
  background: linear-gradient(120deg, #241633, #12121d);
  line-height: 1.7;
}
.geniart-office-brief strong:first-child { color: #ffad00; }
.geniart-office-brief > p { margin: 0; }
.geniart-office-hours .geniart-office-lines { white-space: pre-line; }
.geniart-content .geniart-office-community {
  width: 100%;
  margin-block: 24px;
}
.geniart-content .geniart-office-community > figure.geniart-office-community-wide {
  width: 100%;
  max-width: none;
  margin: 0;
}
.geniart-office-community-wide > a { display: block; }
.geniart-office-community-wide img { display: block; width: 100%; height: auto; }
.geniart-office-community .geniart-office-community-mobile,
.geniart-office-community .geniart-office-community-caption { display: none; }
.wp-block-gallery.geniart-gallery-carousel.has-nested-images {
  display: block;
}
.wp-block-gallery.geniart-gallery-carousel.has-nested-images.is-carousel-ready {
  display: grid;
  grid-template-columns: repeat(var(--gi-carousel-columns, 1), minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.geniart-gallery-carousel > .geniart-carousel-controls,
.geniart-gallery-carousel > figcaption {
  grid-column: 1 / -1;
}
.geniart-carousel-controls[hidden] { display: none; }
.geniart-content .geniart-migrated-column > .wp-block-image:first-child {
  margin-block-start: 0;
}
.geniart-content .wp-block-column > .wp-block-gallery.geniart-gallery-carousel:first-child {
  margin-block-start: 0;
}
.geniart-content .wp-block-column > .geniart-migrated-details-group:first-child {
  margin-block-start: 0;
}
.wp-block-gallery.geniart-gallery-carousel.has-nested-images > figure.wp-block-image:not(#individual-image) {
  display: block;
  width: 100%;
  margin: 0 0 12px;
}
.wp-block-gallery.geniart-gallery-carousel.has-nested-images > figure.wp-block-image[hidden] {
  display: none !important;
}
.wp-block-gallery.geniart-gallery-carousel.has-nested-images > figure.wp-block-image > img,
.wp-block-gallery.geniart-gallery-carousel.has-nested-images > figure.wp-block-image > a > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.geniart-carousel-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.geniart-carousel-controls button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--gi-accent, #ffad00);
  cursor: pointer;
  font: 600 26px/1 system-ui, sans-serif;
}
.geniart-carousel-controls button:hover { background: #ffad0014; }
.geniart-carousel-dots { display: flex; align-items: center; gap: 10px; }
.geniart-carousel-dots > span { width: 4px; height: 4px; border-radius: 4px; background: #777; }
.geniart-carousel-dots > .is-active { width: 16px; background: var(--gi-accent, #ffad00); }
.geniart-carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Compact only migrated carousel cards, not general article spacing. */
.geniart-content .wp-block-gallery.geniart-gallery-carousel {
  margin-block: 16px;
  row-gap: 4px;
}
.geniart-content .wp-block-gallery.geniart-gallery-carousel > figure.wp-block-image:not(#individual-image) {
  margin-block: 0;
}
.geniart-content .geniart-migrated-column:has(> .geniart-gallery-carousel) > :not(.geniart-gallery-carousel) {
  margin-block: 12px;
}
.geniart-carousel-controls button:focus-visible {
  outline: 3px solid #ffb23e;
  outline-offset: 3px;
}
.geniart-content .geniart-migrated-details-group details.wp-block-details > :not(summary),
.geniart-content .geniart-migrated-details-group details.wp-block-details > :not(summary) :where(p, li, blockquote, code, pre, span, strong, em, a) {
  /* Prompt bodies can contain imported inline font sizes. Keep the summary
     untouched, but make these long technical texts consistently compact. */
  font-size: var(--gi-disclosure-font-size, 0.8125rem) !important;
  line-height: 1.5;
}
.geniart-migrated-details-group,
.gi-disclosures-accordion,
.gi-disclosures-independent {
  margin-block-start: 1.25rem;
}
.gi-disclosure-font-13 { --gi-disclosure-font-size: 13px; }
.gi-disclosure-font-16 { --gi-disclosure-font-size: 16px; }
.gi-disclosure-font-18 { --gi-disclosure-font-size: 18px; }
.gi-disclosure-font-20 { --gi-disclosure-font-size: 20px; }
.wp-block-details:is(.gi-disclosure-font-13, .gi-disclosure-font-16, .gi-disclosure-font-18, .gi-disclosure-font-20) > :not(summary),
:is(.gi-disclosure-font-13, .gi-disclosure-font-16, .gi-disclosure-font-18, .gi-disclosure-font-20) .wp-block-details > :not(summary),
.wp-block-details:is(.gi-disclosure-font-13, .gi-disclosure-font-16, .gi-disclosure-font-18, .gi-disclosure-font-20) > :not(summary) *,
:is(.gi-disclosure-font-13, .gi-disclosure-font-16, .gi-disclosure-font-18, .gi-disclosure-font-20) .wp-block-details > :not(summary) * {
  font-size: var(--gi-disclosure-font-size) !important;
  line-height: 1.5;
}
.geniart-content h2[id] { scroll-margin-top: 130px; }
.wp-block-gallery.geniart-gallery-masonry.has-nested-images {
  display: block;
  columns: 3;
  column-gap: 12px;
}
.wp-block-gallery.geniart-gallery-masonry.columns-1 { column-count: 1; }
.wp-block-gallery.geniart-gallery-masonry.columns-2 { column-count: 2; }
.wp-block-gallery.geniart-gallery-masonry.columns-4 { column-count: 4; }
.wp-block-gallery.geniart-gallery-masonry.columns-5 { column-count: 5; }
.wp-block-gallery.geniart-gallery-masonry.columns-6 { column-count: 6; }
.wp-block-gallery.geniart-gallery-masonry.columns-7 { column-count: 7; }
.wp-block-gallery.geniart-gallery-masonry.columns-8 { column-count: 8; }
.wp-block-gallery.geniart-gallery-masonry.has-nested-images > figure.wp-block-image:not(#individual-image) {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  break-inside: avoid;
  overflow: visible;
}
.wp-block-gallery.geniart-gallery-masonry.has-nested-images > figure.wp-block-image > img,
.wp-block-gallery.geniart-gallery-masonry.has-nested-images > figure.wp-block-image > a > img {
  display: block;
  width: 100%;
  height: auto;
  /* Keep the width/height HTML ratio. Resetting aspect-ratio to auto makes
     sizes="auto" lazy images use WordPress's 1500px intrinsic placeholder;
     the lightbox then also measures that incorrect, oversized image box. */
  object-fit: contain;
}
.wp-block-gallery.geniart-gallery-masonry.has-nested-images figure.wp-block-image > a {
  display: block;
  height: auto;
}
.wp-block-gallery.geniart-gallery-masonry.has-nested-images > figcaption {
  column-span: all;
}
.wp-block-list.geniart-list-positive > li,
.wp-block-list.geniart-list-negative > li,
li.geniart-list-positive, li.geniart-list-negative {
  position: relative;
  list-style: none;
  padding-left: 0.45rem;
  margin-bottom: 0.65rem;
}
.geniart-list-positive > li::before, li.geniart-list-positive::before {
  content: "+";
  background: #00cc2c;
}
.geniart-list-negative > li::before, li.geniart-list-negative::before {
  content: "−";
  background: #e80000;
}
.wp-block-list > li.geniart-list-positive::before { content: "+"; background: #00cc2c; }
.wp-block-list > li.geniart-list-negative::before { content: "−"; background: #e80000; }
.geniart-list-positive > li::before, .geniart-list-negative > li::before,
li.geniart-list-positive::before, li.geniart-list-negative::before {
  position: absolute;
  left: -1.1rem;
  top: 0.4em;
  display: grid;
  place-items: center;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  color: #fff;
  font: bold 0.85em/1 system-ui;
}
.geniart-content .wp-block-column:has(> .geniart-link-card-image) {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--gi-border);
  border-radius: 18px;
  background: var(--gi-surface);
}
.geniart-content .wp-block-column > figure.geniart-link-card-image {
  margin: 0;
}
.geniart-content figure.geniart-link-card-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
.geniart-content .wp-block-column:has(> .geniart-link-card-image) > :not(.geniart-link-card-image) {
  margin: 0.75rem 1rem;
  text-align: left !important;
  overflow-wrap: anywhere;
}
.geniart-youtube {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 250px;
  padding: 1.25rem;
  border: 1px solid var(--gi-border);
  border-radius: 18px;
  background: linear-gradient(135deg, #241533, #12111f);
  text-align: center;
}
.geniart-youtube__play {
  padding: 1rem;
  border: 1px solid #a69cb9;
  border-radius: 12px;
  background: #292033;
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.geniart-youtube__play:focus-visible { outline: 3px solid #ffb23e; outline-offset: 4px; }
.geniart-youtube__notice, .geniart-youtube__fallback { font-size: 0.85rem; }
.geniart-youtube iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.geniart-youtube.is-playing .geniart-youtube__notice { display: none; }
/* Direct player for native YouTube blocks, including already migrated posts. */
.geniart-content .geniart-youtube--embedded {
  display: block;
  width: 75%;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  margin-block: 1.75rem;
  margin-inline: auto;
  border: 0;
  background: none;
}
.geniart-youtube--embedded iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}
/* In a multi-column row, the player fills its own column. */
.geniart-content .wp-block-columns:has(> .wp-block-column:nth-child(2)) > .wp-block-column .geniart-youtube--embedded {
  width: 100%;
}
/* Headings at the start of a column align with adjacent media. */
.geniart-content:not(.geniart-content--legacy-fusion) .wp-block-column > :is(h2, h3, h4):first-child,
.geniart-content:not(.geniart-content--legacy-fusion) .wp-block-column > .wp-block-group:first-child > :is(h2, h3, h4):first-child {
  margin-block-start: 0;
}
.geniart-youtube--embedded .geniart-youtube__fallback {
  display: inline-block;
  margin-top: 0.5rem;
}
@media (max-width: 767px) {
  .geniart-content .geniart-youtube--embedded { width: 100%; }
}
@media (max-width: 900px) {
  .wp-block-gallery.geniart-gallery-masonry.has-nested-images { column-count: 2; }
  .wp-block-gallery.geniart-gallery-masonry.columns-1 { column-count: 1; }
}
@media (max-width: 560px) {
  .wp-block-gallery.geniart-gallery-masonry.has-nested-images { column-count: 1; }
}
/* Restore the original text wrapping of these editorial illustrations. */
:is(.postid-5564, .postid-8182) .geniart-article__content img.alignright {
  float: right;
  max-width: 45%;
  height: auto;
  margin: 0 0 1.5rem 1.75rem;
}
:is(.postid-5564, .postid-8182) .geniart-article__content :is(h1, h2, h3, hr) { clear: both; }
:is(.postid-5564, .postid-8182) .geniart-migrated-layout-container::after { content: ''; display: block; clear: both; }
@media (max-width: 767px) {
  :is(.postid-5564, .postid-8182) .geniart-article__content img.alignright {
    float: none;
    display: block;
    max-width: 100%;
    margin: 1.25rem auto;
  }
}
 
/* New and existing ordinary pages share the same native editorial width. */
.geniart-page__content:not(.geniart-content--legacy-fusion) {
  --wp--style--global--content-size: 1200px;
  --wp--style--global--wide-size: 1200px;
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}
/* Preserve the narrower legal pages and their established text treatment. */
:is(.page-id-2480,.page-id-3) .geniart-page__content {
  --wp--style--global--content-size: 1000px;
  max-width: 1000px;
}
:is(.page-id-70,.page-id-2480,.page-id-3,.page-id-11810,.page-id-11457,.page-id-12114,.page-id-12170) .geniart-page__content p { margin-block:0 1.3em; }
:is(.page-id-2480,.page-id-3) .geniart-page__content h2 { font-size:clamp(1.5rem,2.5vw,2rem); margin-block:2.5rem 1rem; }
:is(.page-id-11457,.page-id-12114,.page-id-12170) .geniart-resource-card { border:1px solid var(--gi-border,#38323f); border-radius:18px; background:#15111f; overflow:hidden; padding:0 1rem 1rem; }
:is(.page-id-11457,.page-id-12114,.page-id-12170) .geniart-resource-card > figure { margin:0 -1rem 1rem; }
:is(.page-id-11457,.page-id-12114,.page-id-12170) .geniart-resource-card > figure img { display:block; width:100%; height:auto; aspect-ratio:auto; object-fit:contain; border-radius:0; }
:is(.page-id-11457,.page-id-12114,.page-id-12170) .geniart-resource-card h2 { font-size:1.4rem; }
:is(.page-id-11457,.page-id-12114,.page-id-12170) .geniart-resource-card h3 { font-size:1.25rem; }
.geniart-toolbox-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.5rem; margin-block:1rem 3rem; }
.geniart-toolbox-overview__card { padding:1.5rem; background:#15111f; border:1px solid var(--gi-border,#38323f); border-radius:18px; }
.geniart-content .geniart-toolbox-overview__card h2 { margin:0 0 1rem; font-size:1.4rem; }
.geniart-toolbox-overview__card h2::before { display:none; }
.geniart-simple-related { margin-block:3rem; }
.geniart-detector { margin-block:1.5rem; }
@media(max-width:900px){.geniart-toolbox-overview{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.geniart-toolbox-overview{grid-template-columns:1fr;}}
/* Simple page QA: nested rows must stay inside their parent column. */
:is(.page-id-70,.page-id-11810,.page-id-11457,.page-id-12114,.page-id-12170) .geniart-page__content .wp-block-column .alignwide { width:100%; max-width:100%; margin-inline:0; transform:none; }
.page-id-70 .fusion-form > .fusion-fullwidth { border:0; }
.page-id-70 .geniart-page__content .fusion-form input:not([type=checkbox]):not([type=radio]), .page-id-70 .geniart-page__content .fusion-form textarea { width:100%; box-sizing:border-box; padding:.85rem 1rem; color:#f7f4ff; background:#15111f; border:1px solid #51475f; border-radius:10px; font:inherit; }
.page-id-70 .geniart-page__content .fusion-form textarea { min-height:180px; }
.page-id-70 .geniart-page__content .fusion-form .fusion-form-field { margin-bottom:1rem; }
.page-id-70 .geniart-page__content .fusion-form button { padding:.8rem 1.5rem; border:0; border-radius:999px; background:#745cff; color:white; font:inherit; cursor:pointer; }
.page-id-70 .geniart-page__content img, :is(.page-id-11810,.page-id-11457,.page-id-12114,.page-id-12170) .geniart-page__content img { contain:none !important; contain-intrinsic-size:none !important; }
/* Give linked Prompter banners a definite width before lazy images load. */
.page-id-12114 .geniart-resource-card > figure > a { display:block; width:100%; }
/* Original image tools: host-page layout and light-surface contrast only. */
.page-id-12113 .geniart-page__content { width:min(1200px,calc(100% - 2rem)); margin-inline:auto; }
.page-id-12113 #ar-tool { background:#fff; color:#111827; }
/* Tool cover beside the title; existing full-width covers elsewhere are unchanged. */
.geniart-tool-hero { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:clamp(2rem,5vw,5rem); align-items:center; padding-top:clamp(155px,13vw,195px); padding-bottom:2.5rem; }
.geniart-tool-hero > .geniart-page__header { width:100%; max-width:none; margin:0; padding:0 0 0 clamp(0px,8vw,120px); min-width:0; }
.geniart-tool-hero > .geniart-page__cover { width:100%; max-width:none; margin:0; border-radius:24px; box-shadow:none; }
.geniart-tool-hero > .geniart-page__cover img { width:100%; height:auto; max-height:none; object-fit:contain; }
/* Top IA: carte large retains its banner; carte medium has a compact split header. */
.page-id-11457 .geniart-card--medium { background:#15111f; border:1px solid var(--gi-border,#38323f); border-radius:18px; padding:1rem; overflow:hidden; }
.page-id-11457 .geniart-card--medium > .wp-block-columns { display:grid !important; grid-template-columns:minmax(60px,1fr) minmax(0,2fr); align-items:stretch; gap:.75rem; width:100%; max-width:100%; margin:0 !important; transform:none; }
.page-id-11457 .geniart-card--medium > .wp-block-columns > .wp-block-column { min-width:0; margin:0; }
.page-id-11457 .geniart-card--medium > .wp-block-columns > .wp-block-column:last-child { display:flex; justify-content:center; align-items:center; text-align:center; }
.page-id-11457 .geniart-card--medium h4 { width:100%; margin:0; padding:0; font-size:clamp(1rem,1.35vw,1.35rem); overflow-wrap:anywhere; }
.page-id-11457 .geniart-card--medium figure { margin:0; }
.page-id-11457 .geniart-card--medium figure img { display:block; width:100%; height:auto; aspect-ratio:1 !important; object-fit:contain; border-radius:12px; }
.page-id-11457 .geniart-page__content .geniart-card--medium > hr { margin:1rem 0; }
.page-id-11457 .geniart-card--medium > p { margin:0 0 1rem; }
.page-id-11457 .geniart-card--medium > p:last-child { margin-bottom:0; }
@media(max-width:767px) {
 .geniart-tool-hero { grid-template-columns:1fr; padding-top:150px; gap:1.5rem; }
 .geniart-tool-hero > .geniart-page__header { padding:0; }
 .geniart-tool-hero > .geniart-page__cover { max-width:520px; justify-self:center; }
}
