/* exo — exercise cards, hint folds (sequential unlock), solution fold */ .exo { margin: 1.2rem 0; padding: 0.6rem 0.9rem; border: 1px solid color-mix(in srgb, var(--calc-notecolor, #B45309) 35%, transparent); border-left: 3px solid var(--calc-notecolor, #B45309); border-radius: 0.35rem; scroll-margin-top: 5rem; } /* keep wide content inside the card: display math (and tables/code) scroll on their own rather than spilling past the border. overflow-y stays hidden so Firefox doesn't add a phantom vertical bar, as in .calc */ .exo mjx-container[display="true"], .exo .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 0.35em; /* keep descenders clear of a horizontal bar */ /* a centred overflowing box clips its left side out of reach, so centre only while the formula fits (browsers without `safe` keep plain centring) */ display: flex; justify-content: center; justify-content: safe center; } .exo .math.display { display: block; max-width: 100%; } .exo :is(pre, table) { max-width: 100%; overflow-x: auto; } .exo img, .exo svg { max-width: 100%; } .exo-head p { margin: 0 0 0.4rem; } .exo-head strong { color: var(--calc-notecolor, #B45309); } .exo details { margin: 0.45rem 0; border-radius: 0.3rem; } .exo details > summary { cursor: pointer; list-style: none; user-select: none; font-size: 0.9em; font-weight: 600; } .exo details > summary::-webkit-details-marker { display: none; } .exo details > summary::before { content: "▸ "; } .exo details[open] > summary::before { content: "▾ "; } /* hints: small highlight boxes */ .exo-hint { background: color-mix(in srgb, var(--calc-notecolor, #B45309) 6%, transparent); border: 1px solid color-mix(in srgb, var(--calc-notecolor, #B45309) 30%, transparent); padding: 0.25rem 0.6rem; } .exo-hint > summary { color: var(--calc-notecolor, #B45309); } /* locked hints: unlock one by one */ .exo-hint.exo-locked > summary { cursor: not-allowed; opacity: 0.45; } .exo-hint.exo-locked > summary::before { content: "🔒 "; } /* solution: closed by default, visually separated */ .exo-sol { border-top: 1px dashed color-mix(in srgb, var(--calc-notecolor, #B45309) 40%, transparent); padding: 0.35rem 0.1rem 0.1rem; scroll-margin-top: 5rem; } /* in a numbered part, the fold lines up with the part's text */ .exo li > details { margin-left: 0; } /* hand-in extracts (handin.sh, html output) */ .exo-handin-sol, .exo-handin-hint { margin: 0.6rem 0; padding: 0.2rem 0 0.2rem 0.8rem; border-left: 2px solid var(--calc-notecolor, #B45309); } .exo-fold-body { margin-top: 0.3rem; } .exo-fold-body > p:first-child { margin-top: 0; } .exo-fold-body > p:last-child { margin-bottom: 0; } @media print { .exo details > summary::before { content: ""; } .exo-hint.exo-locked > summary { opacity: 1; cursor: default; } }