/* lesson-graphics.css — Teaching graphics inside lessons: the interactive UK
   map in lesson-graphics.html (bound by lesson-graphics.js) and the fact
   illustrations in lesson-art.html (from lesson-art.js). */

/* A lesson graphic explains the fact without adding another study step. */
.lesson-geography {
  margin: 20px auto 0;
  width: 100%;
  max-width: 460px;
}
.lesson-map-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  max-width: 350px;
  margin: 0 auto;
  border-radius: 13px;
  background: var(--panel-2);
}
.lesson-map-switch button {
  flex: 1;
  min-height: 43px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 750;
}
.lesson-map-switch button[aria-pressed="true"] {
  background: #2dbaf0;
  color: #fff;
  box-shadow: 0 2px 0 #12a1d7;
}
.lesson-map-switch button:active {
  transform: scale(0.97);
}
.lesson-map-switch button:focus-visible {
  outline: 3px solid var(--brand-ink);
  outline-offset: 2px;
}
.lesson-map {
  display: block;
  width: 100%;
  max-height: 285px;
  margin: 8px auto 0;
  overflow: visible;
}
.map-country {
  stroke: #fff;
  stroke-width: 1.25;
  stroke-linejoin: round;
  fill-rule: evenodd;
}
.map-label {
  font-size: 20px;
  font-weight: 750;
  fill: var(--ink);
}
.map-label path {
  fill: none;
  stroke: #a8bacb;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-label circle {
  stroke: #fff;
  stroke-width: 1;
}
.map-scotland-label circle {
  fill: #9b82e8;
}
.map-england-label circle {
  fill: #36b9ed;
}
.map-wales-label circle {
  fill: #f18b95;
}
.map-ni-label circle {
  fill: #f2b341;
}
.map-northern-ireland,
.map-ni-label {
  transition:
    fill 0.3s ease,
    opacity 0.3s ease;
}
.lesson-geography[data-scope="gb"] .map-northern-ireland {
  fill: #dce5ec;
}
.lesson-geography[data-scope="gb"] .map-ni-label {
  opacity: 0.4;
}
.lesson-map-caption {
  text-align: center;
  color: var(--brand-ink);
  font-size: 16px;
  font-weight: 750;
  padding: 0 6px;
}
.lesson-map-caption span {
  color: #99acbd;
  padding: 0 4px;
}
.lesson-map-source {
  margin-top: 9px;
  text-align: center;
  font-size: 10px;
  color: #7b8d9e;
}
.lesson-map-source summary {
  display: inline-block;
  cursor: pointer;
  padding: 2px 8px;
}
.lesson-map-source p {
  margin: 6px 0;
  line-height: 1.5;
}
@media (max-height: 760px) {
  .lesson-map {
    max-height: 225px;
  }
  .lesson-geography {
    margin-top: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-northern-ireland,
  .map-ni-label {
    transition: none;
  }
  .lesson-map-switch button:active {
    transform: none;
  }
}

/* Transparent, subject-specific teaching illustrations. */
.lesson-art {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 20px auto 12px;
}
.lesson-art figure {
  flex: 1;
  min-width: 0;
  margin: 0;
}
/* The art is drawn 640px wide, so it fills the card up to that size and never
   past it; the viewport-height ceiling keeps it clear of the action button. */
.lesson-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 445;
  max-height: 44vh;
  object-fit: contain;
}
.lesson-art figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink-2);
}
.lesson-art-pair {
  gap: 16px;
}
.guided-reading-screen .lesson-art {
  margin: 18px auto;
  max-width: 560px;
}
.guided-reading-screen .lesson-art img {
  max-height: 36vh;
}
@media (max-height: 760px) {
  .lesson-art {
    margin-top: 14px;
  }
  .lesson-art img {
    max-height: 34vh;
  }
  .guided-reading-screen .lesson-art img {
    max-height: 30vh;
  }
}
