:root {
    --main-content-max-width: 780px;
    --gap: 18px;
    --content-size: 780px;
    --menu-size: 300px;
    --border-radius: 6px;
}

/*
 The page's colours, made of one: the theme's background (the user's,
 --base-light / --base-dark, set by theme.mjs). OKLCH: lightness as the
 eye sees it, so the same steps read the same at every hue. The
 background's lightness is held in a band (the text on it always
 readable whatever colour is picked), its chroma held low (never
 garish); the text is the background's hue,
 a fixed lightness; muted text a mix of the text and the block, not
 transparency.
*/
:root,
:root.light {
    color-scheme: light;
    --background: oklch(from var(--base-light, #cccccc) clamp(0.78, l, 0.96) min(c, 0.08) h);
    --blockBackground: oklch(from var(--background) calc(l + 0.05) c h);
    --color: oklch(from var(--background) 0.2 min(c, 0.03) h);
    --muted: color-mix(in oklch, var(--color) 54%, var(--blockBackground));
}

:root.dark {
    color-scheme: dark;
    --background: oklch(from var(--base-dark, #18191a) clamp(0.14, l, 0.32) min(c, 0.06) h);
    --blockBackground: oklch(from var(--background) calc(l + 0.06) c h);
    --color: oklch(from var(--background) 0.93 min(c, 0.02) h);
    --muted: color-mix(in oklch, var(--color) 62%, var(--blockBackground));
}

html {
    height: 100%;
    color: var(--color);
    background-color: var(--background);
}

.block {
    background-color: var(--blockBackground);
}

.text-muted {
    color: var(--muted);
}

.theme-form {
    display: grid;
    gap: 8px;
    padding: var(--gap);
    border-radius: var(--border-radius);
    max-width: var(--menu-size);
}

.theme-form fieldset {
    border: none;
    display: grid;
    gap: 4px;
}
