:root{color-scheme:light;--paper:#f6f2ec;--card:#fffefd;--ink:#191928;--muted:#57556c;--edge:#ded8d1;--accent:#49358d;--hover:#3c287c;font-family:"Avenir Next",system-ui,sans-serif;color:var(--ink);background:var(--paper)}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-width:280px}
button,input{font:inherit}
a{color:inherit;text-underline-offset:.2em}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #8568cb;outline-offset:2px}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.55}
[hidden]{display:none!important}
.header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.7rem max(1rem,calc((100% - 78rem)/2));border-bottom:1px solid var(--edge);font-size:.9rem;min-height:3.8rem;background:var(--card)}
.brand{display:flex;align-items:center;gap:.58rem;text-decoration:none;font-weight:700}
.brand img{border-radius:.45rem}
main,footer{width:min(calc(100% - 2rem),78rem);margin:auto}
main{padding:clamp(1.1rem,4vw,3rem) 0 1rem}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(2.15rem,5.2vw,4.3rem);line-height:1.02;letter-spacing:-.07em}
h2{font-size:1.06rem}
h3{font-size:.84rem}
.intro{display:flex;justify-content:space-between;align-items:end;gap:1.25rem;margin-bottom:1.5rem}
.intro p{margin-top:.65rem;color:var(--muted)}
.workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(19rem,1fr);gap:1rem;align-items:start}
.board,.docs section{background:var(--card);border:1px solid var(--edge);border-radius:.9rem;padding:1rem;min-width:0}
.topline{display:flex;justify-content:space-between;align-items:center;gap:.7rem;margin-bottom:.7rem}
.topline output,.detail,footer,#ready-info{font-size:.85rem;color:var(--muted)}
.comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.72rem}
.comparison h3{margin-bottom:.45rem;font-weight:650}
.checker{background-color:#f9f8fb;background-image:conic-gradient(#edeaf3 25%,#f9f8fb 0 50%,#edeaf3 0 75%,#f9f8fb 0);background-size:20px 20px}
.stage{border:1px solid var(--edge);border-radius:.55rem;min-height:clamp(150px,29vw,340px);width:100%;display:grid;place-items:center;padding:.55rem;color:var(--muted);font-weight:500;font-size:.84rem}
.stage img{max-width:100%;max-height:315px;display:block;pointer-events:none}
.picker{cursor:crosshair}
.picker:disabled{opacity:1}
.secondary,.primary{padding:.5rem .72rem;display:inline-flex;justify-content:center;align-items:center;min-height:2.6rem;font-weight:650;border-radius:.55rem;text-decoration:none}
.secondary{background:#f6f1fa;border:1px solid #d6cae4;color:#392961;white-space:nowrap}
.secondary:hover:not(:disabled){background:#ece2f4}
.primary{color:white;background:var(--accent);border:1px solid var(--accent)}
.primary:hover:not(:disabled){background:var(--hover)}
aside>.primary{width:100%;margin-top:.8rem}
.detail{line-height:1.35;margin-top:.58rem}
#assets{list-style:none;padding:0;margin:.6rem 0 0;max-height:12rem;overflow:auto}
#assets li{display:flex;gap:.33rem;margin:.3rem 0}
#assets .asset{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#assets .asset[aria-pressed=true]{background:#e6dbf4;border-color:#9b82bd}
#assets .remove{min-width:2.4rem;color:#665d75}
.settings{margin-top:.85rem;padding-top:.85rem;border-top:1px solid var(--edge)}
.color-fields{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin-top:.75rem}
label{font-size:.83rem;font-weight:600}
.swatch{display:flex;align-items:center;gap:.3rem;border:1px solid #cac0d5;border-radius:.45rem;margin-top:.35rem;padding:.25rem;min-width:0}
.swatch input[type=color]{width:2.25rem;height:2.05rem;border:0;padding:0;cursor:pointer;background:transparent;flex-shrink:0}
.swatch input:not([type=color]){width:100%;min-width:0;border:0;background:transparent;letter-spacing:.01em;color:var(--ink);font-variant-numeric:tabular-nums;padding:.22rem;font-size:.86rem}
.swatch span{color:var(--muted);pointer-events:none}
.range-label{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-top:.8rem}
#tolerance{width:100%;accent-color:var(--accent)}
#status{font-size:.84rem;margin-top:.6rem;line-height:1.4}
#status[data-error]{color:#922846}
#status:empty,#preview-message:empty{display:none}
#result{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap;border-top:1px solid var(--edge);padding-top:.8rem;margin-top:.9rem}
footer{padding:.7rem 0 1.2rem;display:flex;justify-content:space-between;gap:.7rem}
.docs{max-width:46rem}
.docs section{margin-top:.9rem;line-height:1.55}
.docs p{margin-top:.55rem}
@media(max-width:770px){.workspace{grid-template-columns:minmax(0,1fr)}.intro{align-items:start}.board{padding:.78rem}}
@media(max-width:490px){.intro{flex-direction:column;gap:.8rem;margin-bottom:1rem}.stage{min-height:150px}.comparison{gap:.5rem}.stage img{max-height:160px}}
