:root { color-scheme: light dark; --line: color-mix(in srgb, currentColor 25%, transparent); }
* { box-sizing: border-box; }
body { margin: 0; font: 1rem/1.55 system-ui, sans-serif; overflow-wrap: anywhere; }
header, main { max-width: 46rem; margin: 0 auto; padding: 1rem; }
nav { display: flex; gap: 1.5rem; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 2rem 0 .75rem; }
h1 { margin-top: .5rem; }
pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; }
main img { max-width: 100%; height: auto; }
code { font-size: .9em; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--line); }
.parts { list-style: none; padding: 0; }
.parts a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.demo { border: 1px solid var(--line); border-radius: 6px; padding: 0 1rem 1rem; margin: 1.5rem 0; }
.controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
select, button, input[type=file] { font: inherit; min-height: 44px; max-width: 100%; }
#stage { max-width: 26rem; }
#value { font-variant-numeric: tabular-nums; white-space: pre-wrap; }
.previews { display: flex; flex-wrap: wrap; gap: 1rem; align-items: start; }
.preview { overflow: hidden; }
.preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.p1 { width: 240px; height: 80px; }
.p2 { width: 100px; height: 180px; }

/* Style: classes passed in */
.soft-frame { border-radius: 24px; border: 4px solid #2a7873; }
.soft-slider { accent-color: #2a7873; }
.soft-label { font-weight: 600; }
/* Style: a site with the broad rules themes often have */
.loud img { max-width: 100%; height: auto; border: 8px solid red; padding: 10px; margin: 20px; object-fit: contain; transition: all 1s; transform: rotate(5deg); border-radius: 12px; }
.loud div { border: 3px solid; }
.loud input { width: 100%; padding: 4px; }
.loud label { text-transform: uppercase; }
