.variable-tabs{display:flex;gap:10px;margin-bottom:24px}.variable-tabs [aria-pressed=true]{background:#176958;color:white;border-color:#176958}.table-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:20px}.counter{display:flex;align-items:center;gap:12px;font-size:12px;color:#62766c}.counter>div{display:flex;align-items:center;border:1px solid #c9d6ce;border-radius:8px;overflow:hidden;background:white}.counter button{border:0;border-radius:0;font-size:19px;padding:6px 13px;background:#edf5ef}.counter button:disabled{opacity:.4;cursor:default}.counter output{min-width:38px;text-align:center;font-size:15px;font-weight:600}input[type=color]{height:42px;padding:5px;cursor:pointer}.percent-field{position:relative;display:block}.percent-field input{padding-right:38px}.percent-field>span{position:absolute;right:13px;top:11px;font-size:15px;color:#5c766b}.notation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin-top:22px}.notation-grid>div{display:flex;gap:12px;align-items:center}.notation-grid>div>span{font-size:12px;color:#637976}.normal-layout{display:grid;grid-template-columns:280px 1fr;gap:30px;align-items:center}#normalcurve svg{display:block;width:100%;height:auto}#category-table input[type=text]{min-width:150px}#category-table input[type=number]{max-width:120px}.katex{font-size:1.1em}.stem-input{margin-top:20px}.stem-input .graph{border:0;padding:0;margin-top:20px}#class-table table{min-width:850px}.graphs .card{overflow:hidden}.notation{background:#f0f5f9;border-color:#d2deea}.normal-layout .metrics{grid-template-columns:1fr 1fr}.stem-input select{height:42px}#class-table th:nth-child(6){background:#edf2f8}#class-table td:nth-child(6){color:#3f5f83}@media(max-width:800px){.normal-layout{grid-template-columns:1fr}.variable-tabs{flex-wrap:wrap}.counter{width:100%;justify-content:space-between}}
#normalresult.metrics{grid-template-columns:1fr}#normalresult .metric strong{white-space:nowrap;font-size:22px}

.single-chart{grid-template-columns:1fr}.ch2-layout [hidden]{display:none!important}
#class-table th,#class-table td,#category-table th,#category-table td{text-align:center;vertical-align:middle}
#class-table input,#category-table input{text-align:center;margin-left:auto;margin-right:auto}
#category-table th:nth-child(1){width:44%}#category-table th:nth-child(2){width:20%}#category-table th:nth-child(3){width:18%}#category-table input[type=color]{width:54px}
#class-table th:nth-child(6){background:#f5f8f6}#class-table td:nth-child(6){color:inherit}#class-table th:last-child{background:#edf2f8}#class-table td:last-child{color:#3f5f83}
.ch2-layout svg text{font-style:normal}

.quartile-formula{display:inline-block;padding:12px 6px;font-size:24px}.quartile-formula .katex{font-size:1em}


.title-sentence{font-size:clamp(24px,2.5vw,34px);max-width:850px;line-height:1.3}.ci-equation{font-size:22px;padding:18px 12px;background:#f3f7f4;border-radius:8px;margin:16px 0 24px;text-align:center}.ci-equation .katex{font-size:1em}.sample-p{display:block;font-size:18px;margin-top:14px}

#workspace:has(#normalcurve) .ci-equation{display:flex;justify-content:center;align-items:center;text-align:center;min-height:110px;font-size:28px;padding:22px 12px}
#workspace:has(#normalcurve) h3{font-size:20px;line-height:1.4}
#workspace:has(#normalcurve) label{font-size:16px;line-height:1.5}
#workspace:has(#normalcurve) input{font-size:16px}
#workspace:has(#normalcurve) .card-sub,#workspace:has(#normalcurve) .hint{font-size:16px;line-height:1.6}
#workspace:has(#normalcurve) .metric small{font-size:14px;line-height:1.5}
#workspace:has(#normalcurve) .metric strong{font-size:24px}
#workspace:has(#normalcurve) .metrics{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}

/* Shared readable type and darker text across all chapters. */
#workspace h3{font-size:20px;line-height:1.4;color:#213c40}
#workspace h4{font-size:17px;color:#213c40}
#workspace label{font-size:16px;line-height:1.5;color:#304b43}
#workspace input,#workspace select,#workspace textarea{font-size:16px;color:#254637}
#workspace .card-sub,#workspace .hint,#workspace p,#workspace details{font-size:16px;line-height:1.6;color:#304b43}
#workspace .metric small{font-size:14px;line-height:1.5;color:#304b43}
#workspace .metric strong{font-size:24px;color:#176958}
#workspace .metrics{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
#workspace table{font-size:15px;color:#213c40}
#workspace th{color:#304b43}
#workspace .counter{font-size:15px;color:#304b43}
#workspace .formula{font-size:16px;line-height:1.7;color:#304b43}
#workspace .tools button{font-size:14px}
#workspace pre{font-size:15px;color:#213c40}
#workspace .error{font-size:16px}
p,.muted,.intro-note,footer{color:#3b514a}
footer{font-size:13px;line-height:1.6}
#normalresult .metrics{grid-template-columns:1fr}
#workspace .graph svg g[fill="#728078"]{fill:#304b43}

.test-equation{font-size:26px;text-align:center;display:flex;justify-content:center;align-items:center;min-height:105px;margin:16px 0 24px;padding:20px;background:#f3f7f4;border-radius:8px;overflow-x:auto}
.test-equation .katex{font-size:1em}.hypothesis-inputs{display:grid;gap:16px;margin-bottom:24px}.hypothesis-row{display:grid;grid-template-columns:80px 1fr 1fr;align-items:end;gap:12px}.hypothesis-row>span{font-size:22px;padding-bottom:12px}.hypotheses-display{font-size:22px;line-height:1.8;margin:12px 0 20px}.decision-rule{margin:18px 0;color:#213c40}.decision-rule p{line-height:1.7}.tests-columns .graph{padding:0;border:0;margin-top:24px}.bottom-note{margin-top:24px!important;margin-bottom:0!important}#result h3 .katex{font-size:20px;margin-left:12px;display:inline-block;padding:10px 0}
@media(max-width:550px){.hypothesis-row{grid-template-columns:1fr 1fr}.hypothesis-row>span{grid-column:1/-1;padding:0}.test-equation{font-size:22px}}

#observed table{min-width:max-content}#observed input[type="number"]{min-width:90px;width:100px}#observed input[type="text"]{min-width:150px;width:180px}#result>.graph{max-width:100%}#predictX{max-width:320px}.hypothesis-row label .katex{font-size:1.05em}

.chapter11 table th,.chapter11 table td,.chapter11 table input{text-align:center!important;vertical-align:middle}.chapter11 table input{margin-inline:auto}

#workspace table th,#workspace table td{vertical-align:middle!important;text-align:center!important}#workspace table input{text-align:center!important;margin-inline:auto}#workspace table th{color:#304b43!important;background:#f5f8f6!important}#workspace table td{color:#213c40!important}.quartile-formula{font-size:20px;padding:8px 6px}#workspace table .katex{color:inherit}.tail-detail{margin-top:12px}.regression-equation{pointer-events:none}

.test-conclusion p{font-weight:400;margin-bottom:0}

#workspace h3 .katex,#result h3 .katex{font-size:1em;margin:0;padding:0;display:inline-block}
.test-workflow{min-width:0}.test-workflow>h3{margin-top:0;margin-bottom:18px}.tests-columns .graph{padding:24px;border:1px solid #dce5e0;margin-top:0}.tests-columns .graph h3{margin:0}.worked-statistic{font-size:24px;line-height:1.7;padding:24px 12px;margin-bottom:0}.sample-proportion{text-align:center;font-size:20px}.hypotheses-inline{display:flex;align-items:center;gap:32px;flex-wrap:wrap;margin:0}.test-workflow .decision{margin-bottom:0}

#workspace .compact-rejection{max-width:640px;margin-inline:auto;padding:20px}.horizontal-statistic{font-size:20px;min-height:124px;white-space:nowrap}.horizontal-statistic .katex{white-space:nowrap}.sample-proportion{min-height:32px;margin:8px 0 12px}.assumption-check{border-radius:8px;padding:16px;margin:16px 0;overflow-x:auto}.assumption-met{background:#edf5ef;color:#176958}.assumption-failed{background:#fff3f1;color:#8e302d;border:1px solid #e9bcb6}.assumption-check p{color:inherit;margin-bottom:0}.test-workflow .assumption-check{margin-bottom:0}.assumption-check .katex{font-size:1em}

#workspace .layout>aside .card,#workspace .layout>.card:first-child{background:#eef3fc;border-color:#c7d4ef}
#workspace .layout>aside .card input,#workspace .layout>.card:first-child input{background:#f9fbff;border-color:#c9d6ed}
.chapter11{align-items:start}.chapter11>.card{align-self:start}
#workspace .compact-rejection{max-width:100%;width:100%;margin-inline:0}#workspace .compact-rejection>svg{max-height:440px}
.test-warning{padding:16px;border:1px solid #e2c891;background:#fff8e9;color:#654a16;border-radius:8px}
.tests-columns .assumption-check{min-height:0}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.chi-hypotheses{display:grid;grid-template-columns:1fr 1fr;gap:16px 28px;align-items:center}#workspace .chi-hypotheses p{font-size:18px;line-height:1.65;margin:0;color:#213c40}.chi-hypotheses .katex{font-size:1.1em}@media(max-width:650px){.chi-hypotheses{grid-template-columns:1fr}}

#workspace .hypotheses-display.hypotheses-inline{font-size:18px}#workspace .hypotheses-display.hypotheses-inline .katex{font-size:1em}

/* Chapter actions stay separate from the working area, including on phones. */
.chapter-heading{gap:24px}.chapter-heading>div:first-child{min-width:0}.chapter-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;flex-shrink:0;max-width:360px}.chapter-actions button{min-height:44px}.chapter-actions #example{background:#eaf2fa;border-color:#b8cfe4;color:#244f74}.reset-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:white;color:#34546b;border-color:#bacbd7}.reset-button:hover{background:#edf4fa;border-color:#668ba9}.chapter-actions #download-tables{order:3;width:100%}.reset-status{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-8px 0 24px;padding:12px 16px;border:1px solid #bbd4e9;border-radius:8px;background:#edf5fc;color:#244f74}.reset-status[hidden]{display:none}.reset-status button{min-height:40px;font-weight:600;background:white}.fields>*{min-width:0}button:focus-visible,.table-wrap:focus-visible{outline:3px solid #3278b7;outline-offset:3px}.table-wrap{max-width:100%}
@media(max-width:700px){.chapter-heading{flex-direction:column;align-items:stretch}.chapter-actions{justify-content:flex-start;max-width:none}.chapter-actions #download-tables{width:auto}.test-equation{justify-content:flex-start}.test-equation>.katex{margin-inline:auto}.formula{overflow-x:auto}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}input,select,textarea{min-width:0;max-width:100%}.variable-tabs button{white-space:normal}}
@media(max-width:550px){.chapter-actions{display:grid;grid-template-columns:1fr 1fr}.chapter-actions #download-tables{grid-column:1/-1}.chapter-actions button{padding:10px;font-size:14px}.chapter-heading h2{font-size:28px}.reset-status{align-items:flex-start}.graph{overflow-x:auto}.graph>svg{min-width:540px}.normal-graph{overflow-x:auto}.normal-graph>svg{min-width:480px}.hypotheses-inline{gap:16px}.test-equation{font-size:18px;padding:16px;min-height:0}.horizontal-stat{min-height:0}#workspace .card{min-width:0}.card pre{white-space:pre-wrap;overflow-wrap:anywhere}}
@media print{.chapter-actions,.reset-status{display:none!important}}

.layout>*{min-width:0}.normal-layout>*{min-width:0}
@media(max-width:950px){.layout,.ch2-layout{grid-template-columns:minmax(0,1fr)}.ch2-layout aside{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.ch2-layout aside{grid-template-columns:minmax(0,1fr)}}
@media(max-width:550px){.variable-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.variable-tabs button{white-space:normal;padding:10px;min-height:44px}#normalcurve{overflow-x:auto}#normalcurve>svg{min-width:480px}.ci-equation{overflow-x:auto}#workspace:has(#normalcurve) .ci-equation{justify-content:flex-start;font-size:23px}.ci-equation>.katex{margin-inline:auto}}

.description-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.description-tabs [aria-selected=true]{background:#176958;color:white;border-color:#176958}.description-tabs button{min-height:44px}.chart-scroll{overflow-x:auto;max-width:100%}.mobile-scroll-hint{display:none}.chart-scroll:focus-visible{outline:3px solid #3278b7;outline-offset:2px}
@media(max-width:550px){.graph .chart-scroll>svg{min-width:540px}#workspace .mobile-scroll-hint{display:block;font-size:13px;color:#34546b;margin:8px 0 0}.graph{overflow:visible}.description-tabs{gap:6px}.description-tabs button{padding:10px 12px;font-size:14px}}
@media print{.mobile-scroll-hint,.description-tabs{display:none}.chart-scroll{overflow:visible}.chart-scroll>svg{min-width:0!important}}

#grouped-entry input{width:100%;min-width:90px;max-width:180px}#grouped-entry th{white-space:normal}#grouped-entry table{min-width:340px}

/* Readable assumption checks across confidence intervals and tests. */
#workspace .assumption-check{font-size:16px;line-height:1.6}
#workspace .assumption-check strong{font-size:17px}
#workspace .assumption-check p{font-size:16px;line-height:1.6}

/* Consistent, readable supporting text and result labels. */
#workspace .metric small,#workspace:has(#normalcurve) .metric small{font-size:16px;line-height:1.5}
#workspace .notation-grid>div>span,#workspace .tools button,#workspace .mobile-scroll-hint{font-size:16px}
.eyebrow,.intro-note,footer{font-size:14px}
#workspace .variation-quartiles{grid-template-columns:repeat(3,minmax(0,1fr))}
#workspace .variation-other{grid-template-columns:repeat(4,minmax(0,1fr))}
#workspace .grouped-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){#workspace .variation-other{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:450px){#workspace .variation-quartiles,#workspace .variation-other,#workspace .grouped-summary{grid-template-columns:minmax(0,1fr)}}
