/* Self-hosted fonts for the EsoBench page (SIL Open Font License, via Google Fonts). Latin subset only. */
@font-face {
    font-family: 'Courier Prime';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/courier-prime-400-italic.woff2) format('woff2');
}
@font-face {
    font-family: 'Courier Prime';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/courier-prime-400.woff2) format('woff2');
}
@font-face {
    font-family: 'Courier Prime';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(fonts/courier-prime-700.woff2) format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/ibm-plex-mono-400.woff2) format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/ibm-plex-mono-600.woff2) format('woff2');
}
@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url(fonts/jost-variable.woff2) format('woff2');
}
@font-face {
    font-family: 'Michroma';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/michroma-400.woff2) format('woff2');
}
@font-face {
    font-family: 'Mrs Saint Delafield';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/mrs-saint-delafield-400.woff2) format('woff2');
}
@font-face {
    font-family: 'Zilla Slab';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/zilla-slab-400-italic.woff2) format('woff2');
}
@font-face {
    font-family: 'Zilla Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/zilla-slab-400.woff2) format('woff2');
}
@font-face {
    font-family: 'Zilla Slab';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(fonts/zilla-slab-500.woff2) format('woff2');
}

/* EsoBench report page. Pure CSS: no scripts on this page.
   Front section: annual-report cover (Bauhaus). Back section: plain photocopied exhibits. */

:root {
    --esb-paper: #fbf9f4;
    --esb-xerox: #f1ecdd;
    --esb-ink: #1d1d1b;
    --esb-toner: #1a1a1a;
    --esb-mute: #5f5a4e;
    --esb-rule: #d6d0c1;
    --esb-green: #5dae4b;
    --esb-yellow: #f3b632;
    --esb-orange: #ee7d2b;
    --esb-red: #d9403a;
    --esb-purple: #8b4a95;
    --esb-blue: #2a93cf;
    --esb-link: #1f6fa8;
    --esb-display: "Michroma", "Eurostile", "Arial Black", sans-serif;
    --esb-heading: "Jost", "Futura", "Century Gothic", sans-serif;
    --esb-body: "Zilla Slab", "Rockwell", Georgia, serif;
    --esb-mono: "IBM Plex Mono", ui-monospace, monospace;
    --esb-typewriter: "Courier Prime", "Courier New", monospace;
}

body.esb {
    background: #ebe7dd;
    padding: 0;
}

.esb .nav {
    background: var(--background);
    padding: 1rem 2rem;
    margin: 0;
}

.esb-sheet {
    max-width: 1120px;
    margin: 0 auto;
    background: var(--esb-paper);
    color: var(--esb-ink);
    font-family: var(--esb-body);
    font-size: 1.15rem;
    line-height: 1.55;
}

.esb-sheet a { color: var(--esb-link); }
.esb-sheet a:hover { color: #134a73; }

/* ---------- cover ---------- */

.esb-cover { padding: 3.5rem 4.5rem 0; }

.esb-kicker {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--esb-mono);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
}

.esb-masthead {
    font-family: var(--esb-display);
    /* Michroma is very wide: "ESOBENCH," renders ~8.6em, so size it to the content width
       (viewport minus side padding) with a little slack */
    font-size: min(6rem, calc((100vw - 9rem) / 8.9));
    line-height: 1;
    letter-spacing: 0.04em;
    white-space: nowrap;
    margin: 1.5rem 0 1rem;
    font-weight: 400;
}

.esb-cover-copy {
    max-width: 52rem;
    font-size: 1.35rem;
    line-height: 1.45;
    color: #3a3833;
    margin: 0;
}

.esb-cover-copy strong {
    font-family: var(--esb-heading);
    font-weight: 700;
    color: var(--esb-green);
}

.esb-stripes { margin: 2rem -4.5rem 0; }
.esb-stripes span { display: block; height: 10px; }
.esb-stripes span:nth-child(1) { background: var(--esb-green); }
.esb-stripes span:nth-child(2) { background: var(--esb-yellow); }
.esb-stripes span:nth-child(3) { background: var(--esb-orange); }
.esb-stripes span:nth-child(4) { background: var(--esb-red); }
.esb-stripes span:nth-child(5) { background: var(--esb-purple); }
.esb-stripes span:nth-child(6) { background: var(--esb-blue); }

.esb-ticker {
    background: var(--esb-ink);
    color: var(--esb-yellow);
    font-family: var(--esb-mono);
    font-size: 1rem;
    padding: 0.7rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.esb-ticker-tape {
    display: inline-block;
    animation: esb-tick 45s linear infinite;
}

@keyframes esb-tick {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.esb-ticker:hover .esb-ticker-tape { animation-play-state: paused; }

/* Reduce Motion: keep the tape moving, at a crawl. */
@media (prefers-reduced-motion: reduce) {
    .esb-ticker-tape { animation-duration: 150s; }
}

/* ---------- front sections ---------- */

.esb-front { padding: 3rem 4.5rem 4rem; display: flex; flex-direction: column; gap: 3.5rem; }

.esb-chapter {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    margin: 0;
    font-family: var(--esb-heading);
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.01em;
}

.esb-chapter span { color: #a39d90; font-weight: 500; font-size: 0.8em; }
.esb-chapter.blue { color: var(--esb-blue); }
.esb-chapter.red { color: var(--esb-red); }
.esb-chapter.purple { color: var(--esb-purple); }
.esb-chapter.green { color: var(--esb-green); }

.esb-lede { font-size: 1.45rem; line-height: 1.45; color: #7c8872; margin: 1rem 0 0; max-width: 52rem; }

.esb-letter {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) minmax(0, 2fr);
    gap: 2.5rem;
    align-items: start;
}

.esb-letter p { margin: 0 0 1rem; }

.esb-signature {
    font-family: "Mrs Saint Delafield", cursive;
    font-size: 3.6rem;
    line-height: 1;
    color: #1f3f8a;
    margin: 0.5rem 0 0;
}

.esb-photo { margin: 0; }
.esb-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.esb-photo figcaption {
    border-bottom: 1.5px dotted var(--esb-blue);
    padding: 0.4rem 0;
    font-family: var(--esb-heading);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--esb-link);
    text-transform: uppercase;
}
.esb-photo figcaption b { text-transform: none; letter-spacing: 0; }

.esb-mini { display: flex; flex-direction: column; gap: 0.4rem; align-self: end; }
.esb-mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    height: 16rem;
    border-left: 1.5px dotted #9d978a;
    padding-left: 0.7rem;
}
.esb-mini-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.3rem; height: 100%; }
.esb-mini-bar b { font-family: var(--esb-heading); font-size: 0.95rem; }
.esb-mini-bar i { display: block; width: 18px; }
.esb-mini-keys { display: flex; gap: 0.6rem; padding-left: 0.7rem; font-family: var(--esb-heading); font-size: 0.8rem; }
.esb-mini-keys span { width: 18px; text-align: center; }
.esb-mini-title { font-family: var(--esb-heading); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--esb-link); }

.esb-figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 3px solid var(--esb-ink);
    border-bottom: 1px solid var(--esb-ink);
    margin: 0;
}
.esb-figures div { padding: 1.3rem 1.2rem; border-right: 1px solid var(--esb-ink); }
.esb-figures div:last-child { border-right: 0; }
.esb-figures dt { order: 2; font-family: var(--esb-heading); font-size: 0.8rem; letter-spacing: 0.14em; font-weight: 500; }
.esb-figures dd { margin: 0; font-family: var(--esb-display); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; }
.esb-figures div::before { content: ""; display: block; width: 40px; height: 6px; margin-bottom: 0.6rem; }
.esb-figures div:nth-child(1)::before { background: var(--esb-green); }
.esb-figures div:nth-child(2)::before { background: var(--esb-yellow); }
.esb-figures div:nth-child(3)::before { background: var(--esb-red); }
.esb-figures div:nth-child(4)::before { background: var(--esb-blue); }

.esb-cliff { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2.5rem; }
.esb-cliff svg { width: 100%; height: auto; display: block; }
.esb-side { display: flex; flex-direction: column; gap: 1.6rem; padding-top: 1rem; }
.esb-side h3 { font-family: var(--esb-heading); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--esb-link); margin: 0 0 0.3rem; }
.esb-side .esb-big { font-family: var(--esb-display); font-size: 3.6rem; line-height: 1.05; color: var(--esb-red); }
.esb-side p { margin: 0; font-size: 1rem; }
.esb-side-box { border-top: 3px solid var(--esb-ink); padding-top: 0.8rem; }

.esb-results { width: 100%; border-collapse: collapse; font-family: var(--esb-mono); font-size: 1.05rem; }
.esb-results th { font-family: var(--esb-heading); font-size: 0.8rem; letter-spacing: 0.1em; text-align: right; padding: 0.7rem 0; border-top: 2px solid var(--esb-ink); }
.esb-results th:first-child { text-align: left; }
.esb-results td { padding: 0.7rem 0; border-top: 1px solid var(--esb-rule); text-align: right; }
.esb-results td:first-child { text-align: left; font-family: var(--esb-body); font-weight: 500; font-size: 1.1rem; }
.esb-results tbody td:last-child { color: var(--esb-red); font-weight: 600; }
.esb-results tfoot td { border-top: 4px double var(--esb-ink); padding-top: 0.5rem; font-size: 0.8rem; color: var(--esb-mute); text-align: left; font-family: var(--esb-mono); font-weight: 400; }
.esb-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 0.6rem; vertical-align: middle; }

.esb-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--esb-ink); }
.esb-tiers section { padding: 1.2rem 1.3rem; border-right: 1px solid var(--esb-ink); }
.esb-tiers section:last-child { border-right: 0; }
.esb-tiers h3 { display: flex; justify-content: space-between; margin: 0 0 0.5rem; font-family: var(--esb-heading); font-size: 1rem; letter-spacing: 0.1em; }
.esb-tiers p { margin: 0; font-family: var(--esb-mono); font-size: 0.9rem; line-height: 1.7; }

.esb-missions { font-size: 1.25rem; line-height: 1.5; }
.esb-missions h2 { font-family: var(--esb-body); font-weight: 500; color: var(--esb-link); font-size: 1.6rem; margin: 0 0 0.6rem; }
.esb-missions ol { margin: 0; padding-left: 0; list-style: none; counter-reset: m; }
.esb-missions li { counter-increment: m; display: flex; gap: 0.8rem; margin-bottom: 0.4rem; color: #3a3833; }
.esb-missions li::before { content: "(" counter(m) ")"; font-family: var(--esb-heading); color: #a39d90; font-weight: 500; }

/* ---------- back section: photocopied exhibits ---------- */

.esb-xerox {
    background: var(--esb-xerox);
    color: var(--esb-toner);
    font-family: var(--esb-typewriter);
    font-size: 1rem;
    line-height: 1.5;
    padding: 3.5rem 5rem 3rem;
    border-top: 14px solid #ebe7dd;
}

.esb-xerox-head { text-align: center; margin-bottom: 2rem; }
.esb-xerox-head::before { content: ""; display: block; width: 120px; margin: 0 auto 0.4rem; border-top: 1.5px dotted var(--esb-toner); }
.esb-xerox-head h2 { margin: 0; font-size: 0.95rem; letter-spacing: 0.18em; }
.esb-xerox-head p { margin: 0; font-style: italic; font-size: 0.9rem; }

.esb-xerox h3 { font-size: 1rem; margin: 1.8rem 0 0.4rem; }
.esb-xerox p { margin: 0 0 0.8rem; }

.esb-xtable { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.esb-xtable th { text-align: left; font-weight: 400; font-size: 0.8rem; letter-spacing: 0.08em; padding: 0.3rem 0.6rem 0.3rem 0; border-top: 1.5px solid var(--esb-toner); }
.esb-xtable td { padding: 0.2rem 0.6rem 0.2rem 0; vertical-align: top; }
.esb-xtable .num { text-align: right; }
.esb-xtable th.num { font-style: italic; }
.esb-xtable tfoot td { border-top: 1.5px solid var(--esb-toner); padding-top: 0.3rem; }
.esb-xtable .total { text-decoration: underline double; }

.esb-leaders { list-style: none; margin: 0; padding: 0.3rem 0 0; border-top: 1.5px solid var(--esb-toner); font-size: 0.95rem; }
.esb-leaders li { display: flex; align-items: flex-end; }
.esb-leaders li::after { content: ""; order: 2; flex-grow: 1; border-bottom: 1.5px dotted #6b675e; margin: 0 0.5rem 0.35rem; }
.esb-leaders li span:last-child { order: 3; }

.esb-page-no { text-align: center; font-size: 0.9rem; margin-top: 2rem; }

.esb-matrix-wrap { overflow-x: auto; }
.esb-matrix { border-collapse: separate; border-spacing: 2px; font-size: 0.75rem; }
.esb-matrix th { font-weight: 400; white-space: nowrap; }
.esb-matrix thead th { vertical-align: bottom; height: 7.5rem; padding: 0; }
.esb-matrix thead th span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; }
.esb-matrix .tier th { height: auto; font-weight: 700; letter-spacing: 0.06em; border-bottom: 1.5px solid var(--esb-toner); text-align: left; }
.esb-matrix tbody th { text-align: left; padding-right: 0.8rem; }
.esb-matrix tbody tr.tool th { font-weight: 700; }
.esb-matrix tbody tr.gap td, .esb-matrix tbody tr.gap th { height: 0.6rem; border: 0; background: none; }
.esb-matrix td { width: 15px; height: 15px; border: 1px solid var(--esb-toner); padding: 0; background: var(--esb-xerox); }
.esb-matrix td.sp { width: 4px; border: 0; background: none; }
.esb-matrix td.p1 { background: #d3cdbd; }
.esb-matrix td.p2 { background: #aaa497; }
.esb-matrix td.p3 { background: #7d786e; }
.esb-matrix td.p4 { background: #4c4943; }
.esb-matrix td.p5 { background: var(--esb-toner); }
.esb-legend { display: flex; gap: 0.3rem; align-items: center; font-size: 0.85rem; margin: 0.8rem 0; }
.esb-legend i { display: inline-block; width: 22px; height: 18px; border: 1px solid var(--esb-toner); }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
    .esb .nav { padding: 1rem; }
    .esb-cover, .esb-front { padding-left: 1.25rem; padding-right: 1.25rem; }
    .esb-masthead { font-size: calc((100vw - 2.5rem) / 8.9); }
    .esb-stripes { margin-left: -1.25rem; margin-right: -1.25rem; }
    .esb-xerox { padding: 2.5rem 1.25rem; }
    .esb-letter, .esb-cliff { grid-template-columns: minmax(0, 1fr); }
    .esb-mini { align-self: start; }
    .esb-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .esb-figures div:nth-child(2) { border-right: 0; }
    .esb-tiers { grid-template-columns: minmax(0, 1fr); }
    .esb-tiers section { border-right: 0; border-bottom: 1px solid var(--esb-ink); }
    .esb-results { font-size: 0.85rem; }
    .esb-kicker { flex-direction: column; }
}

.esb-figures div { display: flex; flex-direction: column; }
.esb-figures div::before { order: 0; }
.esb-figures dd { order: 1; }
.esb-figures dt { order: 2; }

.esb .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.esb-footer { max-width: 1120px; margin: 0 auto 2rem; padding: 1rem 1.25rem; background: var(--background); }
.esb-scroll { overflow-x: auto; }
