/* Native chapters: paper, ink and light registration. Only the inserted plate is
   painted; photography, brand worlds, the shared outro and forms keep their own layers. */
@layer tmg-chapter-flow {
 /* Managed pages already provide 130px scroll-padding on the document. Avoid
    counting the sticky masthead twice; add only breathing room and WP's bar. */
 .tmg-site.tmg-flow-ready .tmg-flow-scene {scroll-margin-block-start:clamp(2px,1vw,14px);}
 .tmg-site.tmg-flow-ready.admin-bar .tmg-flow-scene {scroll-margin-block-start:calc(var(--wp-admin--admin-bar--height,32px) + 6px);}
 .tmg-chapter-theme.tmg-flow-ready .tmg-flow-scene {scroll-margin-block-start:calc(var(--wp-admin--admin-bar--height,0px) + 18px);}
 .tmg-site.tmg-flow-ready .tmg-flow-scene[data-tmg-flow-decor="yes"] {
  position:relative;isolation:isolate;
  --tmg-plate-wash:#31516e40;--tmg-plate-edge:#9484731b;--tmg-plate-hair:#b7afa15c;
 }
 .tmg-site.tmg-flow-ready [data-tmg-flow-decor="yes"][data-tmg-flow-surface="navy"] {--tmg-plate-wash:#38577042;--tmg-plate-edge:#9c816021;--tmg-plate-hair:#baad975f;}
 .tmg-site.tmg-flow-ready [data-tmg-flow-decor="yes"][data-tmg-flow-surface="slate"] {--tmg-plate-wash:#5c788947;--tmg-plate-edge:#b39c7c25;--tmg-plate-hair:#d2bd9866;}
 .tmg-site.tmg-flow-ready [data-tmg-flow-decor="yes"][data-tmg-flow-surface="paper"] {--tmg-plate-wash:#e1cfb24d;--tmg-plate-edge:#a2bac230;--tmg-plate-hair:#68675e62;}
 .tmg-site .tmg-flow-plate {
  position:absolute;z-index:-1;inset:0;display:block;overflow:hidden;pointer-events:none;user-select:none;
  /* Each end lands on the underlying surface instead of a hard horizontal band. */
  background:radial-gradient(ellipse at 85% 49%,var(--tmg-plate-wash),transparent 64%),
    radial-gradient(ellipse at 14% 64%,var(--tmg-plate-edge),transparent 45%);
  mask-image:linear-gradient(transparent,#000 19%,#000 77%,transparent);
 }
 .tmg-site .tmg-flow-plate::before {
  content:"";position:absolute;inset:12% max(15px,2.8vw) 12% auto;width:clamp(50px,8.5vw,180px);
  background:linear-gradient(90deg,transparent 0%,var(--tmg-plate-hair) 100%) right 14% / 52% 1px no-repeat,
   linear-gradient(var(--tmg-plate-hair),transparent) right 14% / 1px 26% no-repeat,
   linear-gradient(90deg,transparent,var(--tmg-plate-hair)) right 82% / 24% 1px no-repeat;
  transform:translateY(calc((var(--tmg-flow-phase,.5) - .5) * -18px));opacity:.72;
 }
 /* An oblique, feathered reflection; only ambient light moves, never copy or hit targets. */
 .tmg-site .tmg-flow-plate::after {
  content:"";position:absolute;width:min(70%,80rem);height:min(85%,55rem);right:-8%;top:8%;
  background:linear-gradient(133deg,transparent 29%,var(--tmg-plate-edge) 49%,transparent 50%,transparent);
  opacity:.7;transform:translateY(calc((var(--tmg-flow-phase,.5) - .5) * 25px));
 }
 .tmg-site :is(.tmg-story-reading,.tmg-journal-directory)>.tmg-flow-plate {
  /* Insets float within a larger continuous sheet: dissolve horizontally as well. */
  mask-image:radial-gradient(ellipse at 54% 50%,#000 0%,rgb(0 0 0 / .85) 36%,transparent 73%);
 }
 .tmg-site .tmg-journal-home>.tmg-flow-plate {mask-image:linear-gradient(transparent 9%,#000 37%,#000 65%,transparent 91%);}
 .tmg-site .tmg-manifesto>.tmg-flow-plate {opacity:.30;}
 .tmg-site .tmg-flow-scene[data-tmg-flow-decor="yes"].tmg-connect-faq {--tmg-plate-wash:#44677a3b;}
 .tmg-site .tmg-flow-scene[data-tmg-flow-decor="yes"].tmg-brand-section--overview {--tmg-plate-wash:color-mix(in srgb,var(--profile-tone,#a8b9bf) 13%,transparent);}
 .tmg-site.tmg-home .tmg-flow-scene[data-tmg-flow-decor="yes"].tmg-intro {--tmg-plate-wash:transparent;--tmg-plate-edge:#ffffff06;--tmg-plate-hair:#ffffff38;}
 /* A chromatic route through plain editorial sections. Each gradient returns
    to the existing edge colour; no artificial seams alongside image sections. */
 .tmg-site .tmg-flow-scene[data-tmg-flow-decor="yes"]:is(.tmg-brand-section--topics,.tmg-brand-section--formats,.tmg-brand-section--audience)>.tmg-flow-plate {
  background:radial-gradient(ellipse at 90% 48%,var(--tmg-plate-edge),transparent 55%),linear-gradient(135deg,#1221318c,#14293d77 52%,#14243274);
 }
 .tmg-site .tmg-flow-scene[data-tmg-flow-decor="yes"].tmg-page-body>.tmg-flow-plate {--tmg-plate-wash:#4b6a844d;}
 .tmg-site .tmg-flow-scene[data-tmg-flow-decor="yes"][data-tmg-flow-surface="paper"].tmg-page-body>.tmg-flow-plate {--tmg-plate-wash:#d7bf9d4d;}
 @media(max-width:800px) {
  .tmg-site .tmg-flow-plate::before {width:32px;inset-inline-end:8px;opacity:.4;}
  .tmg-site .tmg-flow-plate::after {width:80%;opacity:.45;}
 }
 .tmg-flow-still .tmg-flow-plate::before,.tmg-flow-still .tmg-flow-plate::after {transform:none;}
 @media(prefers-reduced-motion:reduce) {.tmg-site .tmg-flow-plate::before,.tmg-site .tmg-flow-plate::after {transform:none;}}
 @media print,(forced-colors:active) {.tmg-site .tmg-flow-plate {display:none;}}
}
