/* Home presentation only. Learning records, task order and mastery colors remain data-driven. */
.chibi-home {
  --home-ice: #e4f3fb;
  --home-ink: #214d6b;
  --home-rim: #b7d4e5;
  --home-gold: #c6a05d;
}
.chibi-home .chibi-home-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(255px, 1fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: stretch;
  overflow: hidden;
  padding: 17px 17px 17px 32px;
  border: 1px solid #b7d4e5;
  border-radius: 29px;
  background: linear-gradient(118deg, #fff 8%, #f3faff 49%, #e4f3fb 100%);
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px #e0edf5, 0 5px 0 #d5e5ef, 0 14px 30px -23px #31577765;
}
.chibi-home .hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: 20px 0;
}
.chibi-home .hero-kicker {
  color: #4c7591;
  font-size: 11px;
  line-height: 1.8;
}
.chibi-home .hero-title {
  margin-bottom: 17px;
  color: var(--home-ink);
  font-size: clamp(31px, 3.2vw, 45px);
  line-height: 1.38;
  letter-spacing: -.045em;
}
.chibi-home .hero-description {
  color: #4b6d83;
  line-height: 1.95;
}
.chibi-home .hero-copy > .row { flex-wrap: wrap; gap: 11px; }
.chibi-home .hero-meta { gap: 8px; margin-top: 23px; }
.chibi-home .hero-meta > span {
  padding: 5px 9px;
  border: 1px solid #d4e4ee;
  border-radius: 8px;
  background: #ffffffb8;
  color: #51768c;
  font-size: 11px;
}
.chibi-home .hero-meta > span:first-child { border-color: #e8d9b9; background: #fffaf1; color: #886e43; }
.chibi-home .chibi-home-portrait {
  display: block;
  position: relative;
  align-self: stretch;
  min-height: 355px;
  height: auto;
  margin: 0;
  border: 1px solid #bfd9e9;
  border-radius: 21px;
  overflow: hidden;
  background: #e4f1fc;
  box-shadow: inset 0 0 0 4px #fff, 0 3px 0 #c3dce9;
}
.chibi-home .chibi-home-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 355px;
  max-height: 440px;
  object-fit: cover;
  object-position: 55% 46%;
}
.chibi-home .chibi-home-portrait figcaption {
  position: absolute;
  inset: auto 12px 12px;
  padding: 10px 8px;
  border: 1px solid #eaf6ff;
  border-radius: 11px;
  background: #ffffffeb;
  color: #476a85;
  text-align: center;
  font-size: 11px;
  letter-spacing: .1em;
  box-shadow: 0 2px 5px #426c8a12;
}
.chibi-home .chibi-home-dashboard { gap: 22px; margin-top: 24px; }
.chibi-home .chibi-home-dashboard > .card,
.chibi-home .chibi-home-lessons .skill-card {
  position: relative;
  border: 1px solid var(--home-rim);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #e7f1f7, 0 4px 0 #d7e7f1, 0 12px 20px -20px #31577760;
}
.chibi-home .chibi-home-next .card-title,
.chibi-home .chibi-home-route .card-title { color: var(--home-ink); }
.chibi-home .chibi-home-prompt {
  position: relative;
  min-height: 153px;
  padding: 22px 123px 25px 0;
  text-align: left;
}
.chibi-home .chibi-home-prompt > .skill-icon { display: none; }
.chibi-home .chibi-home-prompt h3 { color: #315c78; }
.chibi-home .chibi-home-prompt p { max-width: 430px; }
.chibi-home .chibi-home-prompt-art {
  position: absolute;
  right: 0;
  top: 16px;
  display: block;
  width: 102px;
  height: 110px;
  object-fit: cover;
  object-position: center 32%;
  border: 4px solid white;
  border-radius: 19px;
  box-shadow: 0 0 0 1px #c6deec, 0 3px 0 #d9e9f2;
}
.chibi-home .chibi-home-route .card-header { align-items: center; margin-bottom: 10px; }
.chibi-home .chibi-home-route-art {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center 31%;
  border: 3px solid white;
  border-radius: 16px;
  box-shadow: 0 0 0 1px #c5deec, 0 2px 0 #d5e6f0;
}
.chibi-home .chibi-home-route .journey-step:not(:last-child)::after { background: #d0e4ef; }
.chibi-home .chibi-home-route .step-number {
  border-color: #c1dce9;
  background: #f0f8fd;
  color: #52758d;
  box-shadow: inset 0 1px 0 #fff;
}
.chibi-home .chibi-home-route .active .step-number {
  border-color: #83b5d2;
  background: #cee9fa;
  color: #285d7b;
  box-shadow: 0 0 0 4px #edf6fd;
}
.chibi-home .chibi-home-route .done .step-number { background: #deefe6; color: #397454; border-color: #b5d7c2; }
.chibi-home .result-grid { border-color: #deebf3; }
.chibi-home .result-value { color: #315e7b; }
.chibi-home .chibi-home-lessons { margin-top: 34px; }
.chibi-home .chibi-home-lessons .section-title { margin-bottom: 17px; }
.chibi-home .chibi-home-lessons .section-title h2 { color: var(--home-ink); }
.chibi-home .chibi-home-lessons .skill-grid { gap: 18px; }
.chibi-home .chibi-home-lessons .skill-card { padding: 16px; overflow: hidden; }
.chibi-home .chibi-home-lessons .skill-card::before {
  content: '';
  display: block;
  height: 128px;
  margin: -7px -7px 17px;
  border: 1px solid #d5e6f0;
  border-radius: 15px;
  background: #e6f2fb url('assets/chibi/skill-induction.jpg') center 34% / cover no-repeat;
}
.chibi-home .chibi-home-lessons .skill-card:nth-child(2)::before { background-image: url('assets/chibi/skill-generating.jpg'); }
.chibi-home .chibi-home-lessons .skill-card:nth-child(3)::before { background-image: url('assets/chibi/skill-random.jpg'); }
.chibi-home .chibi-home-lessons .skill-card:nth-child(4)::before { background-image: url('assets/chibi/skill-enumeration.jpg'); }
.chibi-home .chibi-home-lessons .skill-icon { border-color: #bcd8e9; background: #e8f4fc; color: #3e7192; border-radius: 11px; }
.chibi-home .chibi-home-lessons .skill-name { color: #315773; }
.chibi-home .chibi-home-lessons .skill-description { min-height: 44px; }
.chibi-home .chibi-home-lessons .skill-footer { border-top-color: #e4eef5; }

/* The catalogue uses small corner portraits so 72 lessons stay easy to scan. */
body[data-page='home'] .course-grid .course-card {
  position: relative;
  margin-top: 0;
  padding-right: 94px;
  border-color: #bfd8e7;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #e8f1f7, 0 4px 0 #d7e7f1;
}
body[data-page='home'] .course-grid .course-card::after {
  content: '';
  position: absolute;
  top: 58px;
  right: 17px;
  width: 62px;
  height: 79px;
  border: 3px solid white;
  border-radius: 13px;
  background: #e7f3fb url('assets/chibi/skill-induction.jpg') center 30% / cover;
  box-shadow: 0 0 0 1px #d1e3ee, 0 2px 0 #deebf3;
  pointer-events: none;
}
body[data-page='home'] .course-grid .course-card:nth-child(5n+2)::after { background-image: url('assets/chibi/skill-generating.jpg'); }
body[data-page='home'] .course-grid .course-card:nth-child(5n+3)::after { background-image: url('assets/chibi/skill-random.jpg'); }
body[data-page='home'] .course-grid .course-card:nth-child(5n+4)::after { background-image: url('assets/chibi/skill-enumeration.jpg'); }
body[data-page='home'] .course-grid .course-card:nth-child(5n)::after { background-image: url('assets/chibi/skill-ai-overload.jpg'); }
body[data-page='home'] .course-grid .course-card .course-card-top,
body[data-page='home'] .course-grid .course-card .question-actions { margin-right: -70px; }

@media (max-width: 1024px) {
  .chibi-home .chibi-home-hero { grid-template-columns: minmax(0, 1.2fr) minmax(220px, 1fr); padding: 15px 15px 15px 26px; gap: 22px; }
  .chibi-home .hero-title { font-size: 32px; }
  .chibi-home .chibi-home-portrait,
  .chibi-home .chibi-home-portrait img { min-height: 330px; }
  .chibi-home .chibi-home-lessons .skill-card::before { height: 110px; }
}
@media (max-width: 768px) {
  .chibi-home .chibi-home-hero { grid-template-columns: minmax(0, 1.15fr) minmax(180px, 1fr); gap: 15px; padding-left: 23px; }
  .chibi-home .hero-title { font-size: 29px; }
  .chibi-home .chibi-home-portrait,
  .chibi-home .chibi-home-portrait img { min-height: 310px; }
  .chibi-home .hero-meta { margin-top: 17px; }
  .chibi-home .hero-meta > span { padding: 4px 7px; font-size: 10px; }
  .chibi-home .chibi-home-route .journey { gap: 19px; }
}
@media (max-width: 580px) {
  .chibi-home .chibi-home-hero { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 21px; border-radius: 24px; }
  .chibi-home .hero-copy { padding: 8px 0 12px; }
  .chibi-home .hero-title { font-size: 31px; margin-bottom: 13px; }
  .chibi-home .hero-description { font-size: 12px; }
  .chibi-home .chibi-home-portrait { min-height: 0; height: 250px; width: 100%; border-radius: 17px; }
  .chibi-home .chibi-home-portrait img { min-height: 0; height: 250px; max-height: none; object-position: 50% 37%; }
  .chibi-home .chibi-home-portrait figcaption { padding: 8px; font-size: 10px; }
  .chibi-home .chibi-home-dashboard { margin-top: 22px; gap: 20px; }
  .chibi-home .chibi-home-prompt { padding-right: 85px; min-height: 155px; }
  .chibi-home .chibi-home-prompt-art { width: 73px; height: 89px; top: 23px; border-radius: 14px; }
  .chibi-home .chibi-home-prompt h3 { font-size: 15px; }
  .chibi-home .chibi-home-lessons .skill-grid { gap: 15px; }
  .chibi-home .chibi-home-lessons .skill-card { padding: 16px; }
  .chibi-home .chibi-home-lessons .skill-card::before { height: 152px; }
  body[data-page='home'] .course-grid .course-card { padding-right: 94px; }
}
@media print {
  .chibi-home .chibi-home-portrait,
  .chibi-home .chibi-home-prompt-art,
  .chibi-home .chibi-home-route-art,
  .chibi-home .chibi-home-lessons .skill-card::before,
  body[data-page='home'] .course-grid .course-card::after { display: none; }
  .chibi-home .chibi-home-hero { display: block; }
  .chibi-home .chibi-home-prompt,
  body[data-page='home'] .course-grid .course-card { padding-right: 20px; }
}
