html,
body {
    width: 100%;
    height: 100%;
}

body {
    background: var(--bg);
}

#presentation-stage {
    width: 100vw;
    height: 100vh;
    padding: clamp(12px, 2.5vw, 40px);
}

/* Scoped to the exported page only: this file is also loaded by the studio app,
   which manages #slide-host visibility itself. */
#presentation-stage #slide-host {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#presentation-nav {
    position: fixed;
    z-index: 20;
    bottom: 18px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    transform: translateX(-50%);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

#presentation-nav button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font: 700 1.3rem Georgia, serif;
    cursor: pointer;
}

#presentation-nav button:hover:not(:disabled) {
    background: var(--surface-strong);
}

#presentation-nav button:disabled {
    opacity: .3;
}

#presentation-nav #nav-print {
    width: auto;
    padding: 0 10px;
    font: 700 .75rem 'DM Sans', sans-serif;
}

#presentation-nav span {
    min-width: 58px;
    color: var(--text-dim);
    font-size: .8rem;
    text-align: center;
}

.presentation-notice {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    padding: 14px 20px;
    max-width: 90vw;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
}

[hidden] {
    display: none !important;
}

.print-stage {
    position: absolute;
    left: -100000px;
    top: 0;
    width: 1280px;
}

.print-page,
.print-slide-host {
    width: 1280px;
    height: 720px;
}

.print-slide-host {
    display: flex;
    align-items: center;
    justify-content: center;
}

.print-slide-host>.slide {
    width: 1280px;
    height: 720px;
}

.print-stage,
.print-stage * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

[data-design="editorial"] {
    --bg: #f4f0e8;
    --panel: #fffdf8;
    --surface: rgba(57, 49, 38, .055);
    --surface-strong: rgba(57, 49, 38, .1);
    --border: rgba(57, 49, 38, .2);
    --text: #25221d;
    --text-dim: #6f685e;
    --slide-grad-a: #fffdf8;
    --slide-grad-b: #f7f1e7;
    --nav-bg: rgba(255, 253, 248, .9);
    --chart-axis: rgba(57, 49, 38, .25);
    --chart-split: rgba(57, 49, 38, .09);
    --chart-track: rgba(57, 49, 38, .1);
    --tooltip-bg: #fffdf8;
    --tooltip-border: rgba(57, 49, 38, .2);
}

[data-design="editorial"] body:not(.studio),
[data-design="editorial"] .slide {
    font-family: Georgia, 'Times New Roman', serif;
}

[data-design="editorial"] .slide {
    border-radius: 2px;
    box-shadow: 0 24px 70px rgba(57, 49, 38, .18);
}

[data-design="editorial"] .slide::after {
    display: none;
}

[data-design="editorial"] .cmp {
    border-radius: 2px;
}

[data-design="blueprint"] {
    --bg: #071a24;
    --panel: #0b2633;
    --surface: rgba(147, 224, 255, .055);
    --surface-strong: rgba(147, 224, 255, .11);
    --border: rgba(147, 224, 255, .25);
    --text: #e8f8fb;
    --text-dim: #91b7c2;
    --slide-grad-a: rgba(14, 48, 63, .97);
    --slide-grad-b: rgba(7, 26, 36, .98);
    --nav-bg: rgba(7, 26, 36, .9);
    --chart-axis: rgba(147, 224, 255, .3);
    --chart-split: rgba(147, 224, 255, .1);
    --chart-track: rgba(147, 224, 255, .1);
    --tooltip-bg: #0b2633;
    --tooltip-border: rgba(147, 224, 255, .25);
}

[data-design="blueprint"] body {
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(147, 224, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 224, 255, .045) 1px, transparent 1px);
    background-size: 28px 28px;
}

[data-design="blueprint"] .slide,
[data-design="blueprint"] .cmp {
    border-radius: 4px;
}

[data-design="blueprint"] .slide::after {
    opacity: .14;
}

@media (max-width: 700px) {
    #presentation-stage {
        padding: 8px 8px 62px;
    }

    #presentation-nav {
        bottom: 10px;
    }
}

@page {
    size: 13.333in 7.5in;
    margin: 0;
}

@media print {

    /* This is a visual safeguard, not a security boundary. Server endpoints
       enforce paid exports; arbitrary browser printing cannot be blocked in JS. */
    body:not([data-print-authorized="true"])>* {
        display: none !important;
    }

    body:not([data-print-authorized="true"])::after {
        content: "Nasqia · Studio preview — use Export PDF in your account to print.";
        display: block !important;
        padding: 1in;
        color: #123c3b;
        background: white;
        font: 24pt sans-serif;
    }

    html,
    body {
        width: auto;
        height: auto;
        margin: 0;
        background: var(--bg) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body> :not(.print-stage) {
        display: none !important;
    }

    .print-stage {
        position: static;
        display: block !important;
        width: 13.333in;
    }

    .print-page,
    .print-slide-host {
        width: 13.333in;
        height: 7.5in;
    }

    .print-page {
        break-after: page;
        page-break-after: always;
        overflow: hidden;
    }

    .print-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .print-slide-host>.slide:not(.html-slide) {
        width: 100%;
        height: 100%;
        background: linear-gradient(160deg, var(--slide-grad-a), var(--slide-grad-b)) !important;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        animation: none;
    }

    .print-slide-host>.html-slide {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        animation: none;
    }

    .print-slide-host .cmp,
    .print-slide-host .slide::after {
        animation: none !important;
    }
}