:root{color-scheme:dark;--bg:#11151b;--panel:#191f27;--line:#303b47;--text:#f4f7fb;--muted:#bdc8d4;--cyan:#80e8ef;--button:#83e8ee;--ink:#10191d}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
.page-shell{width:min(100% - 32px,900px);margin:0 auto;padding:20px 0 48px}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}
a{color:var(--cyan);text-underline-offset:3px}
.site-link{text-decoration:none;font-weight:700}
.tag,.eyebrow{font-size:.76rem;letter-spacing:.08em;color:var(--muted);font-weight:700}
h1{font-size:clamp(2rem,7vw,3.1rem);line-height:1.1;margin:0 0 16px}
h2{font-size:1.4rem;line-height:1.25;margin:0 0 12px}
p{margin:0 0 14px}
.answer-box,.results,.explanation{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:clamp(16px,4vw,28px);margin:0 0 20px}
.intro{font-size:1.1rem;font-weight:650;max-width:68ch}
.account-note,.test-heading span,.scope-note{color:var(--muted);font-size:.92rem}
.test-panel{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}
.test-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 16px;margin-bottom:18px}
.test-heading h2{margin:0}
.swatches{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(24px,1fr));gap:clamp(2px,.65vw,6px);width:100%;touch-action:manipulation}
.swatches li{min-width:24px}
.swatch{position:relative;display:block;padding:0;width:100%;min-width:24px;min-height:24px;height:64px;border:2px solid rgba(255,255,255,.3);border-radius:8px;cursor:pointer;touch-action:manipulation;box-shadow:inset 0 0 0 1px rgba(0,0,0,.14)}
.swatch:hover{border-color:#fff;transform:translateY(-2px)}
.swatch[aria-pressed="true"]{outline:3px solid #fff;outline-offset:3px;z-index:1}
.swatch:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:3px}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
button{min-height:44px;border-radius:10px;padding:9px 16px;font:inherit;font-weight:750;cursor:pointer}
.primary{background:var(--button);color:var(--ink);border:1px solid var(--button)}
.quiet{background:transparent;color:var(--text);border:1px solid #637282}
.results h2{margin-bottom:4px}
.score-line{font-size:1.25rem;margin-bottom:8px}
.score-line strong{font-size:2.7rem;color:var(--cyan);font-variant-numeric:tabular-nums}
.result-explanation{font-size:1.05rem}
.limits{border-left:3px solid var(--cyan);padding:4px 0 4px 15px;margin:20px 0}
.limits p:last-child{margin-bottom:0}
.formula{overflow-wrap:anywhere;background:#0e1318;border:1px solid var(--line);border-radius:10px;padding:13px 15px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.history-list{display:grid;grid-template-columns:minmax(120px,.5fr) 2fr;gap:8px 16px;margin:14px 0}
.history-list dt{font-weight:750;color:var(--cyan)}
.history-list dd{margin:0}
footer{border-top:1px solid var(--line);padding:20px 4px;color:var(--muted);font-size:.92rem}
footer nav{display:flex;flex-wrap:wrap;gap:12px 20px;margin-bottom:18px}
footer p{margin-bottom:5px}
[hidden]{display:none!important}
@media(max-width:520px){.page-shell{width:calc(100% - 24px);padding-top:14px}.page-head{margin-bottom:17px}.tag{font-size:.65rem}.answer-box,.results,.explanation{border-radius:14px;padding:16px 13px}.test-heading{display:block}.test-heading span{display:block;min-height:1.6em;margin-top:4px}.swatch{height:72px;min-width:24px;min-height:24px;border-width:1px;border-radius:5px}.swatches{gap:2px}.history-list{grid-template-columns:1fr;gap:2px}.history-list dd{margin-bottom:10px}.actions button{flex:1 1 100%}}
.display-check{border:1px solid var(--line);border-radius:12px;padding:16px;margin:20px 0;background:#141a21}
.display-check h2{margin-bottom:8px}
.display-check .eyebrow{margin-bottom:4px}
.check-pattern{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;height:32px;margin:12px 0 8px}
.hue-pattern{grid-template-columns:repeat(7,minmax(0,1fr))}
.check-pattern span{display:block;border:1px solid rgba(255,255,255,.55);border-radius:4px}
.check-question{border:0;border-top:1px solid var(--line);margin:0;padding:12px 0 10px;display:flex;flex-wrap:wrap;gap:8px 16px}
.check-question legend{float:left;width:100%;padding:0 0 7px;font-weight:650}
.check-question label{display:inline-flex;align-items:center;gap:6px;min-height:36px;cursor:pointer}
.check-question input{width:18px;height:18px;accent-color:var(--cyan)}
.check-conclusion{padding:10px 12px;border-radius:8px;background:#202833;border-left:3px solid var(--muted);font-weight:700}
.check-conclusion[data-state="pass"]{border-color:#7be3ae}
.check-conclusion[data-state="fail"]{border-color:#ffca72}
.display-check .small,.keyboard-help,.tile-key{font-size:.9rem;color:var(--muted)}
.tile-key{margin:0 0 10px}
.keyboard-help{margin:14px 0 0}
.swatch{height:76px;background:transparent!important;padding:2px 0 0;display:flex;flex-direction:column;gap:2px;overflow:visible}
.swatch-color{display:block;flex:1 1 auto;min-height:0;border-radius:5px;border:1px solid rgba(255,255,255,.55);box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.swatch-id{display:block;flex:0 0 16px;border-radius:3px;background:#f4f7fb;color:#11151b;font-size:11px;line-height:16px;font-weight:850;text-align:center;letter-spacing:0}
.swatch:focus-visible{outline:3px solid #fff;outline-offset:3px;z-index:2}
.swatch[aria-pressed="true"]{outline:3px solid var(--cyan);outline-offset:3px;z-index:1}
.primary:disabled{opacity:.55;cursor:not-allowed}
.check-warning{border:1px solid #a8752c;background:#332817;border-radius:9px;padding:12px;margin:16px 0}
.result-use{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}
.result-use h3{font-size:1.15rem;margin:0 0 10px}
.result-use p{margin-bottom:10px}
@media(max-width:520px){.display-check{padding:13px 10px}.check-question{gap:3px 10px}.check-question label{font-size:.92rem;min-height:40px}.swatch{height:72px;padding-top:1px}.swatch-id{font-size:10px}.tile-key,.keyboard-help,.display-check .small{font-size:.86rem}}
