:root {
    --ink: #1b1712;
    --ink-soft: #5c564c;
    --line: #d9d0c0;
    --paper: #f3eee3;
    --paper-2: #fffbf4;
    --teal: #0f6b56;
    --present-bar-clear: 3.4rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 15.5px/1.4 Outfit, "Segoe UI", sans-serif;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    margin: 0;
    padding: 10px 16px;
    background: rgba(243, 238, 227, 0.94);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.top-bar a {
    color: var(--teal);
    text-decoration: none;
}

.top-bar a:hover {
    text-decoration: underline;
}

.top-reroll {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffdf8;
    color: var(--ink);
    font: 560 13px Outfit, "Segoe UI", sans-serif;
    cursor: pointer;
}

.top-reroll:hover {
    border-color: #b9ae9a;
}

.mono {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.live-block {
    max-width: 860px;
}

.live-block .htable {
    font-size: 12px;
}

.live-block p {
    margin: 6px 0 0;
}

.slide {
    position: relative;
    min-height: 100vh;
    scroll-snap-align: start;
    padding: var(--present-bar-clear) 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    overflow-y: auto;
}

.slide-tools {
    position: absolute;
    top: var(--present-bar-clear);
    right: 20px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.slide-tools button {
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--ink);
    font: 560 12px Outfit, "Segoe UI", sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

.slide-tools button:hover {
    border-color: #b9ae9a;
}

.slide-tools .copy-status:empty {
    display: none;
}

.slide-tools .copy-status {
    font-size: 11px;
    color: var(--teal);
    text-align: right;
    max-width: 16rem;
}

.slide.splash {
    justify-content: center;
}

.slide:nth-child(even) {
    background: var(--paper-2);
}

#slide-pos {
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    font-size: 13px;
}

.eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 560;
    color: var(--teal);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    max-width: calc(100% - 11rem);
}

h1,
h2 {
    font-family: Fraunces, Georgia, serif;
    font-weight: 620;
}

h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.8vw, 1.95rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    max-width: 28ch;
}

.lede,
.why {
    margin: 0;
    color: var(--ink-soft);
    max-width: 72ch;
}

.why {
    font-size: 14.5px;
}

.big {
    font-size: 1.75rem;
    font-weight: 650;
    margin: 0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing: 0.1em;
}

.sub {
    margin: 0;
    color: var(--ink-soft);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.formula {
    margin: 0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 1.02rem;
    color: var(--teal);
}

ul.notes,
ol.steps,
ol.story {
    margin: 0;
    padding-left: 1.3em;
    max-width: 72ch;
}

ol.steps {
    padding: 8px 12px 8px 2em;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 8px;
}

ul.notes li,
ol.steps li,
ol.story li {
    margin: 0.28em 0;
}

ol.steps li {
    margin: 0.42em 0;
}

ol.steps li::marker,
ol.story li::marker {
    color: var(--teal);
    font-weight: 650;
}

.htable {
    border-collapse: collapse;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    max-width: 720px;
}

.htable th,
.htable td {
    border-bottom: 1px solid var(--line);
    padding: 3px 8px;
    text-align: left;
}

.htable th {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 500;
}

.chr {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.chr span {
    min-width: 1.85em;
    height: 1.85em;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: #fffdf8;
    border-radius: 4px;
}

.chr span.swap {
    background: #d7efe6;
    border-color: var(--teal);
}

.chr span.mut {
    background: #f7e4c4;
    border-color: #c07f00;
}

.chr span.hit {
    background: #d7efe6;
    border-color: var(--teal);
}

.chr-label {
    margin: 4px 0 2px;
    font-size: 13px;
    color: var(--ink-soft);
}

.pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
    max-width: 820px;
}

.two .pair {
    grid-template-columns: 1fr;
    gap: 10px;
}

.wheel {
    display: flex;
    height: 28px;
    max-width: 640px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.wheel i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    min-width: 0;
}

.dart {
    margin: 4px 0 0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    color: var(--teal);
}

.darts {
    position: relative;
    height: 22px;
    max-width: 640px;
    margin: 4px 0 8px;
}

.darts span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    color: var(--teal);
    white-space: nowrap;
}

.wheel i.pick {
    box-shadow: inset 0 0 0 2px var(--ink);
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 28px;
    max-width: 860px;
    align-items: start;
}

.nav-hint {
    color: var(--ink-soft);
    font-size: 13px;
}

@media (max-width: 720px) {
    .slide {
        padding: calc(var(--present-bar-clear) + 2.2rem) 20px 36px;
    }

    .slide-tools {
        right: 12px;
    }

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

@media print {
    html {
        scroll-snap-type: none;
    }

    .top-bar,
    .top-reroll {
        display: none;
    }

    .slide {
        min-height: 100vh;
        page-break-after: always;
        break-after: page;
        padding: 36px 40px;
    }

    .slide-tools {
        display: none;
    }
}
