/* Curated learning resources, using the existing website's content. */
.ktp-home-layout--with-learning {
  grid-template-areas: 'grades center teacher' 'grades learning toolbox';
  grid-template-rows: auto auto;
}
.ktp-home-layout--with-learning > .ktp-home-grades { grid-area: grades; }
.ktp-home-layout--with-learning > .ktp-home-center { grid-area: center; }
.ktp-home-layout--with-learning > .ktp-home-teacher { grid-area: teacher; }
.ktp-home-learning { grid-area: learning; min-width: 0; display: grid; gap: 14px; }
.ktp-home-toolbox { grid-area: toolbox; min-width: 0; align-self: stretch; }
.ktp-home-layout--with-learning .ktp-home-center > .ktp-popular-grid:last-child { margin-bottom: 0; }

.ktp-learning-journey,
.ktp-archive-selection {
  padding: 17px;
  border: 1px solid #d5c2e5;
  border-radius: 19px;
  background: #fffcf6;
}
.ktp-learning-journey__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 17px;
}
.ktp-learning-journey__heading { min-width: 0; }
.ktp-learning-journey__eyebrow {
  display: inline-block;
  margin: 0 0 5px;
  padding: 2px 9px;
  color: var(--ktp-teal);
  background: #eaf8ef;
  border: 1px solid #c7e4d8;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .015em;
}
.ktp-learning-journey h2 { margin: 0; font-size: clamp(25px, 1.85vw, 34px); }
.ktp-learning-journey__subject {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid #dfcbee;
  border-radius: 24px;
  color: #5c2c87;
  background: #f3e8fc;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}
.ktp-learning-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ktp-learning-step {
  --step-accent: var(--ktp-purple);
  --step-tint: #faf3ff;
  --step-border: #d5b9e9;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 12px 13px 13px;
  border: 1px solid var(--step-border);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--step-tint), #fffcf8);
}
.ktp-learning-step--practice { --step-accent: var(--ktp-teal); --step-tint: #eef9f6; --step-border: #abd8cc; }
.ktp-learning-step--listen { --step-accent: #9d5506; --step-tint: #fff5df; --step-border: #e5c296; }
.ktp-learning-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -22px;
  top: 49%;
  width: 20px;
  color: var(--ktp-purple);
  font-size: 21px;
  font-weight: 900;
  text-align: center;
}
.ktp-learning-step__heading { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 22px; line-height: 1.25; }
.ktp-learning-step__number { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--step-accent); color: #fff; font-size: 18px; }
.ktp-learning-art {
  display: block;
  flex-shrink: 0;
  width: var(--ktp-art-size, 144px);
  max-width: 100%;
  aspect-ratio: 1;
  align-self: center;
  background-image: url('../images/learning-illustrations.png');
  background-repeat: no-repeat;
  background-size: 400% 200%;
}
.ktp-learning-art--learn { background-position: 0 0; }
.ktp-learning-art--practice { background-position: 33.333333% 0; }
.ktp-learning-art--listen { background-position: 66.666667% 0; }
.ktp-learning-art--hobbies { background-position: 100% 0; }
.ktp-learning-art--dreams { background-position: 0 100%; }
.ktp-learning-art--friendship { background-position: 33.333333% 100%; }
.ktp-learning-art--toolbox { background-position: 66.666667% 100%; }
.ktp-learning-step > .ktp-learning-art { margin: 7px auto 3px; }
.ktp-learning-step__label { margin: 0 0 9px; text-align: center; font-size: 15px; font-weight: 850; line-height: 1.35; }
.ktp-learning-step__button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 37px;
  margin-top: auto;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--step-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.ktp-learning-step__button:hover { filter: brightness(.94); text-decoration: none; }
.ktp-learning-step__button > span { flex-shrink: 0; }

.ktp-archive-selection h2 { margin: 0 0 12px; font-size: clamp(23px, 1.6vw, 29px); }
.ktp-archive-selection__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ktp-archive-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e0cfeb;
  border-radius: 12px;
  background: #f3eafa;
  color: var(--ktp-ink);
  text-decoration: none;
}
.ktp-archive-tile--dreams { background: #eaf8ef; border-color: #c3dfd1; }
.ktp-archive-tile--friendship { background: #fff0e4; border-color: #edd2ba; }
.ktp-archive-tile > .ktp-learning-art { --ktp-art-size: 68px; }
.ktp-archive-tile__copy { flex: 1; min-width: 0; }
.ktp-archive-tile__grade { display: block; margin-bottom: 3px; font-size: 18px; font-weight: 900; line-height: 1.2; }
.ktp-archive-tile__title { display: block; font-size: 13px; font-weight: 800; line-height: 1.35; }
.ktp-archive-tile__arrow { flex-shrink: 0; color: var(--ktp-purple); font-size: 23px; font-weight: 800; }
.ktp-archive-tile__hint { display: block; margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--ktp-muted); line-height: 1.3; }
.ktp-archive-tile:hover { border-color: var(--ktp-purple); text-decoration: none; }

.ktp-teacher-toolbox {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: 100%;
  padding: 17px 14px;
  border: 1px solid var(--ktp-teal);
  border-top-width: 3px;
  border-radius: 18px;
  background: #fffcf4;
}
.ktp-teacher-toolbox h2 { margin: 0 0 5px; font-size: clamp(25px, 1.65vw, 30px); }
.ktp-teacher-toolbox__header p { margin: 0; color: var(--ktp-purple); font-size: 14px; font-weight: 750; }
.ktp-teacher-toolbox > .ktp-learning-art { --ktp-art-size: 210px; margin: 12px auto; }
.ktp-teacher-toolbox__links { display: grid; gap: 9px; margin-top: auto; }
.ktp-toolbox-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 45px; padding: 9px 11px; border: 1px solid #b5d5ce; border-radius: 12px; color: #5a2c80; background: #fffefa; text-decoration: none; font-size: 15px; font-weight: 850; line-height: 1.35; }
.ktp-toolbox-link__copy { min-width: 0; }
.ktp-toolbox-link__hint { display: block; color: var(--ktp-muted); font-size: 11px; font-weight: 650; margin-top: 4px; }
.ktp-toolbox-link__arrow { flex-shrink: 0; font-size: 22px; }
.ktp-toolbox-link:hover { background: #f0f8f3; border-color: var(--ktp-teal); text-decoration: none; }

@media (min-width: 1800px) {
  .ktp-learning-journey, .ktp-archive-selection { padding: 20px; }
  .ktp-learning-step > .ktp-learning-art { --ktp-art-size: 160px; }
  .ktp-learning-step__heading { font-size: 25px; }
  .ktp-learning-step__label { font-size: 17px; }
  .ktp-learning-step__button { min-height: 40px; font-size: 16px; }
  .ktp-archive-tile > .ktp-learning-art { --ktp-art-size: 78px; }
  .ktp-archive-tile__grade { font-size: 21px; }
  .ktp-archive-tile__title { font-size: 15px; }
  .ktp-teacher-toolbox { padding: 20px 17px; }
}
@media (min-width: 1101px) and (max-width: 1350px) {
  .ktp-learning-steps { gap: 17px; }
  .ktp-learning-step { padding: 11px 9px; }
  .ktp-learning-step:not(:last-child)::after { right: -17px; width: 16px; font-size: 18px; }
  .ktp-learning-step__heading { gap: 6px; font-size: 19px; }
  .ktp-learning-step__number { width: 25px; height: 25px; flex-basis: 25px; font-size: 16px; }
  .ktp-learning-step > .ktp-learning-art { --ktp-art-size: 128px; }
  .ktp-learning-step__button { font-size: 13px; padding-inline: 7px; }
  .ktp-archive-selection__grid { gap: 8px; }
  .ktp-archive-tile { flex-wrap: wrap; gap: 5px; padding: 9px; }
  .ktp-archive-tile > .ktp-learning-art { --ktp-art-size: 52px; }
  .ktp-archive-tile__grade { font-size: 17px; }
  .ktp-archive-tile__title { font-size: 12px; }
  .ktp-archive-tile__arrow { display: none; }
  .ktp-toolbox-link { font-size: 14px; }
}
@media (min-width: 921px) and (max-width: 1100px) {
  .ktp-home-layout--with-learning {
    grid-template-areas: 'grades center' 'grades learning' 'teacher teacher' 'toolbox toolbox';
    grid-template-rows: auto auto auto auto;
  }
}
@media (min-width: 681px) and (max-width: 1100px) {
  .ktp-teacher-toolbox { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px 18px; }
  .ktp-teacher-toolbox > .ktp-learning-art { --ktp-art-size: 130px; grid-column: 1; grid-row: 1 / span 2; margin: auto; }
  .ktp-teacher-toolbox__header { grid-column: 2; }
  .ktp-teacher-toolbox__links { grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
  .ktp-toolbox-link { min-height: 52px; font-size: 13px; padding: 8px; }
}
@media (max-width: 920px) {
  .ktp-home-layout--with-learning { grid-template-areas: 'grades' 'center' 'learning' 'teacher' 'toolbox'; grid-template-rows: auto; }
}
@media (max-width: 680px) {
  .ktp-learning-journey, .ktp-archive-selection { padding: 14px 12px; border-radius: 15px; }
  .ktp-learning-journey__header { gap: 9px; margin-bottom: 14px; }
  .ktp-learning-journey h2 { font-size: 27px; }
  .ktp-learning-journey__subject { font-size: 12px; padding: 5px 10px; }
  .ktp-learning-steps { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .ktp-learning-step { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 10px; row-gap: 5px; padding: 12px 11px; }
  .ktp-learning-step:not(:last-child)::after { display: none; }
  .ktp-learning-step > .ktp-learning-art { --ktp-art-size: 84px; grid-column: 1; grid-row: 1 / span 3; margin: auto; }
  .ktp-learning-step__heading { grid-column: 2; gap: 7px; font-size: 21px; }
  .ktp-learning-step__number { flex-basis: 25px; width: 25px; height: 25px; font-size: 16px; }
  .ktp-learning-step__label { grid-column: 2; margin: 0; text-align: left; font-size: 14px; }
  .ktp-learning-step__button { grid-column: 2; margin: 0; font-size: 14px; min-height: 36px; padding: 7px 8px; }
  .ktp-archive-selection h2 { font-size: 25px; }
  .ktp-archive-selection__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ktp-archive-tile { gap: 12px; padding: 8px 12px; }
  .ktp-archive-tile > .ktp-learning-art { --ktp-art-size: 62px; }
  .ktp-archive-tile__grade { font-size: 19px; }
  .ktp-archive-tile__title { font-size: 14px; }
  .ktp-teacher-toolbox { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 13px; padding: 16px 13px; }
  .ktp-teacher-toolbox > .ktp-learning-art { --ktp-art-size: 82px; grid-column: 1; grid-row: 1; margin: auto; }
  .ktp-teacher-toolbox__header { grid-column: 2; grid-row: 1; }
  .ktp-teacher-toolbox h2 { font-size: 25px; }
  .ktp-teacher-toolbox__links { grid-column: 1 / -1; margin: 0; }
}
@media print {
  .ktp-home-toolbox { display: none; }
  .ktp-home-learning { display: block; }
  .ktp-learning-journey, .ktp-archive-selection { margin-top: 16px; background: #fff; break-inside: avoid; }
}
