/* p4-light.css — Phase 4 staging: the light /en/home on veined paper with woven and engraved chrome in the ship's language.
   EVERY rule is under html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])), so dark mode is untouched. Decoration only: pseudo-elements and backgrounds,
   pointer-events:none, never over text. Language: veins, rope-twist woven bands, pointed arches with ONE upright mullion. No cross, no '+'. */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])){
  --p4-paper:#f7f2e6; --p4-vellum:#fffaf0; --p4-iron:#2b261f; --p4-gold:#b8893c; --p4-amber:#a8681c; --p4-rule:#d6c7a6;
  --line:#d6c7a6;
}
/* 1. the ground (replaces paper-grid.svg and its '+') */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) body{background-color:var(--p4-paper);background-image:url(chrome/veined-paper.svg);background-size:640px 640px /* v1 kept */}

/* 2. woven header rule: a rope twist under the header bar */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .bar{position:relative;border-bottom:0}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .bar::after{content:"";position:absolute;left:0;right:0;bottom:-7px;height:14px;background:url(chrome/woven-rule.svg) repeat-x 0 0/12px 14px;pointer-events:none;z-index:1}

/* 3. arcade section dividers (replace the 1px band rule): pointed arches, one upright mullion each, double gold rules, vein tendrils, rivets */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main.home2 .band{border-top:0}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main.home2 .band::before{content:"";position:absolute;top:-18px;left:50%;transform:translateX(-50%);width:min(520px,92%);height:36px;background:url(chrome/divider-arcade.svg) center/contain no-repeat;pointer-events:none}

/* 4. section headings: a gold vein under each chapter heading (below the text, never over it) */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main.home2 h2[id^="ch-"]{background:url(chrome/heading-vein.svg) no-repeat 0 100%/120px 10px;padding-bottom:18px}

/* 5. cards on vellum with engraved corner brackets (vein curl at each elbow) */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main .card,
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main .demo-card{background-color:var(--p4-vellum);border-color:var(--p4-rule);box-shadow:0 1px 0 rgba(43,38,31,.06),0 6px 18px -10px rgba(80,55,20,.25)}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main.home2 .demo-card{overflow:visible}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) main .card::before{content:"";position:absolute;inset:5px;pointer-events:none;
  background:url(chrome/corner-tl.svg) top left/22px no-repeat,url(chrome/corner-tr.svg) top right/22px no-repeat,url(chrome/corner-bl.svg) bottom left/22px no-repeat,url(chrome/corner-br.svg) bottom right/22px no-repeat}

/* 6. the herald / film band and the Borjghali door card get a vellum panel with rope edges */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .herald-band{background:url(chrome/woven-rule.svg) repeat-x 0 0/12px 14px,url(chrome/woven-rule.svg) repeat-x 0 100%/12px 14px,linear-gradient(#fbf6ea,#f3e9d2);padding-top:22px;padding-bottom:22px}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .bj-door{box-shadow:0 0 0 2px #c6ff3d,0 0 0 3px var(--p4-iron),0 10px 24px -12px rgba(60,40,10,.45)}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) .bj-door:focus-visible{outline:3px solid #252420;outline-offset:4px}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) .bj-door:hover{box-shadow:0 0 0 2px #d8ff7a,0 0 0 3px #252420}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) .bj-door:active{box-shadow:0 0 0 2px #a7e524,0 0 0 3px #252420}

/* 7. footer: the night drawings become round-topped "ship windows" (gold + iron frame, ROUND top since Sentry 10:24 — files keep the old lancet-* names; no bars) instead of plain dark boxes */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) footer.foot{position:relative;border-top:0;background:linear-gradient(rgba(243,233,210,.0),rgba(243,233,210,.65) 140px)}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot :is(.foot-art-mid,.foot-way){position:relative;border-radius:0;padding:34px 16px 16px;--p4-footer-paper:#f7f2e6;background:transparent;isolation:isolate}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot :is(.foot-art-mid,.foot-way)::before{content:"";position:absolute;z-index:-1;inset:3.5px;border-radius:24.5px;background:var(--p4-footer-paper);pointer-events:none}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot :is(.foot-art-mid,.foot-way)::after{content:"";position:absolute;inset:0;background:url("/v3/k89/lancet-frame-eb8f2a6ec9e0.svg#diamond") center 8px/16px 14px no-repeat;border:0 solid;border-image:url("/v3/k89/lancet-frame-eb8f2a6ec9e0.svg#frame") 28 / 28px / 0 round;pointer-events:none}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-art-mid::after{border-image-repeat:stretch round}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-way .foot-qr,html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-way .foot-way-in::after{position:absolute;left:17.04%;top:31%;width:63.59%}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-way .foot-way-in::after{content:"";z-index:0;aspect-ratio:1;border-radius:2.424%;background:var(--p4-footer-paper);pointer-events:none}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-way .foot-qr{z-index:1;mix-blend-mode:darken}
html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-way .foot-band{content:url("/p4v2/pics/p1-foot-band-clear-846-40179c4af1fc.webp")}
@media (max-width:599px){html:root:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"],[data-theme="dark"],[data-theme="eclipse"])) footer.foot .foot-way .foot-band{content:url("/p4v2/pics/p1-foot-band-clear-423-f1fc9c9e680f.webp")}}
/* the Earth–Mars space band: rope edges so it reads as a framed chart, not a black slab */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .space-band{position:relative;box-shadow:0 0 0 3px var(--p4-gold),0 0 0 4px var(--p4-iron)}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .space-band::before,
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .space-band::after{content:"";position:absolute;left:0;right:0;height:14px;background:url(chrome/woven-rule.svg) repeat-x 0 0/12px 14px;pointer-events:none;z-index:2}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .space-band::before{top:-17px}
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .space-band::after{bottom:-17px}

/* 8. the guide rail (Earth → Mars): an amber ink thread instead of the plain line */
html:not(:is([data-zx-theme="dark"],[data-zx-theme="eclipse"])) .zx-guide{--p4-thread:var(--p4-amber)}
