:root{font-family:Arial,sans-serif;color:#183647;background:#edf3f4;--ink:#183647;--accent:#126b70;--warm:#e88946}*{box-sizing:border-box}body{margin:0}header{background:var(--ink);color:white;padding:30px max(24px,calc((100vw - 1240px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px}h1{font-size:clamp(36px,5vw,54px);margin:6px 0}h2{font-size:24px;margin:0 0 20px}h3{font-size:22px}p{line-height:1.5}.eyebrow{letter-spacing:.16em;font-size:12px;margin:0}header p:last-child{margin-bottom:0}main{max-width:1290px;margin:26px auto;padding:0 24px}.layout{display:grid;grid-template-columns:1fr;gap:22px}.panel{background:white;border:1px solid #cddcde;border-radius:18px;padding:26px;margin-bottom:22px;box-shadow:0 5px 20px #18364708}.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.chip{font-size:11px;letter-spacing:.08em;background:#dff0eb;border-radius:20px;padding:8px 12px;white-space:nowrap}label{display:block;font-weight:bold;font-size:15px;margin:16px 0 10px}input,select,textarea{display:block;width:100%;font:inherit;font-weight:normal;border:1px solid #a9bec4;border-radius:8px;padding:12px;margin-top:7px;background:white;color:var(--ink)}textarea{resize:vertical;line-height:1.4}button{font:inherit;font-weight:bold;padding:12px 16px;border:1px solid #a9bec4;border-radius:9px;color:var(--ink);background:#f1f6f6;cursor:pointer;min-height:44px;margin:5px 3px 5px 0}button:hover{background:#dfeeed}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:var(--accent);color:white;border-color:var(--accent)}.primary:hover{background:#0c5256}.danger{color:#963c32}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--warm);outline-offset:3px}.entry,.entry-heading{display:grid;grid-template-columns:1fr 48px 68px 36px;gap:7px;align-items:center}.entry-heading{font-size:11px;margin-top:23px}.entry input{min-width:0;margin:4px 0;padding:9px}.entry input[type=color]{padding:4px;height:43px}.entry button{padding:5px;min-width:0;margin:0}.muted{font-size:14px;color:#49616f}.device-wrap{position:relative;max-width:360px;margin:10px auto}canvas{display:block;width:100%;height:auto}#pointer{position:absolute;top:-7px;left:calc(50% - 13px);font-size:30px;color:var(--ink);z-index:2}#dieResult{position:absolute;inset:26%;background:#fff;border:3px solid var(--ink);border-radius:22px;place-items:center;text-align:center;font-size:40px;font-weight:bold;overflow-wrap:anywhere;padding:10px}#dieResult:not([hidden]){display:grid}.trial-controls{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.trial-controls label{min-width:120px}#result{font-size:23px;font-weight:bold;color:var(--accent);min-height:35px}#progress{font-size:14px}.graph-key{display:flex;gap:24px;font-size:14px;margin-bottom:20px}.observed{color:var(--accent)}.expected{color:#a66030}.graph-row{display:grid;grid-template-columns:120px 1fr 50px;gap:12px;margin:15px 0;align-items:center}.graph-label{overflow-wrap:anywhere}.bar-track{display:flex;flex-direction:column;gap:4px;min-width:0}.bar{height:16px;background:var(--accent);min-width:0;border-radius:3px}.bar.expected{background:repeating-linear-gradient(45deg,#e9b184,#e9b184 4px,#f9e4d1 4px,#f9e4d1 8px);height:12px;border:1px solid #bb7742}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:15px;margin:16px 0}caption{text-align:left;font-weight:bold;margin-bottom:10px}th,td{text-align:left;border-bottom:1px solid #dbe5e7;padding:12px;vertical-align:top}th{background:#edf4f4}.raw{max-height:320px}details{margin-top:18px}summary{font-weight:bold;cursor:pointer;padding:10px 0}.help li,li{line-height:1.6;margin:6px 0}.storage{display:flex;gap:10px;align-items:center;flex-wrap:wrap}footer{padding:20px;text-align:center;color:#49616f;font-size:12px}[hidden]{display:none!important}@media(max-width:850px){.layout{grid-template-columns:1fr}.section-heading{flex-wrap:wrap}header{padding:24px}main{padding:0 14px}.panel{padding:20px}.graph-row{grid-template-columns:90px 1fr 40px}}
.assessment-active .graph-key .expected,.assessment-active #summary td:nth-child(2),.assessment-active #summary td:nth-child(6),.assessment-active #frequencyTable th:nth-child(2),.assessment-active #frequencyTable th:nth-child(6){display:none}


.header-actions{display:flex;gap:10px;flex-wrap:wrap}.drawer-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}.drawer-heading h2{margin:0}#setupPanel{position:fixed;inset:0 auto 0 0;margin:0;width:min(460px,100vw);height:100dvh;max-height:100dvh;max-width:100vw;border:0;border-right:1px solid #cddcde;padding:26px;color:var(--ink);background:#fff;overflow-y:auto;box-shadow:12px 0 40px #18364733}#setupPanel::backdrop{background:#18364770}body:has(#setupPanel[open]){overflow:hidden}@media(max-width:600px){header{align-items:flex-start;flex-direction:column}#setupPanel{padding:20px}}

#setupHandle{position:fixed;left:0;top:45%;z-index:5;margin:0;width:36px;min-height:72px;padding:8px;border-radius:0 12px 12px 0;background:var(--accent);color:white;border-color:#fff;box-shadow:3px 3px 12px #18364730;font-size:25px}#setupHandle:hover{background:#0c5256}body:has(#setupPanel[open]) #setupHandle{visibility:hidden}@media(max-width:600px){#setupHandle{width:28px;min-height:60px;font-size:21px}.experiment,.results{padding-left:30px}}

.card-choices{display:flex;gap:8px;flex-wrap:wrap}.card-choices label{display:flex;align-items:center;gap:7px;border:1px solid #cddcde;border-radius:8px;padding:8px;margin:0;font-size:14px}.card-choices input{width:18px;height:18px;margin:0}.card-choices.ranks label{min-width:65px}fieldset{border:1px solid #cddcde;border-radius:10px;margin:18px 0;padding:14px}legend{font-weight:bold}#deckList{font-size:14px;line-height:1.8}#cardResult{width:220px;min-height:290px;margin:20px auto;border:2px solid #183647;border-radius:16px;padding:24px;background:white;box-shadow:6px 6px 0 #dce8ea;text-align:center;display:flex;flex-direction:column;justify-content:center;gap:16px;font-size:24px;font-weight:bold}#cardResult .card-symbol{font-size:76px}.cards-active #device{display:none}.changing-chances .graph-key .expected,.changing-chances #frequencyTable th:nth-child(6),.changing-chances #summary td:nth-child(6){display:none}
