/* Custom styles for your presentation template.
   A clean, light "paper" theme: blue / cyan / gold accents, Arial type,
   left-aligned content, gold-underlined section headings. Pair with the
   reveal.js "white" theme (see index.html). */

/* Root variables for easy theming */

:root {
    --ink: #17212b;
    --muted: #5a6875;
    --rule: #d9e0e7;
    --blue: #00407a;
    --cyan: #00a5c8;
    --gold: #f2a900;
    --paper: #fbfcfd;
    --code-background: #2d2d2d;
}

body {
    background: var(--paper);
}

.reveal {
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

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

.reveal .slides section {
    box-sizing: border-box;
    padding-bottom: 34px;
}

/* ===== Headings ===== */

.reveal h1,
.reveal h2,
.reveal h3 {
    color: var(--blue);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.reveal h1 {
    max-width: 940px;
    font-size: 2.18em;
    line-height: 1.02;
}

.reveal h2 {
    margin-bottom: 0.65em;
    border-bottom: 4px solid var(--gold);
    padding-bottom: 0.18em;
    font-size: 1.34em;
}

.reveal h3 {
    margin-bottom: 0.35em;
    font-size: 0.74em;
}

/* ===== Body text ===== */

.reveal p,
.reveal li {
    font-size: 0.63em;
    line-height: 1.34;
}

.reveal ul {
    margin-left: 1.05em;
}

.reveal li {
    margin-bottom: 0.35em;
}

.reveal ul li::marker {
    color: var(--cyan);
}

.reveal a {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px solid var(--cyan);
}

.reveal a:hover {
    color: var(--cyan);
}

/* ===== Tables ===== */

.reveal table {
    font-size: 0.6em;
}

.reveal table th {
    color: var(--blue);
    border-bottom: 2px solid var(--gold);
}

.reveal table th,
.reveal table td {
    border-color: var(--rule);
}

/* ===== Images ===== */

.reveal img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border: 1px solid var(--rule);
    border-radius: 4px;
    box-shadow: none;
    background: white;
}

/* ===== Code blocks ===== */

.reveal pre {
    box-shadow: 0 4px 12px rgb(23 33 43 / 12%);
    border-radius: 8px;
    margin: 0.8em 0;
}

.reveal pre code {
    background-color: var(--code-background);
    padding: 1em;
    border-radius: 8px;
    font-size: 0.7em;
    line-height: 1.4;

    /* Light default so untokenised text (e.g. YAML keys) stays readable on the
       dark code background — token spans keep their own monokai colors. */
    color: #f8f8f2;
}

.reveal code {
    color: var(--blue);
}

/* ===== Title slide ===== */

.reveal .title-slide {
    text-align: left;
}

.title-slide h1 {
    margin-top: 0.25em;
    margin-bottom: 0.16em;
    font-size: 2.55em;
}

.title-slide h3 {
    color: var(--ink);
    font-size: 0.86em;
    font-weight: 500;
}

/* ===== Reusable text helpers ===== */

.eyebrow,
.source-line {
    color: var(--cyan);
    font-size: 0.48em !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.byline {
    margin-top: 1.2em;
    color: var(--blue);
    font-size: 0.72em !important;
    font-weight: 700;
}

.muted,
.caption {
    color: var(--muted);
}

.source-line {
    margin-top: 2.6em;
}

.caption {
    margin-top: 0.5em;
    font-size: 0.48em !important;
}

.takeaway {
    margin-top: 0.8em;
    border-left: 6px solid var(--gold);
    padding: 0.42em 0 0.42em 0.75em;
    color: var(--ink);
    font-weight: 700;
}

.large-claim {
    max-width: 980px;
    color: var(--blue);
    font-size: 1.05em !important;
    font-weight: 700;
    line-height: 1.18 !important;
}

.metric {
    border-left: 6px solid var(--cyan);
    padding-left: 16px;
}

.metric strong {
    color: var(--blue);
    font-size: 1.5em;
}

/* ===== Math helpers ===== */

.math-block {
    margin: 0.4em 0 0.7em;
    color: var(--blue);
    font-size: 0.82em !important;
}

.small-math {
    font-size: 0.58em !important;
}

.inline-math {
    white-space: nowrap;
}

/* ===== Layout grids ===== */

.two-col,
.three-col,
.figure-left,
.figure-claim {
    display: grid;
    gap: 36px;
    align-items: center;
}

.two-col {
    grid-template-columns: 1fr 1fr;
}

.three-col {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
}

.figure-left {
    grid-template-columns: 1.08fr 0.92fr;
}

.figure-left img {
    height: 440px;
    object-fit: contain;
}

.figure-claim {
    grid-template-columns: 1.45fr 0.75fr;
}

.figure-claim img {
    height: 420px;
    object-fit: contain;
}

/* Card panels (e.g. inside .three-col) */

.three-col > div,
.card {
    border-top: 4px solid var(--cyan);
    background: #eef7fa;
    padding: 20px 22px;
}

.card.gold {
    border-top-color: var(--gold);
}

/* Highlight box */

.highlight-box {
    background-color: rgb(0 165 200 / 8%);
    border-left: 4px solid var(--cyan);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

/* ===== Org logos (fixed, bottom-right on every slide) ===== */

/* Title-slide QR code (top-right). */

.title-qr {
    position: absolute;
    top: 4px;
    right: 0;
    text-align: center;
}

.title-qr img {
    width: 150px;
    height: 150px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.title-qr .caption {
    margin-top: 6px;
    text-align: center;
    font-size: 0.42em !important;
}

/* Institutional logos: title slide only, hidden elsewhere. */

.org-logos {
    position: fixed;
    right: 48px;
    bottom: 40px;
    z-index: 10;
    display: none;
    align-items: center;
    gap: 48px;
}

body:has(section.title-slide.present) .org-logos {
    display: flex;
}

.org-logos img {
    height: 84px;
    width: auto;
    max-width: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* ===== Chrome: brand, footer, slide number, progress ===== */

.deck-brand {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 10;
}

.deck-brand img {
    width: 190px;
    height: auto;
    border: none;
    box-shadow: none;
    background: transparent;
}

.deck-footer {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 10;
    color: #6c7a86;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.reveal .slide-number {
    right: auto;
    bottom: 20px;
    left: 18px;
    color: var(--blue);
    background: transparent;
    font-size: 14px;
}

.reveal .progress {
    color: var(--gold);
}

/* ===== Fragment animations ===== */

.reveal .fragment.highlight-current-blue.current-fragment {
    color: var(--cyan);
    font-weight: bold;
}

/* ===== Mobile responsiveness ===== */
@media (width <= 768px) {
    .two-col,
    .three-col,
    .figure-left,
    .figure-claim {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ===== Print styles for PDF export ===== */
@media print {
    .reveal .slides section {
        page-break-after: always;
    }

    .reveal .fragment {
        opacity: 1 !important;
        visibility: visible !important;
    }
}
