.document-deck {clear:both;border:1px solid var(--border,#668374);border-radius:12px;overflow:hidden;margin:1rem 0;background:var(--doc-surface,#fff)}
.document-deck-page {padding:1.4rem;min-height:12rem;animation:document-page-enter .3s ease-out;display:flow-root;background-position:center;background-size:cover}
.document-deck-page[hidden] {display:none!important}
.document-slide-content {display:flow-root;overflow-wrap:anywhere}
.document-slides .document-deck-page {aspect-ratio:16/9;min-height:0;max-height:75vh;overflow:auto;display:flex;align-items:center}
.document-slides .document-slide-content {width:100%}
.document-page-has-background .document-slide-content {background:rgba(255,255,255,.9);color:#18382a;border-radius:8px;padding:1rem;box-sizing:border-box}
.dark .document-page-has-background .document-slide-content {background:rgba(20,35,28,.9);color:#e9f1eb}
.document-deck-controls {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.6rem;padding:.6rem;border-top:1px solid var(--border,#668374)}
.document-deck-controls button {font-size:.9rem;padding:.4rem .75rem}
.document-embed {box-sizing:border-box;padding:.8rem;border:1px solid var(--border,#668374);border-radius:10px;display:flow-root}
.document-embed h3 {margin-top:0}
.document-embed-details {margin-top:.7rem;border-top:1px solid var(--border,#668374);padding-top:.6rem}
.document-embed-details summary {cursor:pointer;font-weight:600}
.document-presentation-dialog {box-sizing:border-box;width:96vw;max-width:1600px;height:94vh;max-height:96vh;padding:.8rem;background:var(--doc-surface,#fff);color:var(--doc-text,#20382d);border:1px solid var(--border,#668374);border-radius:12px}
.document-presentation-dialog::backdrop {background:rgba(0,0,0,.85)}
.document-presentation-tools {display:flex;justify-content:flex-end;gap:.5rem}
.document-presentation-dialog .document-deck {height:calc(100% - 3.5rem);display:flex;flex-direction:column;margin:.5rem 0}
.document-presentation-dialog .document-deck-pages {flex:1;min-height:0}
.document-presentation-dialog .document-deck-page {height:100%;max-height:none;aspect-ratio:auto;box-sizing:border-box;font-size:clamp(16px,2vw,32px)}
.document-presentation-dialog:fullscreen {width:100vw;height:100vh;max-width:none;max-height:none}
.document-insert-results {display:flex;flex-direction:column;gap:.4rem;max-height:30vh;overflow:auto;margin:.8rem 0}
.document-insert-results button {text-align:left}
.document-insert-results button[aria-pressed=true] {outline:2px solid currentColor}
@keyframes document-page-enter {from {opacity:.3;transform:translateX(12px)} to {opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.document-deck-page{animation:none}}
@media print {.document-deck-page[hidden]{display:block!important}.document-deck-page{max-height:none!important;overflow:visible!important}.document-deck-controls{display:none}.document-deck-page+.document-deck-page{break-before:page}}

.document-presentation-owner {height:calc(100% - 3rem)}
.document-presentation-owner .document-deck {height:100%}

.document-presentation-dialog .document-slide-content h2 {font-size:1.4em}
.document-presentation-dialog .document-slide-content h3 {font-size:1.15em}
.document-presentation-dialog .document-slide-content p {font-size:1em}

.document-presentation-dialog [data-deck-open] {display:none}

.document-presentation-dialog [hidden] {display:none!important}

/* Presentations are moved outside document-main into a dialog. Keep body text
   on the slide palette instead of the landing page paragraph colour. */
.document-slide-content p{color:inherit}
.document-presentation-dialog .document-slide-content a{color:var(--accent)}

.document-presentation-dialog.document-presentation-fullscreen{width:100vw;height:100vh;max-width:none;max-height:none;margin:0;inset:0;border-radius:0}
.document-fullscreen-error{color:var(--doc-text);margin:.5rem 0}

.document-presentation-stage{height:100%;color:var(--doc-text);background:var(--doc-surface);box-sizing:border-box}
.document-presentation-stage:fullscreen{width:100vw;height:100vh;padding:.8rem;overflow:auto}
.document-presentation-stage:-webkit-full-screen{width:100vw;height:100vh;padding:.8rem;overflow:auto}

/* A fixed 16:9 slide canvas is scaled as a whole: text, media and spacing. */
.document-presentation-stage.is-fullscreen{width:100vw;height:100vh;padding:0;overflow:hidden}
.document-presentation-stage.is-fullscreen>.document-presentation-tools,
.document-presentation-stage.is-fullscreen>.document-fullscreen-error,
.document-presentation-stage.is-fullscreen>.document-presentation-owner>.document-deck>.document-deck-controls{display:none}
.document-presentation-stage.is-fullscreen>.document-presentation-owner{height:100%}
.document-presentation-stage.is-fullscreen>.document-presentation-owner>.document-deck{height:100%;margin:0;border:0;border-radius:0}
.document-presentation-stage.is-fullscreen>.document-presentation-owner>.document-deck>.document-deck-pages{position:relative;overflow:hidden}
.document-presentation-stage.is-fullscreen>.document-presentation-owner>.document-deck>.document-deck-pages>.document-deck-page{position:absolute;left:50%;top:50%;width:1280px;height:720px;max-height:none;min-height:0;font-size:24px;aspect-ratio:16/9;transform:translate(-50%,-50%) scale(var(--presentation-scale,1));transform-origin:center;animation:none}

.document-presentation-stage.is-fullscreen>.document-presentation-owner>.document-deck:focus{outline:none}
