/* Restore the supplied NDJ compositions; scoped adapters for the static publisher. */
:root{--ndj-home-card:#fff;--ndj-home-text:#172033;--ndj-home-muted:#617086;--ndj-home-border:rgba(15,23,42,.12);--ndj-home-blue:#2563eb;--ndj-home-blue-dark:#1d4ed8;--ndj-home-green:#047857;--ndj-home-radius-lg:28px;--ndj-home-radius-md:20px;--ndj-home-shadow:0 24px 70px rgba(15,23,42,.14);--ndj-home-shadow-soft:0 16px 45px rgba(15,23,42,.08)}
body{background:#f2efff;color:#101026}
body,h1,h2,h3,h4,h5,h6{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
h1,h2,h3,h4,h5,h6{font-family:"Plus Jakarta Sans",Inter,system-ui,sans-serif}
.ndjtools-page section,.wealthcurve-page section,.ndj-support-page section,.ndj-privacy-hub-page section,.home-reference section{padding:0}
.ndjtools-page .ndjtools-hero{padding:64px 32px}
.ndjtools-page .ndjtools-support{padding:32px}
.wealthcurve-page .wc-hero{padding:56px 34px}
.wealthcurve-page .wc-webapp-launch{padding:32px 0}
.ndj-support-page .ndj-support-card,.ndj-privacy-hub-page .ndj-privacy-card{padding:28px}
main.ndj-support-page,main.ndj-privacy-hub-page{padding:42px 20px 64px}
.ndj-support-page .ndj-support-card-grid,.ndj-privacy-hub-page .ndj-privacy-card-grid{min-width:0}
.ndj-support-page .ndj-support-hero p,.ndj-privacy-hub-page .ndj-privacy-hub-hero p{color:#e7e9ff}
.ndj-support-page .ndj-support-main,.ndj-privacy-hub-page .ndj-privacy-main{display:grid;gap:24px;margin-top:24px}
.ndjtools-carousel.single-item{grid-auto-columns:minmax(0,1fr)}
.ndjtools-carousel>*{min-width:0}
.ndjtools-card-content{min-width:0}
.ndjtools-section h2,.wc-section h2{color:#101026}
.ndjtools-hero h1{color:#101026}
.ndjtools-note{margin-top:48px}
.ndjtools-support{margin-top:42px}
.ndjtools-support h2,.ndjtools-support p{color:#fff}
.ndjtools-card-buttons a{font-size:.95rem}
.ndjtools-card-large{grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr)}
.ndjtools-carousel-controls[hidden],.back-to-top[hidden]{display:none!important}
.ndjtools-carousel-controls{align-self:flex-end}
.ndjtools-card:focus-within{outline:2px solid #6528f7;outline-offset:-2px}
.home-reference{padding:28px 20px 64px}
.home-reference .ndj-home-hero{padding:clamp(30px,4.6vw,58px);background:linear-gradient(135deg,#16192c,#4640b7)}
.home-reference .ndj-home-hero h1{font-size:clamp(2.35rem,5.7vw,4.8rem);line-height:1.08;color:#fff}
.home-reference .ndj-home-hero p{color:#edf0ff;font-size:1.15rem;line-height:1.75}
.home-reference .ndj-home-trust-strip{margin-top:30px}
.home-reference .ndj-home-trust-card strong{line-height:1.5}
.home-reference .ndj-ref-section{margin-top:28px;padding:0}
.ndj-ref-intro{border:1px solid #c9d1ff;border-radius:26px;background:linear-gradient(145deg,#eef2ff,#fff 75%);padding:28px 30px;margin-bottom:20px;box-shadow:0 15px 38px rgba(27,23,66,.055)}
.ndj-ref-kicker,.portal-kicker{font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#4222bf;font-size:.8rem}
.ndj-ref-intro h2{font-size:clamp(1.5rem,3vw,2.25rem);letter-spacing:-.045em;line-height:1.18;margin:.35rem 0 .65rem}
.ndj-ref-intro p{margin:.3rem 0 1.05rem}
.ndj-ref-intro .ndj-home-button{background:linear-gradient(135deg,#6e17f8,#354bed);color:#fff;box-shadow:0 8px 22px rgba(75,31,210,.18);padding:10px 17px}
.reference-portals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.reference-portals .home-portal{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;border-radius:25px;border:1px solid #dad4ff;background:linear-gradient(#fff,#fbfaff);box-shadow:0 13px 32px rgba(31,18,75,.08)}
.reference-portals .home-portal img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:0;display:block;background:#faf7e8}
.reference-portals .home-portal>div{padding:15px 17px 19px}
.reference-portals .home-portal h3{font-size:1.25rem;margin:.45rem 0 .35rem;color:#101026}
.reference-portals .home-portal p{font-size:.95rem;line-height:1.6;color:#536078}
.ndj-ref-content{padding:22px;background:#fff;border:1px solid #e1ddf5;border-radius:18px}
.home-reference .recent-language{padding:0;margin-bottom:24px}
.home-reference .recent-language:last-child{margin-bottom:0}
.home-reference .recent-language h3{font-size:1.12rem}
.reference-tool-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.reference-image-tile{position:relative;display:block;aspect-ratio:1;border-radius:18px;overflow:hidden;background:#eee9fa;color:#fff;text-decoration:none;box-shadow:0 8px 20px rgba(24,19,45,.1)}
.reference-image-tile img{width:100%;height:100%;object-fit:cover;display:block}
.reference-image-tile::after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.75))}
.reference-image-tile span{position:absolute;bottom:18px;left:18px;right:16px;z-index:1;color:#fff;font-weight:700;line-height:1.35}
.ndj-contact-preview{margin-top:22px;padding:26px;border:1px solid #dfdef1;border-radius:20px;background:#f9f8ff}
.ndj-contact-preview fieldset{margin:18px 0;border:0;padding:0;display:grid;gap:14px}
.ndj-contact-preview legend{font-weight:700;margin-bottom:12px}
.ndj-contact-preview label{display:grid;gap:5px;font-size:.9rem;font-weight:650;color:#393047}
.ndj-contact-preview input,.ndj-contact-preview textarea{width:100%;border:1px solid #dedcec;border-radius:9px;background:#fff;color:#30303e;padding:10px;font:inherit}
.ndj-contact-preview textarea{resize:none}
.preview-functional-note{padding:12px 15px;border-left:3px solid #6528f7;background:#f0eaff;font-size:.88rem;color:#3c3354}
.ndj-support-crypto-note{background:#fffaf0;border:1px solid #efdcaf;border-radius:14px;padding:15px;margin-bottom:18px}
.ndj-support-shell>.ndj-support-card{margin-top:24px}
.wcwl-copy-toast{display:none!important}
.wc-visual,.wcwl-preview{min-width:0}
.reference-inner .site-header{background:#6500ed;color:#fff;border:0}
.reference-inner .site-header a,.reference-inner .site-header summary{color:#fff}
.reference-inner .site-header .subnav div a{color:#21124c}
.reference-inner .site-header a:hover{background:rgba(255,255,255,.12)}
.reference-inner .site-header .site-brand{background:#fff;border-radius:0;padding:4px}
.reference-inner .menu-toggle{background:#fff;color:#46138d;border-color:#fff}
.reference-home .site-header{background:#f1effb;color:#101026}
.reference-home .site-header a,.reference-home .site-header summary{color:#191044}
.reference-home .site-brand{background:#fff}
.reference-footer{background:#fafafa;color:#23324e;padding:0;border-top:1px solid #e4e0f1;text-align:center}
.reference-footer .footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:22px;padding:30px 20px}
.reference-footer a{color:#6010e5;font-weight:500}
.reference-footer>p{margin:0;padding:20px;border-top:1px solid #dad2f6;background:#f2efff;font-size:.94rem}
.back-to-top{position:fixed;right:18px;bottom:18px;display:grid;place-items:center;width:36px;height:36px;color:#fff;background:#6500ed;text-decoration:none;border-radius:4px;font-size:24px;z-index:40}
main[id],section[id]{scroll-margin-top:110px}
@media(max-width:900px){.ndjtools-card-large{grid-template-columns:minmax(0,1fr)}.ndjtools-visual{min-height:270px}.reference-portals{grid-template-columns:repeat(2,minmax(0,1fr))}.ndjtools-card-large h3{font-size:3rem}.home-reference .ndj-home-hero h1{font-size:clamp(2.3rem,6vw,4.1rem)}}
@media(max-width:640px){.home-reference{padding:18px 14px 38px}.home-reference .ndj-home-hero{padding:28px 22px}.home-reference .ndj-home-hero h1{font-size:2.65rem;letter-spacing:-.055em}.home-reference .ndj-home-hero p{font-size:1rem}.home-reference .ndj-home-trust-strip{grid-template-columns:1fr}.ndj-ref-intro{padding:22px}.reference-portals{gap:12px}.reference-portals .home-portal>div{padding:13px}.reference-portals .home-portal h3{font-size:1.1rem}.reference-portals .home-portal p{font-size:.83rem}.portal-kicker{font-size:.66rem}.ndj-ref-content{padding:15px}.reference-tool-tiles{gap:12px;grid-template-columns:1fr}.reference-image-tile{aspect-ratio:1.4}.ndjtools-page .ndjtools-hero{padding:38px 20px}.ndjtools-card-large{padding:23px}.ndjtools-card-large h3{font-size:clamp(2rem,10vw,3rem);overflow-wrap:anywhere}.ndjtools-carousel{grid-auto-columns:100%}.ndjtools-carousel-medium{grid-auto-columns:100%}.ndjtools-card{padding:22px}.ndjtools-card-head{gap:12px}.ndjtools-tags{min-width:0}.ndjtools-tag{font-size:.7rem}.ndjtools-support{display:block}.ndjtools-support h2{font-size:1.8rem}.ndjtools-support .ndjtools-button{margin-top:18px}.wealthcurve-page .wc-hero{padding:30px 22px}main.ndj-support-page,main.ndj-privacy-hub-page{padding:22px 14px 42px}.ndj-support-page .ndj-support-card,.ndj-privacy-hub-page .ndj-privacy-card{padding:23px}.ndj-contact-preview{padding:15px}.ndj-support-page .ndj-support-hero,.ndj-privacy-hub-page .ndj-privacy-hub-hero{padding:30px 22px}.reference-footer .footer-links{gap:14px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.ndjtools-card,.home-portal,.ndjtools-button{transition:none!important}.ndjtools-card:hover,.home-portal:hover{transform:none!important}}

.reference-footer .footer-links{flex-direction:row}

/* Selected links must stay readable on the inherited purple header. */
.reference-inner .nav-links a[aria-current="page"]{background:#fff;color:#36116a}

/* Keep off-screen accessible labels inside their scrolling card. */
.ndjtools-card{position:relative}

/* Source gallery: same thumbnail-grid discovery pattern, not a playlist-logo replacement. */
.source-video-gallery{background:#fff;border:1px solid #e5dfff;padding:24px;margin:20px 0;color:#141832;clear:both}
.source-video-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.source-video-tile{display:block;position:relative;min-width:0;text-decoration:none;color:#fff;background:#101622;aspect-ratio:16/9;overflow:hidden}
.source-video-tile img{width:100%;height:100%;object-fit:contain;display:block;margin:0}
.source-video-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:5px;background:#171b24c9;padding:4px 14px;color:#fff;font-size:20px;line-height:1.5}
.source-video-title{position:absolute;left:0;right:0;bottom:0;padding:6px;background:#091526ed;color:#fff;font-size:12px;line-height:1.3;opacity:0;transition:opacity .15s}
.source-video-tile:hover .source-video-title,.source-video-tile:focus-visible .source-video-title{opacity:1}
.source-video-tile:focus-visible{outline:3px solid #6528f7;outline-offset:4px}
.source-gallery-player{margin-bottom:20px}
.source-gallery-player [data-gallery-frame]{aspect-ratio:16/9;min-height:200px;background:#111}
.source-gallery-player iframe{width:100%;height:100%;border:0;display:block;min-height:200px}
.source-gallery-player button{margin-top:10px;border:1px solid #d6caff;background:#fff;color:#350a80;border-radius:20px;padding:8px 16px;min-height:44px;cursor:pointer}
.source-gallery-actions{margin:16px 0 0;font-size:14px}.source-gallery-hint{font-size:13px;margin:6px 0}
.ndj-mha .grid{overflow-wrap:anywhere}.ndj-mha .row{grid-template-columns:minmax(0,1fr) auto}.ndj-mha .card{overflow-wrap:anywhere}.ndj-mha textarea{max-width:100%}
@media(max-width:800px){.source-video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}}
@media(max-width:440px){.source-video-gallery{padding:14px}.source-video-grid{grid-template-columns:1fr}.ndj-mha .grid{grid-template-columns:1fr}.ndj-mha .row{grid-template-columns:1fr}.ndj-mha .table{font-size:12px}}
@media(prefers-reduced-motion:reduce){.source-video-title{transition:none}}
/* Fit the source game and playlist navigation into narrow viewports without dropping controls. */
@media(max-width:640px){
.source-ndj-brick-game .ndj-brick-wrap{width:100%;padding:8px;min-width:0}
.source-ndj-brick-game .handheld{grid-template-columns:minmax(0,1fr);padding:14px;gap:16px;min-width:0}
.source-ndj-brick-game .screen{padding:10px;min-width:0}
.source-ndj-brick-game .controls{grid-template-columns:minmax(0,1fr)}
.source-ndj-brick-game .topbar{flex-wrap:wrap;gap:8px}
.source-ndj-brick-game .cluster{min-width:0;padding:12px}
.source-ndjwonders table{width:100%;table-layout:fixed}
.source-ndjwonders td{overflow-wrap:anywhere;min-width:0;padding:6px}
}
@media(max-width:640px){
.source-copyright .ndj-list-grid{grid-template-columns:minmax(0,1fr)}
.source-copyright .ndj-content-card,.source-copyright .ndj-list-grid>*{min-width:0;overflow-wrap:anywhere}
}
/* Match the supplied live product composition: text has priority over the illustration. */
@media (min-width: 901px) {
  .source-faithful-page .ndjtools-card-large {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, .65fr);
  }
}

/* Home is one source-ordered 4-by-2 topic gallery, not eight large wrappers. */
.source-home .home-video-gallery{padding:24px;margin:18px auto 34px}
.source-home .home-video-gallery>.source-video-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.source-home .home-video-gallery .source-video-tile{min-width:0;aspect-ratio:16/9}
.source-home .home-video-gallery .source-gallery-actions{margin:12px 0 0;font-size:.8rem}
.source-home .home-video-gallery .source-video-unavailable{display:flex;align-items:center;justify-content:center;padding:15px;text-align:center;background:#efebfa;color:#36116a}
@media(max-width:800px){.source-home .home-video-gallery>.source-video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}}
@media(max-width:440px){.source-home .home-video-gallery{padding:14px}.source-home .home-video-gallery>.source-video-grid{grid-template-columns:minmax(0,1fr)}}

/* v0.3.2: full NDJWonders galleries, separate from Home's preserved 4-column preview. */
.source-full-gallery .source-gallery-player{position:relative;margin:0 auto 24px;width:100%;max-width:100%;background:#000}
.source-gallery-poster{display:block;position:relative;aspect-ratio:16/9;background:#000;overflow:hidden}
.source-gallery-poster img{display:block;width:100%;height:100%;object-fit:contain}
.source-poster-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.8);color:white;padding:.35em .8em;border-radius:14px;font-size:clamp(24px,4vw,50px)}
.source-gallery-poster:hover .source-poster-play,.source-gallery-poster:focus-visible .source-poster-play{background:#c00}
.source-full-gallery .source-gallery-player:has([data-gallery-frame]:empty){background:transparent}
.source-full-gallery .source-player-toolbar{display:flex;justify-content:flex-end;background:transparent}
.source-full-gallery .source-player-toolbar:has([hidden]){display:none}
.source-full-gallery [data-gallery-frame]:empty{display:none}
.source-full-gallery .source-video-grid{display:grid;gap:18px 12px;margin:0;padding:0;border:0;background:transparent}
.source-full-gallery .source-video-tile{display:block;aspect-ratio:auto;min-width:0;position:relative;text-decoration:none;overflow:visible;border:0;background:transparent;border-radius:0;box-shadow:none;color:#111}
.source-full-gallery .source-video-tile img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block;border-radius:0}
.source-full-gallery .source-video-title{display:block;opacity:1;position:static;color:#111;background:transparent;font-size:14px;line-height:1.45;padding:6px 2px;text-align:center;font-weight:600}
.source-full-gallery .source-video-play{top:0;bottom:auto;height:auto;aspect-ratio:16/9;width:100%;display:flex;align-items:center;justify-content:center;transform:none;left:0;background:transparent;color:#fff;text-shadow:0 1px 4px #000;pointer-events:none}
.source-full-gallery .source-video-play::before{content:none}
.source-full-gallery .source-video-unavailable .source-video-play{display:none}
.source-full-gallery .source-cols-1{grid-template-columns:1fr}
.source-full-gallery .source-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.source-full-gallery .source-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.source-full-gallery .source-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.source-full-gallery .source-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.source-full-gallery .source-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}
.source-full-gallery .source-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}
.source-full-gallery .source-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}
.source-full-gallery .source-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}
.source-full-gallery .source-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}
.source-full-gallery .source-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}
.source-full-gallery .source-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}
.source-gallery-pagination{display:flex;align-items:center;justify-content:center;gap:18px;padding:12px 0;font-size:14px}
.source-gallery-pagination button{min-height:44px;padding:8px 12px;cursor:pointer;background:#fff;color:#172033;border:1px solid #d8d8f5;border-radius:7px;font:inherit}
.source-gallery-pagination button:disabled{opacity:.45;cursor:default}
.source-full-gallery .source-gallery-actions{font-size:13px;margin-top:20px;text-align:right}
.source-full-gallery .source-gallery-page[hidden],.source-gallery-pagination[hidden],.source-gallery-poster[hidden],.source-full-gallery [data-gallery-close][hidden]{display:none!important}
@media(max-width:767px){.source-full-gallery .source-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.source-full-gallery .source-cols-1{grid-template-columns:1fr!important}}
@media(max-width:420px){.source-full-gallery .source-video-grid{grid-template-columns:1fr!important}}
