/* Chapter-scoped, local styles. Controls progressively enhance a static figure. */
.w07-count-table { width:100%; border-collapse:collapse; font-size:.94em; }
.w07-count-table th, .w07-count-table td { border:1px solid #cbd3de; padding:.65em .5em; text-align:center; vertical-align:middle; }
.w07-count-table th { font-weight:600; }
.w07-count-table strong, .w07-count-table .w07-count-symbol { display:block; }
.w07-count-table strong { font-size:1.25em; }
.w07-count-table .w07-no-signal { background:#edf2ff; color:#2457d6; }
.w07-count-table .w07-signal { background:#fff0e7; color:#8a3c17; }
.w07-count-table .w07-total { background:#edf6f2; color:#176c59; }
.w07-count-table .w07-target { outline:2px solid #8a3c17; outline-offset:-4px; }
.w07-marginals { display:flex; gap:.5rem 2rem; flex-wrap:wrap; margin:.7rem 0 1rem; }
.w07-marginals p { flex:1 1 15rem; margin:0; }
.w07-bernoulli { border:1px solid #cbd3de; border-radius:.6rem; padding:1rem; color:#243247; background:#fff; margin:1rem 0; }
.w07-bernoulli [hidden] { display:none !important; }
.w07-model-flow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.w07-model-flow > div, .w07-score > div { padding:.7rem; border:1px solid #d4dce6; border-radius:.3rem; background:#f5f7fb; }
.w07-model-flow > div:last-child { grid-column:1 / -1; background:#edf6f2; border-color:#a6c7ba; }
.w07-model-flow span, .w07-score span { display:block; font-size:.82em; margin-bottom:.25rem; }
.w07-model-flow strong, .w07-score strong { font-weight:600; overflow-wrap:anywhere; }
.w07-flow-note, .w07-motion-note { font-size:.85em; line-height:1.5; margin:.7rem 0; }
.w07-controls { display:flex; flex-wrap:wrap; gap:.8rem 1.5rem; margin-top:1rem; }
.w07-controls label:first-child { flex:2 1 15rem; }
.w07-controls label:last-child { flex:1 1 10rem; }
.w07-controls label { font-size:.9em; font-weight:600; }
.w07-controls input { display:block; width:100%; margin-top:.8rem; accent-color:#2457d6; }
.w07-controls select { display:block; margin-top:.3rem; padding:.3rem .8rem; color:#243247; background:#fff; border:1px solid #8794a7; border-radius:.25rem; }
.w07-controls output { float:right; font-variant-numeric:tabular-nums; }
.w07-presets { display:flex; flex-wrap:wrap; gap:.4rem; margin:.9rem 0 .3rem; }
.w07-presets button { background:#f5f7fb; color:#243247; border:1px solid #8794a7; border-radius:.3rem; padding:.35rem .65rem; font-size:.85em; min-height:2.2rem; }
.w07-presets button:hover { background:#edf2ff; }
.w07-presets button[aria-pressed="true"] { background:#edf6f2; border-color:#176c59; }
.w07-bernoulli :focus-visible { outline:3px solid #2457d6; outline-offset:3px; }
.w07-live svg { width:100%; height:auto; display:block; font:17px system-ui,sans-serif; }
.w07-live svg text { fill:#243247; }
.w07-score { display:grid; grid-template-columns:1fr; gap:.5rem; font-variant-numeric:tabular-nums; }
.w07-score > div:last-child { border-color:#a6c7ba; background:#edf6f2; }
.w07-static img { max-width:100%; height:auto; }
.w07-bernoulli.w07-enhanced .w07-static { display:none; }
@media (max-width:600px) {
  .w07-count-table { font-size:.87em; }
  .w07-count-table th, .w07-count-table td { padding:.55em .3em; }
  .w07-bernoulli { padding:.65rem; }
  .w07-model-flow { grid-template-columns:1fr; }
}
@media print {
  .w07-bernoulli .w07-live { display:none !important; }
  .w07-bernoulli .w07-static { display:block !important; }
  .w07-bernoulli { border:0; padding:0; }
  .w07-model-flow { break-inside:avoid; }
}

/* Batch 3: two linked panels, stacked when each would become too narrow. */
.w07-gaussian { border:1px solid #cbd3de; border-radius:.6rem; padding:1rem; color:#243247; background:#fff; margin:1rem 0; }
.w07-gaussian [hidden] { display:none !important; }
.w07-gaussian :focus-visible { outline:3px solid #2457d6; outline-offset:3px; }
.w07-gaussian.w07-enhanced .w07-static { display:none; }
.w07-gaussian-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem; }
.w07-gaussian-panels svg { width:100%; height:auto; font:22px system-ui,sans-serif; }
.w07-gaussian-panels [data-scatter-ticks], .w07-gaussian-panels [data-density-ticks] { font-size:18px; }
.w07-gaussian-key { font-size:.85em; line-height:1.5; margin:.3rem 0 1rem; }
.w07-gaussian .w07-score { grid-template-columns:repeat(2,minmax(0,1fr)); font-size:.9em; }
.w07-gaussian .w07-score > div:first-child, .w07-gaussian .w07-score > div:last-child { grid-column:1 / -1; }
.w07-gaussian .w07-controls label { flex:1 1 16rem; }
.w07-gaussian .w07-controls select { max-width:100%; }
.w07-gaussian .w07-controls output { float:none; display:block; }
@media (max-width:700px) {
  .w07-gaussian-panels, .w07-gaussian .w07-score { grid-template-columns:1fr; }
  .w07-gaussian { padding:.65rem; }
}
@media print {
  .w07-gaussian .w07-live { display:none !important; }
  .w07-gaussian .w07-static { display:block !important; }
  .w07-gaussian { border:0; padding:0; }
}


/* One shared grammar for classification and regression observation models. */
.w07-categorical { border:1px solid #cbd3de; border-radius:.6rem; padding:1rem; background:#fff; color:#243247; }
.w07-categorical img { display:block; width:100%; height:auto; }
.w07-common-flow {
  grid-template-columns:.45fr .65fr 1fr 1.1fr 1.4fr 1.6fr;
  align-items:stretch;
  gap:.7rem;
  font-size:.78em;
}
.w07-common-flow > div { padding:.6rem .35rem; min-width:0; position:relative; }
.w07-common-flow > div:nth-child(-n+3)::after { content:"→"; position:absolute; right:-.7rem; width:.7rem; top:50%; text-align:center; color:#576274; }
.w07-common-flow > div:last-child { grid-column:auto; background:#edf6f2; border-color:#a6c7ba; }
.w07-common-flow > .w07-target-card { background:#e5e7eb; border-color:#adb5bd; }
.w07-common-flow > div > span { font-size:.86em; min-height:2.5em; }
.w07-common-flow strong { display:block; font-weight:600; }
.w07-common-flow .math { display:block; margin:.25rem 0; }
.w07-common-flow .w07-optional { display:block; color:#666; font-weight:400; margin-top:.5rem; }
@media (max-width:700px) {
  .w07-common-flow { grid-template-columns:.45fr .65fr .9fr 1fr 1fr; }
  .w07-common-flow > div:last-child { grid-column:1 / -1; }
}
@media (max-width:480px) {
  .w07-common-flow { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .w07-common-flow > div::after { display:none; }
}
