/* Keep the course navigation compact without changing the Material theme. */
#quarto-header .navbar {
  min-height: 2.8rem;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

#quarto-header .navbar-brand {
  padding-top: 0;
  padding-bottom: 0;
}

/* Make Quarto's light/dark control self-explanatory. */
#quarto-header .quarto-color-scheme-toggle {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  min-height: 2rem;
  text-decoration: none;
}

#quarto-header .quarto-color-scheme-toggle::after {
  content: "Dark mode";
  font-size: 0.8rem;
  white-space: nowrap;
}

#quarto-header .quarto-color-scheme-toggle.alternate::after {
  content: "Light mode";
}

/* Central Limit Theorem interactive. */
.clt-explorer {
  margin: 1.5rem 0 2rem;
}

.clt-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  align-items: end;
  padding: 1.25rem;
  background: #f5f7f8;
  border: 1px solid #d9e1e5;
  border-radius: 0.35rem;
}

.clt-controls label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-weight: 600;
}

.clt-controls label > span {
  white-space: nowrap;
}

.clt-controls input,
.clt-controls select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #9daeb8;
  border-radius: 0.2rem;
  background: #fff;
}

.clt-controls select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%234c5961' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75'/%3E%3C/svg%3E");
  background-position: right 0.7rem center;
  background-repeat: no-repeat;
  background-size: 0.85rem;
}

.clt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.clt-buttons button {
  min-height: 2.35rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid #457eaa;
  border-radius: 999px;
  background: #fff;
  color: #355766;
  font-weight: 600;
  box-shadow: none;
}

.clt-buttons button:hover:not(:disabled) {
  background: #e7f0f5;
  color: #23495f;
}

.clt-buttons #clt-add {
  background: #457eaa;
  color: #fff;
}

.clt-buttons #clt-add:hover:not(:disabled) {
  background: #355f80;
  color: #fff;
}

.clt-buttons button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.clt-status {
  margin: 0.9rem 0;
  color: #4c5961;
}

.clt-plots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.clt-plot {
  margin: 0;
  padding: 1rem;
  border: 1px solid #d9e1e5;
  border-radius: 0.35rem;
}

.clt-plot figcaption {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.clt-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.55rem;
  color: #4c5961;
  font-size: 0.8rem;
  font-weight: 400;
}

.clt-legend-bar {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  background: #d77732;
}

.clt-legend-line {
  display: inline-block;
  width: 1rem;
  border-top: 2px solid #457eaa;
}

.clt-plot svg {
  display: block;
  width: 100%;
  height: 250px;
  overflow: visible;
}

.clt-axis {
  stroke: #6d7980;
  stroke-width: 1;
}

.clt-tick,
.clt-annotation,
.clt-empty-message {
  fill: #4c5961;
  font-family: inherit;
  font-size: 12px;
}

.clt-annotation {
  font-size: 11px;
}

.clt-current-bar {
  fill: #d77732;
  opacity: 0.8;
}

.clt-means-bar {
  fill: #457eaa;
}

.clt-mean-line {
  stroke: #355766;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}

.clt-current-mean-line {
  stroke: #b65420;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}

.clt-theory-curve {
  fill: none;
  stroke: #457eaa;
  stroke-width: 2.5;
}

.clt-theory-stem {
  stroke: #457eaa;
  stroke-width: 2;
}

.clt-theory-point {
  fill: #457eaa;
}

@media (max-width: 700px) {
  .clt-plots {
    grid-template-columns: 1fr;
  }
}

/* Confidence-interval coverage interactive. */
.ci-explorer {
  margin: 1.5rem 0 2rem;
}

.ci-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
  padding: 1.25rem;
  background: #f5f7f8;
  border: 1px solid #d9e1e5;
  border-radius: 0.35rem;
}

.ci-controls label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-weight: 600;
}

.ci-controls label > span {
  white-space: nowrap;
}

.ci-controls input,
.ci-controls select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #9daeb8;
  border-radius: 0.2rem;
  background: #fff;
}

.ci-controls select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%234c5961' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75'/%3E%3C/svg%3E");
  background-position: right 0.7rem center;
  background-repeat: no-repeat;
  background-size: 0.85rem;
}

.ci-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.ci-buttons button {
  min-height: 2.35rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid #457eaa;
  border-radius: 999px;
  background: #fff;
  color: #355766;
  font-weight: 600;
  box-shadow: none;
}

.ci-buttons button:hover:not(:disabled) {
  background: #e7f0f5;
  color: #23495f;
}

.ci-buttons #ci-add {
  background: #457eaa;
  color: #fff;
}

.ci-buttons #ci-add:hover:not(:disabled) {
  background: #355f80;
  color: #fff;
}

.ci-buttons button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ci-status {
  margin: 0.9rem 0;
  color: #4c5961;
}

.ci-plot {
  margin: 0;
  padding: 1rem;
  border: 1px solid #d9e1e5;
  border-radius: 0.35rem;
}

.ci-plot figcaption {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.ci-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.55rem;
  color: #4c5961;
  font-size: 0.8rem;
  font-weight: 400;
}

.ci-legend-covered,
.ci-legend-missed {
  display: inline-block;
  width: 1rem;
  border-top: 2px solid;
}

.ci-legend-covered {
  border-color: #457eaa;
}

.ci-legend-missed {
  border-color: #b65420;
}

.ci-plot svg {
  display: block;
  width: 100%;
  min-height: 250px;
  overflow: visible;
}

.ci-axis {
  stroke: #6d7980;
  stroke-width: 1;
}

.ci-population-line {
  stroke: #2b3439;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}

.ci-covered,
.ci-missed {
  stroke-width: 2;
  stroke-linecap: round;
}

.ci-covered {
  stroke: #457eaa;
}

.ci-missed {
  stroke: #b65420;
}

.ci-covered-point {
  fill: #457eaa;
}

.ci-missed-point {
  fill: #b65420;
}

.ci-tick,
.ci-annotation,
.ci-empty-message {
  fill: #4c5961;
  font-family: inherit;
  font-size: 12px;
}

.ci-annotation {
  font-size: 11px;
}

/* Quarto adds .quarto-dark to the body when the reader selects dark mode. */
.quarto-dark .clt-controls,
.quarto-dark .ci-controls {
  background: #2a3035;
  border-color: #56616a;
}

.quarto-dark .clt-controls input,
.quarto-dark .clt-controls select,
.quarto-dark .ci-controls input,
.quarto-dark .ci-controls select {
  background-color: #1f2529;
  border-color: #71808b;
  color: #f2f4f5;
}

.quarto-dark .clt-controls select,
.quarto-dark .ci-controls select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23d5dde1' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75'/%3E%3C/svg%3E");
}

.quarto-dark .clt-buttons button,
.quarto-dark .ci-buttons button {
  background: #2a3035;
  border-color: #79a9cc;
  color: #dcecf5;
}

.quarto-dark .clt-buttons button:hover:not(:disabled),
.quarto-dark .ci-buttons button:hover:not(:disabled) {
  background: #3a4b56;
  color: #fff;
}

.quarto-dark .clt-status,
.quarto-dark .clt-legend,
.quarto-dark .ci-status,
.quarto-dark .ci-legend {
  color: #c8d1d6;
}

.quarto-dark .clt-plot,
.quarto-dark .ci-plot {
  border-color: #56616a;
}

.quarto-dark .clt-axis,
.quarto-dark .ci-axis {
  stroke: #aebbc2;
}

.quarto-dark .clt-tick,
.quarto-dark .clt-annotation,
.quarto-dark .clt-empty-message,
.quarto-dark .ci-tick,
.quarto-dark .ci-annotation,
.quarto-dark .ci-empty-message {
  fill: #d5dde1;
}

.quarto-dark .ci-population-line {
  stroke: #e6ebed;
}
