.prob-intro{margin:0 0 18px;line-height:1.55}.prob-widget .decimal-inputs{align-items:end}.prob-widget .decimal-inputs label{flex-basis:155px}.prob-widget .extra-formula{font-size:clamp(16px,2.2vw,23px)}.prob-widget .decimal-answer strong{display:block}.prob-bar{display:flex;width:100%;height:38px;border-radius:6px;overflow:hidden;background:#dce6ef;border:1px solid var(--border);margin:20px 0}.prob-bar>span{display:block;height:100%;background:#336691}.prob-key{display:flex;flex-wrap:wrap;gap:14px 28px}.prob-key>div{display:flex;align-items:flex-start;gap:9px;min-width:0;overflow-wrap:anywhere}.prob-swatch{width:14px;height:14px;border-radius:3px;background:#336691;flex:none;margin-top:5px}.prob-swatch.other{background:#dce6ef;border:1px solid #c5d4e1}.prob-widget .extra-fraction{min-width:0}.prob-widget .extra-math-line{min-width:0}.prob-widget .extra-math-line>span{max-width:100%;overflow-wrap:anywhere}.prob-widget .decimal-answer p:empty{display:none}

/* General Bayes calculator: shared Vizbrick colours and responsive rows. */
.bayes-widget .decimal-form{max-width:1000px}.bayes-row{display:grid;grid-template-columns:60px minmax(0,1fr) minmax(0,1fr) auto 34px;align-items:end;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.bayes-row label{display:flex;flex-direction:column;gap:6px;min-width:0;font-weight:600}.bayes-row label>input:not([type=checkbox]){width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:11px 12px;font:inherit;color:var(--text);background:#fff}.bayes-hypothesis{font-weight:600;color:var(--primary-dark);align-self:center}.bayes-row .bayes-target-label{flex-direction:row;align-items:center;align-self:center;font-weight:400;white-space:nowrap}.bayes-target{accent-color:#336691}.bayes-remove,.bayes-secondary{border:1px solid var(--border);background:#fff;color:#254d70;border-radius:7px;cursor:pointer;font:inherit;padding:10px 14px}.bayes-remove{padding:5px;min-height:42px;font-size:22px}.bayes-remove:disabled,.bayes-secondary:disabled{opacity:.45;cursor:default}.bayes-remove:not(:disabled):hover,.bayes-secondary:not(:disabled):hover{background:#e6eff8}.bayes-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:20px}.bayes-widget .extra-math-line{align-items:center}.bayes-widget .extra-formula{gap:16px}.bayes-widget math{max-width:100%;font-size:inherit}.bayes-widget .bayes-sum{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.bayes-widget .bayes-row input[readonly]{background:#f4f7fb}.bayes-widget[data-example=true] .bayes-remove{visibility:hidden}.bayes-widget[data-example=true] .bayes-target{pointer-events:none}
@media(max-width:640px){.bayes-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 34px;gap:9px}.bayes-hypothesis{grid-column:1;grid-row:1}.bayes-row>label:nth-child(2){grid-column:1;grid-row:2}.bayes-row>label:nth-child(3){grid-column:2;grid-row:2}.bayes-row .bayes-target-label{grid-column:2;grid-row:1;justify-self:end}.bayes-remove{grid-column:3;grid-row:2}.bayes-widget .extra-formula{padding:12px;font-size:16px}}
.bayes-widget .decimal-answer{max-width:1000px}

/* Classical probability: exact answer and a continuous notebook equation. */
.prob-widget[data-tool="event"] .prob-exact-answer{display:flex;align-items:center;gap:12px;font-size:var(--font-answer,30px);font-weight:600;line-height:1.3;flex-wrap:wrap;margin-top:8px}
.prob-widget[data-tool="event"] .prob-notebook.extra-formula{display:block;min-height:0;padding:24px;overflow-x:auto;overflow-y:hidden}
.prob-widget[data-tool="event"] .prob-notebook .extra-math-line{display:flex;flex-wrap:nowrap;width:max-content;max-width:none;min-height:100px;gap:12px;padding:0;white-space:nowrap;align-items:center}
.prob-widget[data-tool="event"] .prob-notebook .extra-fraction{flex:none;max-width:none;min-width:30px}
.prob-widget[data-tool="event"] .prob-notebook .extra-fraction>span{white-space:nowrap;overflow-wrap:normal}
@media(max-width:640px){.prob-widget[data-tool="event"] .prob-notebook.extra-formula{padding:12px}.prob-widget[data-tool="event"] .prob-notebook .extra-math-line{gap:8px;min-height:80px}}

/* Bayes: multiple selections, exact answers and aligned 28px graph paper. */
.bayes-widget .bayes-row label>input:not([type=checkbox]){height:48px}
.bayes-widget .bayes-row label>input[type=checkbox]{width:17px;height:17px;flex:none;margin:0;accent-color:#336691}
.bayes-widget .bayes-hypothesis{font-size:23px;align-self:end;display:flex;align-items:center;min-height:48px}
.bayes-widget .bayes-row .bayes-target-label{align-self:end;justify-self:center;justify-content:center;min-height:48px;gap:8px}
.bayes-widget .bayes-answers{display:flex;flex-direction:column;gap:14px;font-size:var(--font-answer,30px);font-weight:600;line-height:1.3}
.bayes-widget .bayes-answers .extra-math-line{align-items:center;gap:10px}
.bayes-widget .bayes-notebook.extra-formula{background-color:#fff;background-image:linear-gradient(#e1eaf2 1px,transparent 1px),linear-gradient(90deg,#e1eaf2 1px,transparent 1px);background-size:28px 28px;padding:0 28px 28px;display:block;min-width:0;min-height:0;overflow-x:auto;overflow-y:hidden;font-size:22px;line-height:28px;color:#263445}
.bayes-widget .bayes-notebook .extra-math-line{box-sizing:border-box;height:56px;min-height:56px;max-width:none;min-width:100%;width:max-content;padding:28px 0 0;gap:8px;align-items:center;flex-wrap:nowrap;white-space:nowrap;line-height:28px}
.bayes-widget .bayes-notebook .extra-math-line:has(.extra-fraction),.bayes-widget .bayes-notebook .extra-math-line:has(math){height:84px;min-height:84px}
.bayes-widget .bayes-notebook .extra-math-line>span{flex:none;max-width:none;overflow-wrap:normal}
.bayes-widget .bayes-notebook .extra-fraction{line-height:28px;max-width:none;min-width:36px}
.bayes-widget .bayes-notebook .extra-fraction>span{box-sizing:border-box;height:28px;line-height:26px;padding:0 6px;white-space:nowrap;overflow-wrap:normal}
.bayes-widget .bayes-notebook .bayes-sum{flex-wrap:nowrap;white-space:nowrap}
.bayes-widget .bayes-notebook .bayes-general{font-weight:600;color:#254d70}
@media(max-width:640px){.bayes-widget .bayes-notebook.extra-formula{font-size:19px;padding-right:14px;padding-left:14px}.bayes-widget .bayes-notebook .extra-math-line{gap:6px}.bayes-widget .bayes-row .bayes-target-label{justify-self:end;min-height:32px;align-self:center}.bayes-widget .bayes-hypothesis{min-height:32px;align-self:center}}
