:root {
    /* Dark2 palette (ColorBrewer) — reserved for accents & graphics */
    --d2-green:  #1b9e77;
    --d2-orange: #d95f02;
    --d2-purple: #7570b3;
    --d2-pink:   #e7298a;
    --d2-gray:   #666666;   /* Dark2's own neutral, base of the grey scale */

    /* Roles */
    --ink:        #1a1a1a;         /* body text (not pure black) */
    --accent:     #005a32;         /* darkened green — headings & links as ink */
    --accent-lit: var(--d2-green); /* hover / graphical accent */
    --emphasis:   var(--d2-purple);/* second accent: highlights, current marker
                                    * (--d2-orange is warmer but much brighter;
                                    *  --d2-gray/brown are quieter alternatives) */
    --muted:      var(--d2-gray);  /* de-emphasised text & chrome */

    /* Neutral scale (derived from --d2-gray) */
    --bg:         #f7f6f2;         /* soft off-white page background */
    --rule:       #d9d9d9;
    --rule-soft:  #ececec;
    --surface:    #fafafa;
    --surface-2:  #f0f0f0;
    --zebra:      #f3f7f5;         /* faint green-grey for table striping */

    --font-body: "Source Sans 3", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: var(--font-body);
}

HTML, BODY {
    margin: 0;
    padding: 0;
    background: var(--bg);
}

DIV.slide {
    clear: both;
    margin-left: 2vw;
    margin-top: 2vh;
    width: 96vw;
    height: 90vh;
    font-size: 18pt;
    font-family: var(--font-body);
    line-height: 1.4;
    color: var(--ink);
}


H1 {
    font-variant: small-caps;
}
H1, H2,H3, H4 {
    padding-top: 0px;
    margin-top: 0px;
    font-family: var(--font-head);
    color : var(--accent);
}

DIV.slide H1 {
    font-size: 2.0em;
    letter-spacing: 0.01em;
}
DIV.slide H2 {
    font-size: 1.4em;
    border-left: 4px solid var(--accent-lit);
    padding-left: 0.4em;
}
DIV.slide H3 {
    font-size: 1.1em;
    color: var(--muted);
}

/* Second accent (opt-out): bold and italic pick up the Dark2 purple by
 * default, keeping their weight/slant. Wrap a term in class="plain" to
 * suppress the colour, or class="hi" to force the accent on plain text. */
DIV.slide STRONG, DIV.slide EM, DIV.slide .hi {
    color: var(--emphasis);
}
DIV.slide .plain {
    color: inherit;
}

/* Smaller text: wrap in class="small" (e.g. captions, asides, citations).
 * Relative to body size (~0.78 * 18pt = 14pt), so it tracks the base. */
DIV.slide .small {
    font-size: 0.78em;
}


DIV.slide IMG {
    max-height: 75vh;
    margin: 0px auto;
}

DIV#footer {
    clear: both;
    position: fixed;
    top: 94vh;
    left: 0px;
    width: 100vw;
    height: 3vh;
    border-top: 1px solid var(--rule);
    margin-top: 0px;
    padding-top: 2px;
    padding-left: 2em;
    margin: 0px;
    padding-bottom: 0px;
    font-family: var(--font-head);
    color: var(--muted);
}

DIV#footer P {
    margin-top: 0px;
}

A {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-lit);
    text-underline-offset: 2px;
}
A:hover {
    color: var(--accent-lit);
}

DIV.thumbnail {
    border: 1px solid black;
    width: 1920px;
    position: absolute;
    height: 1080px;
    transform: scale(0.2);
    padding: 1em;
}

DIV.thumbnail:hover {
    border: 4px solid var(--accent);
    background-color: #eeeeee;
    transform: scale(0.25);
}

TABLE {
  border-collapse: collapse;
}

TABLE THEAD {
    border-bottom: 1px solid var(--accent);
    padding: 0.5em;
}
TABLE TH {
    text-align: left;
}
TABLE TD, TABLE TH {
    padding: 0.35em 0.8em;
}

TABLE TBODY TR:nth-child(even) {
    background: var(--zebra);
}

/* Text columns read left-aligned; tag numeric columns `.num` for right
 * alignment with lined-up (tabular) figures. */
TABLE TD {
    text-align: left;
}
TABLE TD.num, TABLE TH.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media print {
    HTML, BODY {
        background: #fff;
    }
    DIV.slide {
        padding-top: 24px;
        padding-left: 24px;
        margin-left: 0px;
        margin-top: 0px;
        width: 1920px;
        height: 94vh;
        break-after: page
    }
    @page {
        size: 1920px 1080px;
    }
}


@media screen {
    DIV.print-mode DIV.slide {
        border-bottom: 1px solid black;
    }
    DIV.print-mode + DIV#footer {
        visibility: hidden;
    }
}

#overlay {
  position: fixed;
  padding: 2%;
  width: 60%;
  height: 60%;
  top: 10%;
  left: 10%;
  font-size: 24pt;
  font-family: var(--font-body);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background-color: rgba(255,255,255,0.97);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

/* ---- Speaker view ----
 * Slide thumbnails are scaled via `transform: scale(--s)`. Because the
 * underlying .slide is sized in viewport units (96vw x 90vh), the wrapper
 * width/height are pinned to (96 * s)vw and (90 * s)vh so the visible scaled
 * region exactly fills the wrapper at any viewport. Chrome (labels, timer,
 * button) uses vmin so it shrinks on smaller screens too. The outermost
 * .speaker-view sets overflow:hidden as a hard guarantee against scrollbars.
 */
DIV.speaker-view {
    --thumb-current-scale: 0.48;
    --thumb-preview-scale: 0.23;

    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    padding: 2vh 1.5vw;
    box-sizing: border-box;
    background: var(--surface);
    overflow: hidden;
    gap: 1.4vh;
}

DIV.speaker-stage {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2vw;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

DIV.speaker-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(2, auto);
    gap: 0.9vh 0.9vw;
}

DIV.speaker-slot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6vh;
    min-height: 0;
}

DIV.speaker-slot-label {
    font-family: var(--font-head);
    font-size: 1.6vmin;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

DIV.speaker-slot-current > DIV.speaker-slot-label {
    color: var(--accent);
    font-weight: bold;
}

DIV.speaker-thumb {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 3px;
    box-sizing: border-box;
}

DIV.speaker-thumb > DIV.slide {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    transform-origin: top left;
}

DIV.speaker-thumb-current {
    width: calc(96vw * var(--thumb-current-scale));
    height: calc(90vh * var(--thumb-current-scale));
    border: 2px solid var(--accent);
    box-shadow: 0 3px 12px rgba(0,90,50,0.18);
}

DIV.speaker-thumb-current > DIV.slide {
    transform: scale(var(--thumb-current-scale));
}

DIV.speaker-thumb-preview {
    width: calc(96vw * var(--thumb-preview-scale));
    height: calc(90vh * var(--thumb-preview-scale));
    border: 1px solid #bbb;
}

DIV.speaker-thumb-preview > DIV.slide {
    transform: scale(var(--thumb-preview-scale));
}

DIV.speaker-thumb-clickable {
    cursor: pointer;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

DIV.speaker-thumb-clickable:hover {
    border-color: #005a32;
    box-shadow: 0 3px 10px rgba(0,90,50,0.25);
}

DIV.speaker-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-family: sans-serif;
    font-style: italic;
    font-size: 1.5vmin;
    background: #f0f0f0;
}

DIV.speaker-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4em;
    padding: 1.2vh 1em 0 1em;
    border-top: 1px solid #ddd;
    font-family: sans-serif;
    flex: none;
}

SPAN.speaker-counter {
    font-size: 2.6vmin;
    color: #005a32;
    font-weight: bold;
    min-width: 6em;
    text-align: center;
}

SPAN.speaker-timer {
    font-family: monospace;
    font-size: 5.5vmin;
    color: #005a32;
    font-weight: bold;
    letter-spacing: 0.05em;
}

BUTTON.speaker-reset {
    font-family: sans-serif;
    padding: 0.5em 1.4em;
    background: #005a32;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.8vmin;
}

BUTTON.speaker-reset:hover {
    background: #007a42;
}


DIV.selection-mother-0 .block-1,
DIV.selection-mother-0 .block-2,
DIV.selection-mother-0 .block-3,
DIV.selection-mother-0 .block-4,
DIV.selection-mother-0 .block-5,
DIV.selection-mother-0 .block-6,
DIV.selection-mother-0 .block-7,
DIV.selection-mother-0 .block-8,
DIV.selection-mother-0 .block-9,
DIV.selection-mother-1 .block-2,
DIV.selection-mother-1 .block-3,
DIV.selection-mother-1 .block-4,
DIV.selection-mother-1 .block-5,
DIV.selection-mother-1 .block-6,
DIV.selection-mother-1 .block-7,
DIV.selection-mother-1 .block-8,
DIV.selection-mother-1 .block-9,
DIV.selection-mother-2 .block-3,
DIV.selection-mother-2 .block-4,
DIV.selection-mother-2 .block-5,
DIV.selection-mother-2 .block-6,
DIV.selection-mother-2 .block-7,
DIV.selection-mother-2 .block-8,
DIV.selection-mother-2 .block-9,
DIV.selection-mother-3 .block-4,
DIV.selection-mother-3 .block-5,
DIV.selection-mother-3 .block-6,
DIV.selection-mother-3 .block-7,
DIV.selection-mother-3 .block-8,
DIV.selection-mother-3 .block-9,
DIV.selection-mother-4 .block-5,
DIV.selection-mother-4 .block-6,
DIV.selection-mother-4 .block-7,
DIV.selection-mother-4 .block-8,
DIV.selection-mother-4 .block-9,
DIV.selection-mother-5 .block-6,
DIV.selection-mother-5 .block-7,
DIV.selection-mother-5 .block-8,
DIV.selection-mother-5 .block-9,
DIV.selection-mother-6 .block-7,
DIV.selection-mother-6 .block-8,
DIV.selection-mother-6 .block-9,
DIV.selection-mother-7 .block-8,
DIV.selection-mother-7 .block-9,
DIV.selection-mother-8 .block-9
{
    visibility: hidden;
}
