/* /agentic-erp/ · one background for the whole scroll (Saife 2026-10-19: "change the whole background of this all ...
   so its one consistent background as i scroll"). Under html.erp-world one plate is fixed behind the page and every
   section is see-through: the hero plate, the chapter plates, plates.js's section plates and the ground-coloured
   fades at each seam are switched off; each section's own haze and the scrims behind its copy stay. The plate is
   deep ocean (style 4, Saife 2026-10-19), dawn from 06:00 to 17:59 on the visitor's clock; build.py WORLD_JS sets
   the class and the plate (variations in gen/agentic-erp/bg-v/, web copies in img/erp/world/). ?bg=0 drops the
   class and shows the old per-section plates. */
.erp-world-bg { display: none; }
.erp-world .erp-world-bg { display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--world) center / cover no-repeat, #0a0814; }
/* a light, even veil so cards and copy read the same way on every part of the plate */
.erp-world .erp-world-bg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 55%, rgb(10 8 20 / .12), rgb(10 8 20 / .45) 100%); }
@media (max-width: 760px) { .erp-world .erp-world-bg { background-image: var(--world-p); } }

.erp-world body > main > section, .erp-world body section.hero, .erp-world .erp .erpch { background-color: transparent !important; }
/* the hero plate is hidden, not removed: octo.js stands the octopus on its floor line, so its box must keep its size */
.erp-world .hero__plate { visibility: hidden; }
.erp-world .lh__plate, .erp-world .ep-plate, .erp-world .hero__floor { display: none !important; }
.erp-world .erp .erpch::before, .erp-world .erp .erpch::after { display: none; }
/* the dawn plates are brighter, so the veil is heavier by day: the grey ledes must still read on the lightest sky */
.erp-world--day .erp-world-bg::after { background: radial-gradient(120% 90% at 50% 55%, rgb(10 8 20 / .3), rgb(10 8 20 / .58) 100%); }

/* the top bar: no strip, no edge (Saife 2026-10-19, "remove these lines so it scrolls naturally and blends"). The bar's
   own dark fill, blur and scrolled border made a hard line that everything scrolled under. Here the bar is clear and
   a layer behind its links darkens the page under it, fading out below the bar, so the page dissolves
   into the nav */
.erp-world .bar, .erp-world .bar.is-scrolled { background: none; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.erp-world .bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 56px); z-index: -1; pointer-events: none;
  /* a plain gradient only, eased to nothing: a blur layer (backdrop-filter) keeps a hard edge wherever a browser
     ignores its mask, which was the line still showing (Saife 2026-10-19, "there is still this horizontal lines") */
  background: linear-gradient(180deg, rgb(10 8 20 / .8) 0%, rgb(10 8 20 / .66) 30%, rgb(10 8 20 / .44) 50%, rgb(10 8 20 / .24) 66%,
    rgb(10 8 20 / .1) 80%, rgb(10 8 20 / .03) 91%, rgb(10 8 20 / 0) 100%); }

/* the chapters' own light layers end at the chapter's edge. With the ground fades gone they were cut off flat there,
   a line at every chapter join, and on phones the mist's near-black foot (behind the copy) made a black block with a
   hard edge (Saife 2026-10-19, "there is still this horizontal lines"; found by lab/agentic-erp/edgescan.mjs).
   Every one of them now fades to nothing before the edge, top and bottom. */
.erp-world .erpch > .lh__haze, .erp-world .erpch > .lh__mist, .erp-world .erpch > .lh__scrim, .erp-world .erpch > .lh__motes {
  /* eased in and out, not a straight ramp: a linear fade ending on a flat ground leaves a kink the eye reads as a line */
  --ease-fade: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / .1) 4%, rgb(0 0 0 / .35) 9%, rgb(0 0 0 / .68) 14%, rgb(0 0 0 / .92) 19%, #000 23%,
    #000 66%, rgb(0 0 0 / .92) 72%, rgb(0 0 0 / .68) 80%, rgb(0 0 0 / .35) 88%, rgb(0 0 0 / .1) 95%, transparent 100%);
  -webkit-mask-image: var(--ease-fade); mask-image: var(--ease-fade); }
@media (max-width: 700px) {
  .erp-world .erp .erpch .lh__mist { background:
    radial-gradient(60% 10% at 50% 50%, color-mix(in oklab, var(--lh) 14%, transparent), transparent 72%),
    linear-gradient(to top, rgb(10 8 20 / 0) 0%, rgb(10 8 20 / .78) 16%, rgb(10 8 20 / .62) 34%, rgb(10 8 20 / .16) 54%, transparent 64%); }
}
/* section-wide violet washes stop at their section's edge too, and their section holds content, so it cannot be
   masked: the one background lights these sections instead */
.erp-world .erp .lhaze, .erp-world .erp .haze, .erp-world .erp .ad__stage { background-image: none !important; }

/* the octopus sinks a little as the hero scrolls away (the subject plane's parallax, v2.js), and the hero clipped it
   at its foot: a flat line through its glow and shadow under the tentacles (Saife 2026-10-19, "i still see those lines").
   The hero's floor fade used to hide that cut. Here the hero clips only sideways, so the octopus passes over the
   join; the TagFlow chapter's own layers fade in from nothing at its top, so nothing covers it there. */
.erp-world .erp section.hero { overflow: visible; overflow-x: clip; }
/* the chapters had the same cut: their light layers move with the scroll too, so their boxes reach past the chapter's
   foot and the fade at the bottom of each layer's mask fell below the clip, leaving a dark band ending in a straight
   line (found on a flat ground by edgescan.mjs). Clipped sideways only, each layer now fades out in full. */
.erp-world .erp .erpch { overflow: visible; overflow-x: clip; }
