/* Week 10: scoped additions to the shared textbook layout.
   Follow Week 07's readable tables; add mathematical controls only with their figures. */
.w10-evidence { margin: 1rem 0; overflow-x: auto; }
.w10-evidence th { background: #edf2ff; color: #243247; }
.w10-evidence th, .w10-evidence td { padding: .65em; vertical-align: top; }
.w10-evidence td:first-child { color: #2457d6; }
@media print {
  .w10-evidence { overflow: visible; }
}
.w10-pca { border: 1px solid #cbd3de; border-radius: .5rem; padding: 1rem; margin: 1rem 0; }
.w10-pca [hidden] { display: none !important; }
.w10-pca svg, .w10-pca img { display: block; width: 50%; height: auto; margin-inline: auto; }
.w10-pca svg text { font: 17px sans-serif; fill: #243247; }
.w10-pca input { display: block; width: 100%; margin: .8rem 0; }
.w10-pca-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.w10-pca button { color: #243247; background: #edf2ff; border: 1px solid #8794a7; border-radius: .25rem; padding: .4rem .6rem; }
.w10-pca :focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }
.w10-pca-enhanced .w10-pca-static { display: none; }
@media print {
  .w10-pca .w10-pca-live { display: none !important; }
  .w10-pca .w10-pca-static { display: block; }
}
/* Read the numerical recipe left-to-right, then down; stack on narrow screens. */
.w10-pca-recipe { text-align: left; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.w10-pca-recipe > div { border: 1px solid #cbd3de; border-radius: .4rem; padding: .8rem; background: #f5f7fb; min-width: 0; }
.w10-pca-recipe > div > p:first-child { color: #2457d6; }
@media (max-width: 650px) { .w10-pca-recipe { grid-template-columns: 1fr; } }
@media print { .w10-pca-recipe > div { break-inside: avoid; } }
/* Keep explanatory paragraphs readable inside Quarto's captioned figure. */
#fig-week10-pca-worked-example .w10-pca-recipe,
#fig-week10-pca-worked-example .w10-pca-recipe > div { text-align: left; }
/* New t-SNE figures: independent of the accepted PCA controls. */
.w10-tsne-affinity { border: 1px solid #cbd3de; border-radius: .5rem; padding: 1rem; text-align: left; }
.w10-tsne-affinity [hidden] { display: none !important; }
.w10-tsne-affinity svg, .w10-tsne-affinity img { display: block; width: 100%; height: auto; }
.w10-tsne-affinity svg text { font: 16px sans-serif; fill: #243247; }
.w10-tsne-affinity input { display: block; width: 100%; margin: .8rem 0; }
.w10-tsne-affinity select { display: block; padding: .35rem; margin: .5rem 0; }
.w10-tsne-affinity :focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }
.w10-tsne-enhanced .w10-tsne-static { display: none; }
@media print {
  .w10-tsne-affinity .w10-tsne-live { display: none !important; }
  .w10-tsne-affinity .w10-tsne-static { display: block; }
}
/* Exact recorded clustering steps; no animation or external runtime. */
.w10-cluster-control { border: 1px solid #cbd3de; border-radius: .5rem; padding: 1rem; text-align: left; }
.w10-cluster-control [hidden] { display: none !important; }
.w10-cluster-control svg, .w10-cluster-control img { display: block; width: 100%; height: auto; }
.w10-cluster-control svg text { font: 16px sans-serif; fill: #243247; }
.w10-cluster-control input { display: block; width: 100%; margin: .8rem 0; }
.w10-cluster-control button { padding: .4rem .7rem; margin: .2rem; }
.w10-cluster-control :focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }
.w10-cluster-enhanced .w10-cluster-static { display: none; }
@media print {
  .w10-cluster-control .w10-cluster-live { display: none !important; }
  .w10-cluster-control .w10-cluster-static { display: block; }
}
/* Scalar VAE inference control; accepted earlier method styles are unchanged. */
.w10-vae-bayes { border: 1px solid #cbd3de; border-radius: .5rem; padding: 1rem; text-align: left; }
.w10-vae-bayes [hidden] { display: none !important; }
.w10-vae-bayes svg, .w10-vae-bayes img { display: block; width: 100%; height: auto; }
.w10-vae-bayes svg text { font: 16px sans-serif; }
.w10-vae-bayes input { display: block; width: 100%; margin: .8rem 0; }
.w10-vae-bayes select { display: block; max-width: 100%; padding: .35rem; margin: .5rem 0; }
.w10-vae-bayes :focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }
.w10-vae-enhanced .w10-vae-static { display: none; }
@media print {
  .w10-vae-bayes .w10-vae-live { display: none !important; }
  .w10-vae-bayes .w10-vae-static { display: block; }
}

/* Keep the VAE main reading short; optional details work without JavaScript. */
.w10-vae-optional { margin: .8rem 0; padding: .7rem 1rem; border: 1px solid #cbd3de; border-radius: .4rem; }
.w10-vae-optional > summary { cursor: pointer; font-weight: 600; color: #243247; }
.w10-vae-optional > summary:focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }
