:root { --ink:#0d1117; --paper:#f6f8fa; --line:#d0d7de; --muted:#57606a; --accent:#1f6feb; --good:#1a7f37; --bad:#b42318; --x:#1f6feb; --z:#8250df; --y:#bf3989; }
* { box-sizing: border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:16px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
.page { max-width:1100px; margin:0 auto; padding:2rem 1.25rem 4rem; }
h1 { font-size:2rem; margin:0 0 .35rem; letter-spacing:-.02em; }
h2 { font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:0 0 .75rem; }
.lede { color:var(--muted); margin:0 0 1.75rem; max-width:62ch; }

.control { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; margin:0 0 1.75rem; padding:1rem 1.15rem; background:#fff; border:1px solid var(--line); border-radius:10px; }
.control .label { font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.choices { display:flex; gap:.5rem; }
.choice { font:inherit; background:#fff; border:1px solid var(--line); border-radius:8px; padding:.4rem .7rem; cursor:pointer; display:flex; flex-direction:column; align-items:center; line-height:1.2; }
.choice.on { border-color:var(--accent); box-shadow:0 0 0 2px rgba(31,111,235,.15); }
.choice .hint { font-size:.7rem; color:var(--muted); }
.reset { margin-left:auto; font:inherit; background:none; border:none; color:var(--accent); cursor:pointer; }
.reset:disabled { color:var(--muted); cursor:default; }

.board { display:flex; flex-wrap:wrap; gap:2.5rem; align-items:flex-start; }

/* The lattice is the interface, so it gets to be big. */
.lattice { display:grid; grid-template-columns:repeat(var(--side), 84px); gap:.6rem; }
.qubit { width:84px; height:84px; border-radius:12px; border:2px solid var(--line); background:#fff; cursor:pointer; font:inherit; display:grid; place-items:center; transition:border-color .1s, background .1s; }
.qubit:hover { border-color:var(--accent); }
.qubit .mark { font-size:1.5rem; font-weight:700; }
.qubit.clean .mark { color:transparent; }
.qubit.x { border-color:var(--x); background:#ddf4ff; } .qubit.x .mark { color:var(--x); }
.qubit.z { border-color:var(--z); background:#fbefff; } .qubit.z .mark { color:var(--z); }
.qubit.y { border-color:var(--y); background:#ffeff7; } .qubit.y .mark { color:var(--y); }

.checks { flex:1 1 300px; min-width:280px; }
.stabilizers { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.35rem; }
.stabilizers li { display:flex; align-items:center; gap:.6rem; padding:.35rem .6rem; border:1px solid var(--line); border-radius:8px; background:#fff; font-size:.875rem; }
.stabilizers .dot { width:12px; height:12px; border-radius:50%; background:var(--line); flex:none; }
/* A lit check is the thing the visitor is watching for, so it is loud. */
.stabilizers li.lit { border-color:var(--bad); background:#fff5f4; }
.stabilizers li.lit .dot { background:var(--bad); box-shadow:0 0 0 4px rgba(180,35,24,.15); }
.stabilizers .sees { margin-left:auto; color:var(--muted); font-size:.8rem; }

.verdict { margin:1.75rem 0 0; padding:.9rem 1.1rem; border-radius:10px; border:1px solid var(--line); background:#fff; max-width:70ch; }
.verdict.good { border-color:var(--good); background:#eaffef; }
.verdict.bad { border-color:var(--bad); background:#fff5f4; }
.verdict.idle { color:var(--muted); }

.figures { margin-top:1.5rem; }
.figure { margin:1.25rem 0 .5rem; }
.figure .value { font-size:2.6rem; font-weight:700; letter-spacing:-.03em; display:block; line-height:1; }
.figure .unit { color:var(--muted); }
.what { margin:.6rem 0; max-width:60ch; }
.what code { font:.9em ui-monospace,SFMono-Regular,Menlo,monospace; background:#eef1f4; padding:.05em .3em; border-radius:4px; }
.idle { color:var(--muted); }
.provenance { color:var(--muted); font-size:.875rem; margin-top:1.5rem; border-top:1px solid var(--line); padding-top:1rem; max-width:66ch; }
.provenance strong { color:var(--ink); }
.error { color:var(--bad); background:#fff1f0; border:1px solid #ffccc7; padding:.6rem .8rem; border-radius:8px; }
.booting { padding:3rem 1.25rem; color:var(--muted); }
#blazor-error-ui { display:none; position:fixed; bottom:0; left:0; right:0; background:#ffe8a3; padding:.7rem 1.25rem; }
