/* Reset */
* {
    margin: 0;
    box-sizing: border-box;
}

:root {
    --gap: 1rem;
    --min-skip: 0.25rem;
    --page-w: 29.7cm;
    --page-h: 42cm;
    --print-page-w: 59.4cm;
    --print-page-h: 84.1cm;
    --font-sans: "Fira Sans";
    --font-monospace: "JetBrains Mono", "Iosevka Algr Web", "Iosevka", "Fira Code", monospace;
    --color-rouge: #E30613;
    --color-groseille: #B51F1F;
    --color-leman: #00A79F;
    --color-canard: #007480;
    --color-ardoise: #413D3A;
    --color-perle: #CAC7C7;
    --hl-literate: #191970;
    --hl-disabled: var(--color-perle);
    --hl-keyword: #B35000;
    --hl-string: var(--color-canard);
    --hl-variable: var(--color-ecmagreen);
}

html {
    line-height: 1.3;
    font-size: 1.05rem;
    font-family: var(--font-sans);
}

p, h3, h4, pre, blockquote {
    margin: 0.5em 0;
}

.katex-display {
    margin: 0.5em 0;
}

blockquote {
    margin-left: 1em;
}

h2 {
    font-size: 1.25em;
}

h2, h3, h4 {
    font-weight: 500;
}

address {
    font-family: var(--font-monospace);
    font-style: initial;
}

pre, code, samp {
    font-family: var(--font-monospace);
}

pre, .esh-standalone, .ecma-box {
    font-size: 0.9em;
    line-height: 1.2;
}

pre.terminal {
    background: var(--color-ardoise);
    color: white;
    padding: 0.5rem;
    border: inset;
}

pre {
    white-space: pre-wrap;
}

code {
    font-variant-ligatures: none;
    white-space-collapse: preserve;
}

code b, code span {
    white-space: pre;
}

pre code {
    font-variant-ligatures: initial;
}

pre code.rocq {
    font-feature-settings: "calt" 0, "rocqX" 1;
}

code b {
    font-weight: normal;
}

code i {
    color: var(--hl-string);
    font-style: inherit;
}

code var, code b.v {
    color: var(--hl-variable);
    font-style: italic;
}

code .kw {
    color: var(--hl-keyword);
}

code .lit {
    color: var(--hl-literate);
    font-family: var(--font-sans);
    font-style: italic;
    margin: 0.35rem 0 0.15rem 0;
    display: inline-block;
}

code .lit.off {
    opacity: 0.8;
    margin: 0;
}

:is(samp, code) b.ok {
    color: var(--color-leman);
}

:is(samp, code) b.warn {
    color: var(--color-ecmayellow);
}

strong {
    font-weight: 600;
}

ul, ol {
    padding-left: 1rem;
    /* list-style-position: inside; */
    /* line-height: 1.7; */
}

:is(ul, ol) p {
    margin: 0;
}

:is(ul,ol).compact-list {
    line-height: 1.5;
}

.detail {
    font-size: 0.9em;
    text-align: center;
}

.highlight {
    display: block;
    text-align: center;
    font-weight: 500;
}

hr.sep {
    border: none;
}

body {
    max-width: var(--page-w);
    max-height: var(--page-h);
    height: var(--page-h);
    width: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    margin: auto;
}

body > :is(header,footer) {
    display: grid;
    gap: var(--gap);
    /* padding: var(--gap); */
    padding: calc(var(--gap) / 2);
    background: var(--color-canard);
    color: white;
    align-items: center;
    justify-items: center;
    text-align: center;
}

body > :is(header,footer) > :first-child {
    justify-self: start;
}

body > :is(header,footer) > :last-child {
    justify-self: end;
}

body > header {
    grid-template-columns: auto 1fr auto;
}

body > header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

body > header a, body > footer a {
    color: inherit;
    text-decoration: none;
}

body > header img {
    height: 4lh;
}

body > header img[src*="qr"] {
    display: none;
}

body > header > hgroup {
    text-align: center;
    display: grid;
    grid-gap: 0.5rem;
    line-height: 1;
}

body > header > hgroup > * {
    margin: 0;
}

main {
    display: grid;
    gap: var(--gap);
    padding: var(--gap);
    grid-template-rows: auto auto auto 1fr;
}

main > div {
    display: grid;
    gap: var(--gap);
}


.cols {
    display: grid;
    gap: var(--gap);
    grid-template-columns: auto 1fr;
}

.cols_2_3 {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 2fr 3fr;
}

.cols_1_2 {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr 2fr;
}

.cols_background {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 100fr 180fr;
}

.cols_3_1 {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 3fr 1fr;
}

.cols_2_eq {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr 1fr;
}

.cols_2_pitch {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 55fr 50fr;
}

.cols_3_eq {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr 1fr 1fr;
}

.cols_4_eq {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.rows_2_eq {
    display: grid;
    gap: var(--gap);
    grid-template-rows: 1fr 1fr;
}

.rows_2_almost_eq {
    display: grid;
    gap: var(--gap);
    grid-template-rows: 50fr 42fr;
}

.example_arrow {
    margin-top: auto;
    width: 100%;
    border-top: thin solid var(--color-ardoise);
    height: 0.5rem;
}

.result_example_box {
    padding: 0.5rem;
    background-color: var(--color-perle);
    border: thin dashed var(--color-ardoise);
    opacity: 0.7;
}

.result_example {
    overflow: hidden;
    display:-webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    line-clamp: 8;
    /* border-top: thin dashed var(--color-ardoise); */
    margin: 0;
    /* padding: 0.5rem; */
    /* background-color: var(--color-perle); */
}

.rows {
    display: grid;
    gap: var(--gap);
    grid-template-rows: auto 1fr;
}

.contributions_list {
    font-size: 0.85rem;
}

.lets {
    font-size: 0.85rem;
}

/* .step_type {
    
} */

.header_with_type {
    display: grid;
    grid-template-columns: 1fr auto;
}

.katex-display {
    margin: 0.5em 0 !important;
}

main > div#outline {
    grid-template-columns: auto 1fr;
}

main > div#contribution {
    grid-template-columns: auto 1fr;
}

main > div#challenges {
    grid-template-columns: 1fr;
}

main > div > article {
    border: thin solid var(--color-ardoise);
    display: flex;
    flex-direction: column;
}

main > div > div > article {
    border: thin solid var(--color-ardoise);
    display: flex;
    flex-direction: column;
}

main > div > div > div > article {
    border: thin solid var(--color-ardoise);
    display: flex;
    flex-direction: column;
}

main > div > div > div > div > article {
    border: thin solid var(--color-ardoise);
    display: flex;
    flex-direction: column;
}

main article > section {
    margin: 0.5rem;
}

/* main > div > article section {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    gap: var(--min-skip);
    justify-content: space-between;
} */

main > div > article section > *,
main > div > article section > * > :first-child {
    margin-top: 0 !important;
}

/* main > div > article section > *,
main > div > article section > * > :last-child {
    margin-bottom: 0 !important;
} */

article > header {
    background: var(--color-ardoise);
    color: white;
    padding: calc(0.5 * var(--gap));
}

article h3 {
    text-align: center;
}

#background section > article {
    display: contents;
}

#background section > article h3 {
    margin-bottom: 0;
}

#background section > article:first-child {
    text-align: center;
}

#background section > article:not(:first-child) > div:nth-of-type(1) {
    align-self: end;
}

#background section > article:not(:first-child) > div:nth-of-type(3) {
    align-self: start;
    display: flex;
}

#background .katex-display {
    margin: 0 !important;
}

#background .floating-code code {
    margin-left: 0.5rem;
    float: right;
}

#background img {
    width: 90%;
    margin: auto;
}

#background .large-operator {
    font-size: 1.5rem;
    text-align: center;
    margin: 0.25rem;
}

#background .rotated-operator {
    transform: rotate(90deg);
}

#abstract {
    display: grid;
    grid-template-columns: 1fr;
    grid-row-gap: 1rem;
}

#abstract > article {
    position: relative;
    padding-top: 0.35rlh;
    border: thin solid var(--color-ardoise);
}

#abstract > article h2 {
    font-size: 1rem;
    position: absolute;
    top: -0.5lh;
    left: 0.25lh;
    padding: 0 0.25lh;
    display: inline-block;
    border: thin solid var(--color-ardoise);
    background: white;
}

.key-point {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 0;
}

#contributions li p {
    display: inline;
}

#rocq pre {
    line-height: 1;
    font-size: 0.85rem;
}

#rocq code .lit {
    font-size: 0.8rem;
}

#challenges > article {
    display: grid;
    grid-column-gap: var(--gap);
    grid-template-rows: auto 1fr;
    grid-template-columns: auto 1fr;
}

#challenges > article > header {
    grid-column-end: span 2;
}

#challenges > article > section :is(h3,h4) {
    margin: 0 0 0.5rem 0;
    text-align: left;
}

body > footer {
    display: grid;
    grid-template-columns: 1fr auto;
}

body > footer > img {
    height: 1lh;
}

body > footer > .venue {
    text-align: left;
}

@media print {
    body {
        /* width: var(--page-w); */
        width: var(--print-page-w);
        max-width: var(--print-page-w);
        height: var(--print-page-h);
        max-height: var(--print-page-h);
        /* height: calc(var(--page-h) * 1.4141);
        max-height: calc(var(--page-h) * 1.4141); */
    }

    body > header img[src*="qr"] {
        display: block;
    }

    html {
        font-size: 2rem;
    }

    .contributions_list {
        font-size: 0.9rem;
    }
}

@media (max-width: 27cm) {
    html {
        font-size: 0.6rem;
    }
    body {
        width: 100%;
        height: unset;
    }

    .cols_background {
        display: contents;
    }

    .cols_2_pitch {
        display: contents;
    }

    .cols {
        display: contents;
    }

    main > div > article > section {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }
}

@media (max-width: 48rem) {
    html {
        font-size: 0.7rem;
    }

    body {
        width: 100%;
        height: unset;
    }
}

@media (max-width: 32rem) {
    html {
        font-size: 0.8rem;
    }

    body {
        width: 100%;
        height: unset;
    }
}
