#kyst-print-mount {
    position: fixed;
    top: 0;
    left: -20000px;
    width: 178mm;
    pointer-events: none;
    z-index: -1;
}

.kyst-print-root {
    background: #ffffff;
    color: #101014;
    font-family: 'Inter', system-ui, sans-serif;
}

.kyst-print-root .print-doc {
    width: 178mm;
    box-sizing: border-box;
    font-size: 11pt;
    line-height: 1.5;
}

.kyst-print-root .print-page-break {
    height: 0;
    break-after: page;
    page-break-after: always;
}

.kyst-print-root h1,
.kyst-print-root h2,
.kyst-print-root h3 {
    margin: 1em 0 0.4em;
    line-height: 1.25;
    break-after: avoid;
    page-break-after: avoid;
}

.kyst-print-root h1 { font-size: 1.55em; }
.kyst-print-root h2 { font-size: 1.3em; }
.kyst-print-root h3 { font-size: 1.12em; }

.kyst-print-root .print-doc-title {
    font-size: 1.9em;
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin: 0 0 0.9em;
    padding-bottom: 0.35em;
    border-bottom: 1px solid #d6d6de;
    color: #2b3f8f;
}

.kyst-print-root .slide-p { margin: 0.55em 0; }

.kyst-print-root blockquote {
    border-left: 3px solid #6c8cff;
    padding-left: 0.9em;
    margin: 0.7em 0;
    color: #4a4a55;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root ul,
.kyst-print-root ol {
    margin: 0.5em 0 0.5em 1.4em;
    padding: 0;
}

.kyst-print-root li { margin: 0.2em 0; }

.kyst-print-root .slide-code-wrap {
    background: #f5f5f9;
    border: 1px solid #dcdce4;
    border-radius: 6px;
    overflow: hidden;
    margin: 0.7em 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-code-lang {
    font-size: 0.7em;
    color: #666;
    padding: 3px 8px;
    background: #ecedf3;
    border-bottom: 1px solid #dcdce4;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kyst-print-root pre.slide-code,
.kyst-print-root pre.slide-code code {
    background: transparent !important;
    color: #1b1b22 !important;
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82em;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.kyst-print-root pre.slide-code { padding: 0.7em 0.8em; }

.kyst-print-root .slide-hr {
    border: 0;
    border-top: 1px solid #d6d6de;
    margin: 1em 0;
}

.kyst-print-root .slide-todo {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0.3em 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-todo-box { flex-shrink: 0; }
.kyst-print-root .slide-todo-text { flex: 1; min-width: 0; }

.kyst-print-root .slide-todo-text > p:first-child { margin-top: 0; }
.kyst-print-root .slide-todo-text > p:last-child { margin-bottom: 0; }

.kyst-print-root .slide-todo.checked .slide-todo-text {
    text-decoration: line-through;
    color: #6b6b76;
}

.kyst-print-root .slide-alert {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 6px;
    margin: 0.7em 0;
    border-left: 3px solid #6c8cff;
    background: #eef1ff;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-alert-warning { border-color: #d98a1f; background: #fdf3e2; }
.kyst-print-root .slide-alert-danger { border-color: #cc3a53; background: #fdeef1; }
.kyst-print-root .slide-alert-success { border-color: #3d8d4c; background: #edf7ef; }
.kyst-print-root .slide-alert-icon { font-size: 1.2em; line-height: 1.2; }
.kyst-print-root .slide-alert-body { flex: 1; }

.kyst-print-root .slide-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.85em;
    margin: 0.8em 0;
}

.kyst-print-root .slide-table td,
.kyst-print-root .slide-table th {
    border: 1px solid #cfcfd8;
    padding: 4px 8px;
    vertical-align: top;
}

.kyst-print-root .slide-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-figure {
    margin: 0.9em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-figure.align-left { align-items: flex-start; }
.kyst-print-root .slide-figure.align-right { align-items: flex-end; }

.kyst-print-root .slide-figure img {
    max-width: 100%;
    max-height: 200mm;
    border-radius: 4px;
}

.kyst-print-root .slide-figure figcaption {
    color: #666;
    font-size: 0.75em;
    margin-top: 0.35em;
    text-align: center;
}

.kyst-print-root .slide-video,
.kyst-print-root .slide-video-empty,
.kyst-print-root .slide-whiteboard-placeholder {
    display: none;
}

.kyst-print-root .slide-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d6d6de;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0.7em 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-file-icon { font-size: 1.4em; }
.kyst-print-root .slide-file-name { font-weight: 600; }
.kyst-print-root .slide-file-size { color: #6b6b76; font-size: 0.8em; }
.kyst-print-root .slide-file-cta { display: none; }

.kyst-print-root .slide-whiteboard {
    display: flex;
    justify-content: center;
    margin: 0.9em 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.kyst-print-root .slide-whiteboard-frame {
    width: 100%;
    height: 120mm;
    border: 0;
    background: #ffffff;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 18mm 16mm;
    }

    body.kyst-printing > *:not(#kyst-print-mount) {
        display: none !important;
    }

    html.kyst-printing,
    body.kyst-printing {
        background: #ffffff !important;
        height: auto !important;
        overflow: visible !important;
    }

    body.kyst-printing #kyst-print-mount {
        position: static;
        top: auto;
        left: auto;
        width: auto;
        z-index: auto;
        pointer-events: auto;
    }

    body.kyst-printing .kyst-print-root .print-doc {
        width: auto;
    }

    body.kyst-printing .kyst-print-root {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
