.reveal .slides section {
    text-align: left;
}

/*
 * KaTeX / MathJax không được biến đổi case (uppercase) bởi parent.
 * Reveal `white` theme set `text-transform: uppercase` cho h1/h2/h3 →
 * Greek letters render lệch (\alpha → Α-Latin), ký hiệu toán bị méo.
 * Fix: tắt text-transform trên mọi math container, áp dụng toàn deck.
 */
.reveal .katex,
.reveal .katex *,
.reveal mjx-container,
.reveal mjx-container *,
.reveal .MathJax,
.reveal .MathJax * {
    text-transform: none !important;
}

.reveal .controls .controls-arrow {
    color: #1E93AB;
}

.reveal .progress span {
    background: #1E93AB;
}

.reveal .text-blue {
    color: #1E93AB !important;
}

.reveal .text-red {
    color: #E62727 !important;
}

.reveal .text-light {
    color: #666 !important;
}

.reveal .text-center {
    text-align: center !important;
}

.reveal .bg-light {
    background-color: #F3F2EC !important;
}

.reveal a {
    color: #1E93AB;
}

.reveal ul,
.reveal ol {
    padding-left: 1rem;
    line-height: 1.4em;
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

.reveal ul ul,
.reveal ol ol,
.reveal ul ol,
.reveal ol ul {
    font-size: 0.9em;
}

.reveal .footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    color: #888;
}

/* Hide footer when the first slide is showing */
.reveal section:first-of-type.present~.footer {
    display: none;
}

.reveal .keyword {
    color: #E62727;
    font-weight: bold;
}

.reveal .inline-code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 4px;
    /* font-weight: bold; */
    text-transform: none !important;
}

.reveal .slide-badge-row {
    text-align: right;
    margin: 0 0 0.35em;
}

.reveal .self-study-badge {
    display: inline-block;
    background: #90A4AE;
    color: white;
    font-size: 0.42em;
    padding: 3px 10px;
    border-radius: 16px;
    font-weight: 600;
}

.reveal .fragment.blur {
    filter: blur(5px);
}

.reveal .fragment.blur.visible {
    filter: none;
}

.reveal .question-box {
    border: 3px solid #1E93AB;
    border-radius: 16px;
    padding: 0.75em;
    /* max-width: 700px; */
    margin: auto;
    background: #F3F2EC;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.reveal .question-title {
    /* font-size: 1.2em; */
    font-weight: bold;
    color: #1E93AB;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reveal .question-content {
    /* font-size: 1.4em; */
    line-height: 1.4;
    color: #333;
}

/* Pipeline diagram */

.reveal .pipeline {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.5em;
    margin-top: 1em;
    flex-wrap: wrap;
}

.reveal .pipeline .stage {
    background: #F3F2EC;
    border: 2px solid #1E93AB;
    border-radius: 10px;
    padding: 0.5em;
    width: 140px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.reveal .pipeline .stage-title {
    font-weight: bold;
    color: #1E93AB;
    margin-bottom: 0.5em;
}

.reveal .pipeline .stage-desc {
    font-size: 0.8em;
    color: #333;
}

.reveal .pipeline .arrow {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    color: #1E93AB;
}

.reveal .caption {
    text-align: center;
    margin-top: 0.8em;
    font-size: 0.8em;
    font-style: italic;
    color: #666;
}

.reveal .fst-italic {
    font-style: italic;
}

/* Responsive: stack nicely on narrow displays */
@media (max-width: 900px) {
    .reveal .pipeline {
        font-size: 0.8em;
    }

    .reveal .stage {
        width: 160px;
    }
}

@media (max-width: 680px) {
    .reveal .pipeline {
        gap: 0.6em;
    }

    .reveal .arrow {
        display: none;
    }

    .reveal .stage {
        width: 100%;
        max-width: 420px;
    }
}

/* Hide line numbers ONLY for code blocks with class 'no-line-numbers' */
.reveal pre code.no-line-numbers .hljs-ln-numbers {
    display: none !important;
}

/* Two-column grid utility — left content, right image.
 * Usage: <div class="two-col">…</div>
 * Variants: .two-col-narrow (.7fr right), .two-col-tight (.5fr right).
 */
.reveal .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
    align-items: start;
}

/* Hai cột chứa thẻ so sánh (.model-box) → kéo cao bằng nhau cho cân đối,
   tránh hai hộp lệch đáy khi số gạch đầu dòng khác nhau. */
.reveal .two-col:has(.model-box),
.reveal .two-col-narrow:has(.model-box),
.reveal .two-col-tight:has(.model-box) {
    align-items: stretch;
}

.reveal .two-col-narrow {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 16px;
    margin-top: 12px;
    align-items: start;
}

.reveal .two-col-tight {
    display: grid;
    grid-template-columns: 1fr 0.5fr;
    gap: 16px;
    margin-top: 12px;
    align-items: start;
}

/* Image-dominant layout: text bên trái nhỏ, hình bên phải lớn. */
.reveal .two-col-img {
    display: grid;
    grid-template-columns: 0.6fr 1fr;
    gap: 16px;
    margin-top: 12px;
    align-items: center;
}

.reveal .two-col img,
.reveal .two-col-narrow img,
.reveal .two-col-tight img {
    width: 100%;
}

/* Figure caption: short, bold thông điệp — NOT the "đây là biểu đồ gì". */
.reveal .fig-caption {
    text-align: center;
    margin-top: 0.5em;
    font-size: 0.75em;
    color: #555;
    font-style: italic;
    line-height: 1.35;
}

/* Image with subtle border + radius, used for raster screenshots. */
.reveal .img-framed {
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Figure wrapper — kills baseline descender (~50px) below <img>. */
.reveal .fig {
    text-align: center;
    font-size: 0;
    line-height: 0;
    margin: 0 auto;
}

.reveal .fig img {
    display: inline-block;
}

/* Demo box — italic note với border bên trái. Dùng cho ví dụ minh hoạ
 * hoặc nhận xét phụ. Palette xanh chính của deck. */
.reveal .demo-box {
    background: #F3F2EC;
    border-left: 6px solid #1E93AB;
    padding: 0.6em 0.9em;
    margin: 0.6em 0;
    font-style: italic;
}

/* Inline highlight — span nền vàng nhạt cho từ/cụm cần làm nổi. */
.reveal .highlight {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Portrait wrapper — ảnh chân dung / ảnh nhân vật lịch sử. */
.reveal .portrait {
    text-align: center;
    margin: 1em 0 0.6em;
}

.reveal .portrait img {
    max-height: 320px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto;
}

/* Compare table — bảng so sánh nhiều phương án / kiến trúc theo cột. */
.reveal .compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75em;
    margin-top: 0.6em;
}

.reveal .compare-table th {
    background: #1E93AB;
    color: white;
    padding: 0.4em 0.7em;
    text-align: left;
    font-weight: 600;
}

.reveal .compare-table td {
    padding: 0.4em 0.7em;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.reveal .compare-table tr:nth-child(even) td {
    background: #F3F2EC;
}

.reveal .compare-table .arch {
    font-weight: 700;
}
