/* Download panel only: the notebook PDFs carry their own handwriting fonts. */
.year4-cheatsheets {
  margin-block: 0 2rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid #d6dfdf;
  border-radius: 18px;
  background: #fff9ef;
  color: #19427e;
  scroll-margin-top: 1.5rem;
}

.year4-cheatsheets .year4-cheatsheets__intro {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0 1.75rem;
  align-items: start;
}

.year4-cheatsheets .year4-cheatsheets__preview {
  grid-row: span 2;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297;
  border: 1px solid #c8e2f2;
  border-radius: 4px;
  object-fit: contain;
  background: #fff9ef;
  box-shadow: 0 4px 12px rgb(25 66 126 / 8%);
}

.year4-cheatsheets .year4-cheatsheets__copy {
  min-width: 0;
}

.year4-cheatsheets .year4-cheatsheets__eyebrow {
  margin: 0 0 .45rem;
  color: #166d63;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.year4-cheatsheets h2 {
  margin: 0 0 .65rem;
  color: #19427e;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
  line-height: 1.3;
}

.year4-cheatsheets .year4-cheatsheets__copy > p:not(.year4-cheatsheets__eyebrow) {
  max-width: 64ch;
  margin: .5rem 0;
  color: #3e5268;
  line-height: 1.65;
}

.year4-cheatsheets .year4-cheatsheets__note {
  font-size: .9rem;
}

.year4-cheatsheets .year4-cheatsheets__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  margin-top: .9rem;
}

.year4-cheatsheets .year4-cheatsheets__actions .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  font-size: .9rem;
  line-height: 1.45;
}

.year4-cheatsheets .year4-cheatsheets__details {
  margin-top: 1rem;
  border-top: 1px solid #d6dfdf;
}

.year4-cheatsheets .year4-cheatsheets__details:first-of-type {
  margin-top: 1.4rem;
}

.year4-cheatsheets .year4-cheatsheets__details > summary {
  padding: .9rem 0 .25rem;
  color: #19427e;
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.5;
  cursor: pointer;
}

.year4-cheatsheets .year4-cheatsheets__details > summary::marker {
  color: #166d63;
}

.year4-cheatsheets .year4-cheatsheets__detail-note,
.year4-cheatsheets .year4-cheatsheets__teacher-pack p {
  margin: .7rem 0;
  color: #3e5268;
  font-size: .9rem;
  line-height: 1.65;
}

.year4-cheatsheets .year4-cheatsheets__topics {
  margin: .75rem 0 0;
  padding-left: 1.75rem;
}

.year4-cheatsheets .year4-cheatsheets__topics li {
  padding: .65rem .15rem .65rem .3rem;
  border-bottom: 1px solid #e0e6e7;
  color: #19427e;
  font-size: .92rem;
  line-height: 1.55;
}

.year4-cheatsheets .year4-cheatsheets__topics li:last-child {
  border-bottom: 0;
}

.year4-cheatsheets .year4-cheatsheets__topics li::marker {
  color: #526176;
  font-size: .8rem;
}

.year4-cheatsheets .year4-cheatsheets__topic-title {
  display: inline-block;
  width: calc(100% - 11rem);
  min-width: 0;
  padding-right: .75rem;
  vertical-align: middle;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.year4-cheatsheets .year4-cheatsheets__topic-links {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  vertical-align: middle;
}

.year4-cheatsheets .year4-cheatsheets__topic-links a,
.year4-cheatsheets .year4-cheatsheets__teacher-pack > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #214f91;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.year4-cheatsheets .year4-cheatsheets__topic-links a:hover,
.year4-cheatsheets .year4-cheatsheets__teacher-pack > a:hover {
  color: #143768;
  text-decoration-thickness: 2px;
}

.year4-cheatsheets a:focus-visible,
.year4-cheatsheets summary:focus-visible {
  outline: 3px solid #19427e;
  outline-offset: 4px;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .year4-cheatsheets .year4-cheatsheets__intro {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0 1rem;
  }

  .year4-cheatsheets .year4-cheatsheets__preview {
    grid-row: auto;
    margin-top: .2rem;
  }

  .year4-cheatsheets .year4-cheatsheets__actions {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
  }

  .year4-cheatsheets .year4-cheatsheets__topic-title {
    display: block;
    width: 100%;
    padding-right: 0;
  }

  .year4-cheatsheets .year4-cheatsheets__topic-links {
    gap: 1.25rem;
  }
}

@media print {
  .year4-cheatsheets {
    display: none;
  }
}
