:root {
  color-scheme: light dark;
  font: 16px/1.5 system-ui, sans-serif;
  --page: #eef1f7;
  --panel: #fff;
  --text: #222b43;
  --quiet: #526078;
  --edge: #ccd4e6;
  --action: #315aa2;
  --preview: #e9effa;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #152036; --panel: #1e2a42; --text: #edf2ff; --quiet: #c0cce0; --edge: #4f5f7a; --action: #315da8; --preview: #d3dff8; }
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--page); }
main { max-width: 860px; margin: auto; padding: clamp(16px, 4vw, 35px); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.35rem); line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: 1.2rem; }
p { margin-top: 8px; color: var(--quiet); }
form, section { margin-top: 18px; padding: clamp(14px, 3vw, 23px); border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); }
label, button { font-weight: 650; }
input, select, button { font: inherit; color: inherit; }
select, input:not([type=checkbox]), button { padding: 7px 10px; border: 1px solid var(--edge); border-radius: 7px; background: var(--page); }
input:not([type=checkbox]) { display: block; margin-top: 5px; width: 100%; }
button { cursor: pointer; }
button:disabled { opacity: .7; cursor: wait; }
button[type=submit], #download { color: white; background: var(--action); border-color: transparent; }
.settings, dl, .comparison { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings, .checkbox { margin-top: 13px; }
.checkbox { display: block; }
.actions, footer, .axis { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions { justify-content: space-between; }
form .actions, footer { margin-top: 14px; }
dd { margin: 0; font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
dt, figcaption, footer { color: var(--quiet); font-size: .9rem; }
figure { margin: 12px 0 0; }
canvas { display: block; width: 100%; aspect-ratio: 1; max-height: 270px; object-fit: contain; border-radius: 7px; background: var(--preview); }
figcaption { text-align: center; margin-top: 6px; }
a { color: var(--quiet); }
:focus-visible { outline: 2px solid #326ace; outline-offset: 2px; }
