/* R Basics & The Weighted Dice — course tutorial styles */

body { font-size: 1.02rem; }

/* Give the live code editors a bit more presence */
.exercise-cell, .cell-live {
  margin-block: 1.4rem;
}

/* "Your turn" callouts */
.turn {
  border-left: 4px solid #b03a2e;
  background: #fdf3f2;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  border-radius: 0 4px 4px 0;
}
.turn strong { color: #b03a2e; }

@media (prefers-color-scheme: dark) {
  .turn { background: #2b1c1a; border-left-color: #e07a6a; }
  .turn strong { color: #e07a6a; }
}

/* Section rules */
h2 { border-bottom: 2px solid #dee2e6; padding-bottom: .3rem; margin-top: 2.5rem; }

/* ---- Part I: Prompt It ---- */

/* The one rule */
.rule {
  border: 2px solid #1a5490;
  background: #f2f7fb;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 5px;
}
.rule strong { color: #1a5490; }

/* Target output boxes */
.target {
  border-left: 4px solid #1e7a45;
  background: #f1f8f4;
  padding: .75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.target strong { color: #1e7a45; }
.target pre {
  background: #fff;
  border: 1px solid #cfe3d6;
  margin-bottom: 0;
}

/* Timing chips in the margin of a heading */
.timing {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6c757d;
  border: 1px solid #ced4da;
  border-radius: 999px;
  padding: .1rem .6rem;
  vertical-align: middle;
  margin-left: .5rem;
}

@media (prefers-color-scheme: dark) {
  .rule   { background: #16232e; border-color: #4a90c2; }
  .rule strong { color: #7ab8e0; }
  .target { background: #16261d; border-left-color: #4caf7d; }
  .target strong { color: #6fce9c; }
  .target pre { background: #0f1a14; border-color: #2e4a3a; }
}

/* ---- Landing page ---- */
.tutorial-list h3 {
  margin-top: 1.8rem;
  border: 0;
  padding-bottom: 0;
}
.tutorial-list h3 a { text-decoration: none; }
.tutorial-list h3 a:hover { text-decoration: underline; }
.tutorial-list p { margin-bottom: .4rem; }
.tutorial-list em { color: #6c757d; font-size: .92rem; }

/* ---- Quarto warm-up ---- */

/* Four chunk variants side by side on wide screens */
.chunk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.25rem;
}
.chunk-grid > p { margin: .8rem 0 .2rem; font-weight: 700; }
@media (max-width: 640px) {
  .chunk-grid { grid-template-columns: 1fr; }
}

/* Mock of a rendered HTML page */
.rendered {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  color: #212529;
  padding: 1.1rem 1.4rem;
  margin: .75rem 0 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.rendered .r-title { font-size: 1.6rem; font-weight: 600; margin: 0 0 .6rem; }
.rendered .r-meta  { font-size: .72rem; letter-spacing: .06em; color: #6c757d; margin-bottom: 1rem; }
.rendered .r-h2    { font-size: 1.25rem; font-weight: 600; border-bottom: 1px solid #dee2e6; padding-bottom: .2rem; margin: .8rem 0 .5rem; }
.rendered pre      { margin: .4rem 0; padding: .5rem .75rem; border-radius: 4px; }
.rendered .r-code  { background: #f1f3f5; }
.rendered .r-out   { background: #fff; border: 1px solid #e9ecef; }

/* ---- ggplot2 pair activity ---- */

/* Driver/navigator instructions */
.pair {
  border: 2px solid #1a5490;
  background: #f2f7fb;
  padding: .75rem 1rem;
  margin: 1.25rem 0;
  border-radius: 5px;
}

/* "Swap" marker: hand the keyboard to your partner */
.swap-chip {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: #1a5490;
  border-radius: 999px;
  padding: .15rem .7rem;
}
.swap-chip::before { content: "⇄ "; }

@media (prefers-color-scheme: dark) {
  .pair { background: #16232e; border-color: #4a90c2; }
  .swap-chip { background: #4a90c2; color: #0f1a24; }
}
