/* Diligence demo in the homepage look. Loaded after the demo's own styles; every rule is scoped to the demo page. */
.page{--dg-ink:#0b1020;--dg-muted:#5a6488;--dg-line:#e1e5ef;--dg-accent:#0a7899;--dg-accent-dark:#075e79;max-width:1200px;padding:44px 24px 48px}
.page ::selection{background:#cfe9f1;color:var(--dg-ink)}
.page .eyebrow{font-size:11px;font-weight:600;letter-spacing:.13em}
.page .eyebrow b{color:var(--dg-accent);font-weight:600}
.page h1{max-width:980px;margin:14px 0 18px;font:700 52px/1.08 'Bricolage Grotesque',Arial,sans-serif;letter-spacing:0;text-wrap:balance}
.page .sub{max-width:78ch;margin:0 0 28px;font-size:18px;line-height:1.65}
.page .dg-note{margin:24px 0 0;padding-top:14px;font-size:12px;line-height:1.6;max-width:none}

/* Stage: headings and figures in the display face, everything else in the body face. */
.frame,.blk,#rail,#solved{border-radius:12px}
#qhead .t,#end h2,.big,.k .kv,.load,.stamp{font-family:'Bricolage Grotesque',Arial,sans-serif;font-weight:700;letter-spacing:0}
.ttl{font-family:'Bricolage Grotesque',Arial,sans-serif;font-weight:600}
#qhead .n,.lbl,.tag,.k .kl{font-weight:600}
.btn{background:var(--dg-accent);border-radius:8px;font-weight:600}
.quote{border-left-color:var(--dg-accent)}
#tprog{stroke:var(--dg-ink)}
.tst:focus-visible{outline:none}
.tst:focus-visible circle.o{stroke:var(--dg-accent);stroke-width:9}
.tst:focus-visible text{fill:var(--dg-accent)}

/* End card: hidden controls leave the keyboard order; buttons grow as the stage shrinks so they stay tappable. */
#end{visibility:hidden;transition:opacity .6s,visibility 0s .6s;--dg-kb:clamp(1,calc(.8 / var(--dg-s,1)),3.4);--dg-kt:clamp(1,calc(.5 / var(--dg-s,1)),2);gap:calc(14px*var(--dg-kt))}
#end.in{visibility:visible;transition:opacity .6s,visibility 0s}
#end h2{font-size:calc(42px*var(--dg-kt));line-height:1.18;max-width:calc(900px + 140px*var(--dg-kt))}
#end p{font-size:calc(18px*var(--dg-kt));line-height:1.4;text-align:center;max-width:1200px}
#end .bb{gap:calc(12px*var(--dg-kb))}
#end a,#end button{font-size:calc(17px*var(--dg-kb));font-weight:600;border-radius:calc(8px*var(--dg-kb));padding:calc(12px*var(--dg-kb)) calc(22px*var(--dg-kb));border-width:calc(2px*var(--dg-kb));line-height:1.3}
#end #dg-request{background:var(--dg-accent);border-color:var(--dg-accent);color:#fff}
#end #dg-request:hover{background:var(--dg-accent-dark);border-color:var(--dg-accent-dark)}
#end #replay{border-color:var(--dg-line);color:var(--dg-ink)}
#end #replay:hover{border-color:var(--dg-accent);background:#f0f9fb}

/* Controls under the stage */
.ctl{margin-top:16px}
.ctl button{border-radius:8px;font-weight:600;min-height:44px;padding:10px 16px;color:var(--dg-ink);transition:background .2s,border-color .2s}
.ctl button:hover{border-color:var(--dg-accent);background:#f0f9fb}
.ctl button.pri{background:var(--dg-accent);border-color:var(--dg-accent);color:#fff;min-width:108px}
.ctl button.pri:hover{background:var(--dg-accent-dark);border-color:var(--dg-accent-dark)}
.page button:focus-visible{outline:3px solid var(--dg-accent);outline-offset:3px}
.prog{align-self:stretch;align-items:center}
.prog i{position:relative;overflow:visible}
.prog i::after{content:"";position:absolute;inset:-18px 0}
.prog i b{background:var(--dg-accent);border-radius:3px}
.stl{font-weight:500}

@media(max-width:768px){.page{padding:30px 20px 36px}.page h1{font-size:36px}.page .sub{font-size:16px;margin-bottom:22px}.frame{border-radius:8px}.ctl{gap:10px}.ctl button{flex:1 1 0}.prog{order:3;flex:1 1 100%;min-width:0;min-height:44px}.stl{order:4;flex:1 1 100%}}
@media(max-width:400px){.page{padding:26px 16px 32px}.page h1{font-size:32px}}
@media(prefers-reduced-motion:reduce){.ctl button,#end{transition:none}}
