/* P2 isolated demo modules. P1 tokens and layouts are untouched. */
.jby-p2-modules-page { min-height: 50vh; }
.jby-p2-fallback-heading { padding-top: clamp(42px, 6vw, 80px); }
.jby-p2-fallback-heading h1 { margin-bottom: 0; }
.jby-p2-demo-module { padding: var(--jby-section-space) 0; scroll-margin-top: calc(var(--jby-header-height) + var(--jby-admin-bar-offset) + 20px); }
.jby-p2-demo-module + .jby-p2-demo-module { border-top: 1px solid var(--jby-border); }
.jby-p2-demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: center; gap: clamp(25px, 5vw, 84px); }
.jby-p2-demo-title { font-family: var(--jby-serif); font-size: clamp(30px, 3.1vw, 42px); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 20px; }
.jby-p2-demo-body { max-width: 760px; }
.jby-p2-demo-module.jby-p2-p2_demo_text .jby-p2-demo-grid { grid-template-columns: 1fr; max-width: 900px; }
.jby-p2-demo-body table { display: table; border-collapse: collapse; width: max-content; max-width: none; overflow: visible; }
.jby-p2-demo-body table.aligncenter, .jby-p2-page-optional-content table.aligncenter, .jby-entry-content table[align="center"] { margin-inline: auto; }
.jby-p2-demo-body table.alignright, .jby-p2-page-optional-content table.alignright, .jby-entry-content table[align="right"] { margin-left: auto; margin-right: 0; }
.jby-p2-demo-body table.alignleft, .jby-p2-page-optional-content table.alignleft, .jby-entry-content table[align="left"] { margin-left: 0; margin-right: auto; }
.jby-p2-demo-body td, .jby-p2-demo-body th, .jby-p2-page-optional-content td, .jby-p2-page-optional-content th { border: 1px solid var(--jby-border); padding: 9px 12px; min-width: 76px; }
.jby-p2-demo-body blockquote { border-left: 3px solid var(--jby-gold); padding-left: 15px; }
.jby-p2-demo-body img { max-width: 100%; height: auto; }
.jby-p2-demo-art { aspect-ratio: 4/3; background: #eeeae3; overflow: hidden; display: grid; place-items: center; }
.jby-p2-demo-art img, .jby-p2-demo-art video { width: 100%; height: 100%; object-fit: contain; display: block; }
.jby-p2-demo-art a { width: 100%; height: 100%; display: grid; place-items: center; }
.jby-p2-media-placeholder { letter-spacing: .1em; font-size: 11px; color: #5d554e; text-align: center; }
.jby-p2-variant-media_right .jby-p2-demo-art { order: 2; }
.jby-p2-variant-media_right .jby-p2-demo-copy { order: 1; }
.jby-p2-demo-module.jby-p2-variant-compact .jby-p2-demo-grid { max-width: 900px; grid-template-columns: 1fr; }
.jby-p2-demo-copy .jby-btn { margin-top: 18px; }
.jby-p2-page-optional-content { padding-bottom: 65px; }
.jby-p2-lightbox { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 64px 20px 20px; background: rgba(15,16,18,.90); }
.jby-p2-lightbox img { object-fit: contain; max-width: 94vw; max-height: 82vh; }
.jby-p2-lightbox-close { position: absolute; top: 16px; right: 22px; color: #fff; background: none; border: 1px solid #aaa; border-radius: 3px; padding: 10px 15px; cursor: pointer; }
.jby-p2-lightbox-open { overflow: hidden; }
@media(max-width: 780px) { .jby-p2-demo-grid { grid-template-columns: 1fr; } .jby-p2-variant-media_right .jby-p2-demo-art { order: 0; } .jby-p2-variant-media_right .jby-p2-demo-copy { order: 1; } }
