/* Deck-specific styles for population versus sample regression. */

.reveal .psr-question {
  text-align: center;
}

.reveal .psr-mcq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(1120px, 92%);
  margin: 1.2rem auto 0;
}

.reveal .psr-mcq button {
  padding: 0.65rem 0.9rem;
  border: 2px solid #8ca3bd;
  border-radius: 10px;
  background: #f6f9fc;
  color: #17324d;
  font: inherit;
  font-size: 0.72em;
  text-align: left;
  cursor: pointer;
}

.reveal .psr-mcq button:hover,
.reveal .psr-mcq button:focus-visible {
  border-color: #1769aa;
  background: #e9f3fb;
}

.reveal .psr-mcq button.is-correct {
  border-color: #238636;
  background: #e8f6eb;
}

.reveal .psr-mcq button.is-wrong {
  border-color: #b42318;
  background: #fcebea;
}

.reveal .psr-mcq-feedback {
  grid-column: 1 / -1;
  min-height: 1.6em;
  margin: 0.25rem 0 0;
  color: #40566e;
  font-size: 0.72em;
  text-align: center;
}

.reveal .psr-mcq-feedback.is-correct {
  color: #176b2c;
  font-weight: 700;
}

.reveal .psr-mcq-feedback.is-wrong {
  color: #9b2c23;
  font-weight: 700;
}

.reveal .psr-mcq--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.5rem;
}

.reveal .psr-takeaway,
.reveal .psr-warning {
  width: min(1180px, 92%);
  margin: 1rem auto 0;
  padding: 0.6rem 0.9rem;
  border-left: 6px solid #1769aa;
  border-radius: 6px;
  background: #eef6fc;
  color: #17324d;
  text-align: center;
}

.reveal .psr-warning {
  border-left-color: #d97706;
  background: #fff5df;
}

.reveal .psr-plot-slide > h2 {
  margin-bottom: 0.2rem;
}

.reveal .psr-plot-slide > .cell {
  width: min(1120px, 82%);
  margin: 0.2rem auto 0;
}

.reveal .psr-plot-slide .cell-output-display {
  margin: 0;
  overflow: visible;
}

.reveal .psr-widget {
  width: 100%;
  margin: 0 auto;
}

.reveal .psr-widget .html-widget,
.reveal .psr-widget .js-plotly-plot,
.reveal .psr-widget .plot-container {
  width: 100% !important;
}

.reveal .psr-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  margin: 0.1rem auto 0.2rem;
}

.reveal .psr-button {
  padding: 0.34rem 0.7rem;
  border: 1px solid #7f96ad;
  border-radius: 7px;
  background: #f7fafc;
  color: #17324d;
  font: inherit;
  font-size: 0.55em;
  cursor: pointer;
}

.reveal .psr-button:hover,
.reveal .psr-button:focus-visible,
.reveal .psr-button.is-active {
  border-color: #1769aa;
  background: #e5f1fa;
}

.reveal .psr-button.is-primary {
  border-color: #1769aa;
  background: #1769aa;
  color: white;
}

.reveal .psr-check,
.reveal .psr-select-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.55em;
  color: #294760;
}

.reveal .psr-check input {
  width: 20px;
  height: 20px;
}

.reveal .psr-select-label select {
  padding: 0.25rem 0.4rem;
  border: 1px solid #7f96ad;
  border-radius: 6px;
  background: white;
  font: inherit;
}

.reveal .psr-live-text,
.reveal .psr-stats,
.reveal .psr-residual-readout {
  min-height: 1.25em;
  margin: 0.1rem auto 0;
  color: #294760;
  font-size: 0.58em;
  font-weight: 600;
  text-align: center;
}

.reveal .psr-sampling-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  width: min(1250px, 94%);
  margin: 1.4rem auto;
  padding: 1rem 1.2rem;
  border: 1px solid #b9c9d8;
  border-radius: 14px;
  background: #f5f9fc;
  text-align: left;
}

.reveal .psr-rule-number {
  color: #1769aa;
  font-size: 2.2em;
  font-weight: 800;
  line-height: 1;
}

.reveal .psr-rule-arrow {
  color: #d97706;
  font-size: 2em;
  font-weight: 800;
}

.reveal .psr-three-terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  width: min(1120px, 82%);
  margin: 0.45rem auto 0;
  font-size: 0.68em;
}

.reveal .psr-three-terms > div {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.08rem;
  align-content: center;
  min-height: 96px;
  padding: 0.32rem 0.55rem;
  border-top: 4px solid #1769aa;
  border-radius: 8px;
  background: #f2f7fb;
  text-align: center;
}

.reveal .psr-three-terms strong {
  font-size: 0.92em;
}

.reveal .psr-three-terms .psr-term-symbol {
  font-size: 0.92em;
  line-height: 1.05;
}

.reveal .psr-three-terms .psr-term-symbol--estimate {
  font-size: 0.74em;
}

.reveal .psr-three-terms small {
  color: #526a80;
  font-size: 0.66em;
  line-height: 1.2;
}

.reveal .psr-model-map {
  display: grid;
  grid-template-columns: 150px repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(1120px, 82%);
  margin: 0.65rem auto;
  font-size: 0.82em;
}

.reveal .psr-map-head,
.reveal .psr-map-side {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #294760;
  font-weight: 700;
}

.reveal .psr-map-head {
  padding: 0.35rem;
  border-bottom: 3px solid #8ca3bd;
}

.reveal .psr-map-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.18rem;
  align-content: center;
  min-height: 126px;
  padding: 0.48rem 0.6rem;
  border: 1px solid #aebfd0;
  border-radius: 10px;
  background: #f5f9fc;
  text-align: center;
}

.reveal .psr-map-card strong {
  color: #1769aa;
  font-size: 0.92em;
}

.reveal .psr-map-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: 0.72em;
  line-height: 1.15;
  white-space: nowrap;
}

.reveal .psr-map-formula .MathJax {
  margin: 0 !important;
  white-space: nowrap;
}

.reveal .psr-exit {
  width: min(1180px, 92%);
  margin: 1.3rem auto;
  padding: 1.2rem;
  border: 3px solid #1769aa;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4f9fd, #e5f1fa);
  color: #17324d;
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.reveal .psr-exit + div,
.reveal .psr-exit ~ ol {
  width: min(1120px, 90%);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .reveal .psr-mcq,
  .reveal .psr-mcq--compact {
    grid-template-columns: 1fr;
  }

  .reveal .psr-sampling-rule {
    grid-template-columns: auto 1fr;
  }

  .reveal .psr-rule-arrow {
    display: none;
  }
}
