/* Shared cobalt chapters. Existing artwork, layout and animation remain registered. */
.home-page .cobalt-chapter,
.portfolio-editorial .cobalt-chapter{
 --chapter-blue:#163aa7;
 --ink:#f8faff;
 --text-secondary:#dce5fa;
 --cobalt:#d5e2ff;
 --blue:#f8faff;
 --line:#ffffff30;
 background:var(--chapter-blue);
 color:var(--ink);
}

/* Quiet light behind the sculpture separates the blue silk from the blue field. */
.home-page .cobalt-chapter .living-stage::before{
 content:"";position:absolute;inset:8% 1% -1%;z-index:-1;pointer-events:none;
 background:radial-gradient(ellipse at 53% 60%,#567deb32,transparent 70%);
}
.home-page .cobalt-chapter .capability-evidence{border-top-color:var(--line)}
.home-page .cobalt-chapter .example-kicker{color:var(--text-secondary)}
.home-page .cobalt-chapter :is(.example-wordmark,.example-icon){filter:brightness(0) invert(1)}

/* Keep one glass surface, with legible white ink and a visible contour. */
html body .cobalt-chapter .liquid-glass{
 --glass-ink:#f8faff;--glass-tint:rgba(255,255,255,.055);
}
.cobalt-chapter .pill:not(.liquid-glass){color:var(--ink);background:#ffffff0d;border-color:#ffffff66}
.cobalt-chapter .pill:not(.liquid-glass):hover{background:#ffffff1c}
.cobalt-chapter .liquid-glass::after{border-color:#ffffff75}
html body .cobalt-chapter :is(a,button):focus-visible{outline-color:#fff}

/* Full-width blue opening; the established editorial measure stays centred. */
.portfolio-editorial .collection-opening.cobalt-chapter{
 max-width:none;margin:0;
 padding-inline:max(6%,calc((100vw - 1584px)/2));
 padding-bottom:clamp(62px,6vw,104px);
}
.portfolio-editorial .cobalt-chapter .collection-intro{color:var(--cobalt)}
.portfolio-editorial .cobalt-chapter .collection-context{color:var(--text-secondary)}
.portfolio-editorial .cobalt-chapter .collection-explore{color:var(--ink);border-bottom-color:#ffffff70}
.portfolio-editorial .cobalt-chapter .collection-object::before{
 content:"";position:absolute;inset:3% 1% -3%;pointer-events:none;
 background:radial-gradient(ellipse at 57% 56%,#567deb32,transparent 70%);
}
.portfolio-editorial>.nav{color:#f8faff;background:none}
.portfolio-editorial>.nav .wordmark{color:inherit}
.portfolio-editorial>.nav nav{background:#ffffff0a;border-color:#ffffff66;color:#f8faff}
html body.portfolio-editorial>.nav nav.liquid-glass{--glass-ink:#f8faff;--glass-tint:rgba(255,255,255,.055)}
.portfolio-editorial>.nav a:focus-visible{outline-color:#fff}
.portfolio-editorial .collection-library{padding-top:24px}

/* A second cobalt chapter closes the light project gallery. */
.portfolio-editorial .collection-closing.cobalt-chapter{
 border-top:0;padding-block:clamp(64px,7vw,112px);
}
.portfolio-editorial .cobalt-chapter.collection-closing p{color:var(--text-secondary)}
.portfolio-editorial .cobalt-chapter .text-link{color:var(--ink);border-bottom-color:#ffffff70}

@media(max-width:800px){
 .portfolio-editorial .collection-opening.cobalt-chapter{padding-inline:7%;padding-bottom:50px}
 .portfolio-editorial .collection-closing.cobalt-chapter{padding-block:56px}
 .portfolio-editorial .collection-library{padding-top:12px}
}

/* Match the existing accessibility modes rather than forcing transparent glass. */
@media(prefers-reduced-transparency:reduce){
 html body.portfolio-editorial>.nav nav.liquid-glass{background:#163aa7!important;color:#f8faff!important}
}
@media(forced-colors:active){
 .home-page .cobalt-chapter,.portfolio-editorial .cobalt-chapter{background:Canvas;color:CanvasText;--ink:CanvasText;--text-secondary:CanvasText;--cobalt:LinkText}
 .home-page .cobalt-chapter .living-stage::before,.portfolio-editorial .cobalt-chapter .collection-object::before{display:none}
 .portfolio-editorial>.nav,.portfolio-editorial>.nav nav{color:CanvasText;background:Canvas}
 html body.portfolio-editorial>.nav nav.liquid-glass{background:ButtonFace!important;color:ButtonText!important}
 html body .cobalt-chapter :is(a,button):focus-visible,.portfolio-editorial>.nav a:focus-visible{outline-color:Highlight}
}
