/* Socle commun : remise à zéro, réglage de la langue, mécanique du code
 * et de la mesure. Chaque direction habille le reste. */

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }

/* ---- Langue : un petit réglage dans le coin ---- */
.lab {
	position: fixed; top: 10px; right: 10px; z-index: 50;
	display: flex; align-items: center; padding: 2px;
	background: rgb(14 12 10 / .72); color: #ebe2cf;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	border: 1px solid rgb(235 226 207 / .14); border-radius: 999px;
	font: 400 12px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em;
}
.lab { cursor: pointer; gap: 0; }
.lab span { display: grid; place-items: center; min-width: 32px; min-height: 28px; padding: 0 6px; border-radius: 999px; color: rgb(235 226 207 / .55); transition: color .2s, background-color .2s; }
.lab:hover span:not(.is-on) { color: #fff; }
.lab span.is-on { color: #0d0b09; background: rgb(235 226 207 / .9); }

/* ---- Code ---- */
.code { margin: 0; overflow-x: auto; tab-size: 4; -moz-tab-size: 4; white-space: pre; font-variant-ligatures: none; }
.code code { font: inherit; }

/* ---- Mesure ---- */
.measure { display: grid; gap: 10px; }
.m-input { display: block; width: 100%; resize: none; overflow: hidden; font-size: max(16px, 1em); padding: 4px 0 8px; background: transparent; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; }
.m-input:focus { outline: none; }
.m-out { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.m-num { font-variant-numeric: lining-nums tabular-nums; }
.m-track { overflow: hidden; padding-bottom: 4px; }
.m-cells { display: flex; width: max-content; }
.m-cell { display: grid; justify-items: center; align-content: start; }
.m-cell b, .m-cell i { font-style: normal; font-weight: 400; }

.da { display: block; }
