.homework-panel { margin: 24px 0; padding: clamp(16px, 4vw, 32px); background: #e9f2fd; color: #082b48; border: 1px solid #b6cfee; border-radius: 16px; }
.homework-panel h2, .homework-panel h3, .homework-panel h4 { margin: 0 0 .5rem; }
.homework-panel p { margin: 0 0 1rem; }
.homework-kicker { font-size: .75rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.homework-pickers, .homework-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 16px; }
.homework-panel label { display: grid; gap: 6px; font-weight: 650; }
.homework-panel [hidden] { display: none !important; }
.homework-panel input, .homework-panel select, .homework-panel textarea { font: inherit; font-weight: 400; min-width: 0; width: 100%; }
.homework-panel textarea { resize: vertical; }
.homework-panel fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
.homework-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 16px 0; }
.homework-actions { align-items: center; }
.homework-jump { display: inline-block; margin: 16px 0 0; font-weight: 700; }
@media print { .family-page #homework, .homework-jump { display: none; } }
.family-home .family-picker { margin: 0 0 20px; }
.family-home .family-picker h1 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.45rem); }
.family-home .family-picker .family-motto { font-size: .85rem; margin: 8px 0 16px; color: #345978; }
.family-home .family-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.family-home .family-groups button { min-height: 56px; padding: 12px 14px; }
.family-home .family-groups strong { font-size: clamp(.875rem, 1.6vw, 1.1rem); }
.family-home [hidden] { display: none !important; }
#family-group-heading { margin: 12px 0; }
.family-view-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.family-view-switch button { background: white; color: #082b48; border: 1px solid #b6cfee; }
.family-view-switch button[aria-pressed="true"] { background: #082b48; color: white; }
.family-home #homework { margin-top: 0; }
@media (max-width: 700px) { .family-home .family-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .family-view-switch, #family-group-heading { display: none !important; } }
.family-welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: clamp(16px, 3vw, 28px); background: linear-gradient(115deg, #d8e8fc, #f1f7ff); border: 1px solid #b6cfee; border-radius: 18px; }
.family-home .family-welcome .eyebrow { margin: 0 0 6px; }
.family-home .family-welcome .family-motto { margin: 8px 0 0; }
.family-welcome-art { display: flex; align-items: center; gap: 7px; color: #4776ad; }
.family-welcome-star { font-size: clamp(13px, 3vw, 24px); }
.family-welcome-star:nth-child(2) { font-size: clamp(24px, 5vw, 48px); color: #082b48; }
.family-pick-title { margin: 18px 0 0; font-size: 1.2rem; }
.family-home .family-groups button.selected { padding: 11px 13px; }
@media (max-width: 420px) { .family-welcome-art { gap: 2px; } .family-welcome-star:first-child { display: none; } }
@media print { .family-welcome { display: none; } }
/* CSA family palette */
.family-home .family-welcome {
  background: linear-gradient(110deg, #082b48 12%, #153f65 100%);
  border-color: #082b48;
  color: #fff;
}
.family-home .family-welcome h1 { color: #fff; }
.family-home .family-welcome .eyebrow,
.family-home .family-welcome .family-motto { color: #d4e7ff; }
.family-welcome-star, .family-welcome-star:nth-child(2) { color: #a9c9f2; }
.family-home .family-groups button { background: #dfedff; border-color: #9cbee9; }
.family-home .family-groups button:nth-child(even) { background: #cfe3fb; }
.family-home .family-groups button.selected { background: #7ba4db; border-color: #082b48; }
@media print {
  .family-home .family-welcome, .family-home .family-groups { display: none !important; }
}
.family-page .family-top .family-brand { padding-left: 0; min-height: 0; gap: 12px; }
.family-page .family-top .family-brand img {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: clamp(34px, 6vw, 50px);
  height: auto;
  aspect-ratio: 690 / 944;
  object-fit: contain;
  background: transparent;
  padding: 0;
  filter: none;
}
.practice-workspace { max-width: 760px; }
.practice-workspace > h3 { margin: 4px 0 10px; }
.practice-workspace .homework-week-label { margin: 0; font-size: .875rem; color: #345978; }
#homework .homework-status:empty,
#homework .homework-pickers:not(:has(> :not([hidden]))) { display: none; }
#homework .homework-pickers { align-items: center; margin: 8px 0 0; }
.practice-step-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 10px; }
.practice-step-bar .practice-progress { margin: 0; color: #345978; font-size: .875rem; font-weight: 700; }
.practice-trail { display: flex; flex-wrap: wrap; gap: 4px; }
.practice-trail button {
  min-height: 44px;
  min-width: 44px;
  padding: 4px;
  border: 1px solid #9cbee9;
  border-radius: 999px;
  background: #fff;
  color: #082b48;
  font-weight: 750;
}
.practice-trail button[aria-pressed="true"] { background: #7ba4db; border-color: #082b48; }
.practice-stage {
  background: #fff;
  border: 1px solid #b6cfee;
  border-top: 6px solid #7ba4db;
  border-radius: 18px;
  padding: clamp(16px, 4vw, 28px);
}
.practice-step-badge {
  display: inline-block;
  border-radius: 999px;
  background: #e4f0ff;
  padding: 5px 12px;
  font-size: .8rem;
  font-weight: 800;
}
.practice-stage h4 { margin: 10px 0 14px; font-size: clamp(1.4rem, 4vw, 2rem); }
.practice-instructions p { font-size: 1.05rem; line-height: 1.55; overflow-wrap: anywhere; }
.practice-watch { display: table; padding: 10px 14px; border-radius: 10px; background: #e4f0ff; color: #082b48; font-weight: 750; }
.practice-next {
  display: block;
  min-height: 48px;
  margin-top: 16px;
  padding: 10px 18px;
  border: 1px solid #082b48;
  border-radius: 12px;
  background: #082b48;
  color: #fff;
  font-weight: 750;
}
@media (max-width: 480px) {
  .practice-next { width: 100%; }
}
.practice-print { margin: 12px 0 0; min-height: 44px; color: #082b48; background: #fff; border: 1px solid #9cbee9; }
#practice-print-sheet { display: none; }
@media print {
  body:has(#practice-print-sheet) > :not(#practice-print-sheet) { display: none !important; }
  body:has(#practice-print-sheet) { display: block !important; margin: 0 !important; background: white !important; }
  #practice-print-sheet { display: block !important; color: #082b48; padding: .24in; font: 11pt/1.35 Arial, sans-serif; }
  #practice-print-sheet header {
    display: block !important;
    min-height: 62px;
    border: 2px solid #7ba4db;
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #e9f2fd;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #practice-print-sheet header img { float: left; width: 42px; height: auto; margin-right: 14px; }
  #practice-print-sheet h3 { font-size: 21pt; margin: 0; line-height: 1.15; }
  #practice-print-sheet h4 { display: flex; align-items: center; gap: 8px; font-size: 13pt; margin: 0 0 5px; }
  #practice-print-sheet p { margin: 0 0 3px; white-space: pre-line; overflow-wrap: anywhere; }
  .practice-print-tracker { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 12px; }
  .practice-print-tracker span { font-weight: 700; }
  .practice-print-tracker span::before { content: ''; display: inline-block; width: 13px; height: 13px; margin-right: 6px; border: 1.5px solid #082b48; border-radius: 3px; vertical-align: -2px; }
  #practice-print-sheet ol { columns: 2; column-gap: .19in; padding: 0; margin: 0; list-style: none; }
  #practice-print-sheet li { break-inside: avoid; margin: 0 0 8px; padding: 8px 10px; border: 1px solid #a9c9f2; border-radius: 10px; }
  .practice-print-number { display: inline-grid; place-items: center; border: 1px solid #7ba4db; border-radius: 50%; width: 23px; height: 23px; font-size: 11pt; }
  #practice-print-sheet a { font-weight: 700; color: #082b48; }
}
.practice-exercise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(104px, 26vw, 208px);
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #c6daf4;
  border-radius: 12px;
  background: #f3f8ff;
}
.practice-exercise p { margin: 0; }
.practice-exercise-picture, .practice-demo-picture {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.practice-demo-picture {
  width: auto;
  max-width: min(100%, 420px);
  max-height: 350px;
  object-fit: contain;
  margin: 8px 0 12px;
}
@media (max-width: 380px) {
  .practice-exercise { grid-template-columns: 1fr; }
  .practice-exercise-picture { max-width: 210px; }
}
.practice-celebration {
  width: min(420px, calc(100% - 32px));
  border: 2px solid #7ba4db;
  border-radius: 20px;
  padding: 28px;
  color: #082b48;
  background: #f0f7ff;
  text-align: center;
  overflow: visible;
}
.practice-celebration::backdrop { background: #082b4888; }
.practice-celebration h2 { margin: 0 0 8px; color: #082b48; font-size: clamp(1.8rem, 6vw, 2.5rem); }
.practice-celebration button { min-height: 44px; background: #082b48; color: white; }
.practice-confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.practice-confetti i {
  position: absolute; top: -14px; left: var(--x); width: 8px; height: 14px;
  background: var(--color); border-radius: 2px;
  animation: practice-confetti-fall 1.6s var(--delay) ease-in forwards;
}
@keyframes practice-confetti-fall {
  to { transform: translateY(105vh) rotate(var(--spin)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .practice-confetti { display: none; } }
@media print {
  .practice-print-picture { float: right; width: 50px; height: auto; margin: 0 0 4px 6px; border-radius: 4px; }
  #practice-print-sheet li { display: flow-root; }
}
.practice-confetti i {
  width: 9px;
  height: 15px;
  animation-duration: 2.55s;
}
.practice-party-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: #fff0a8;
  font-size: clamp(32px, 7vw, 76px);
  line-height: 1;
  text-shadow: 0 0 14px #7ba4db, 0 3px 2px #082b4880;
  opacity: 0;
  animation: practice-star-pop 1.7s var(--delay) ease-out forwards;
}
.practice-balloon {
  position: absolute;
  bottom: -140px;
  left: var(--x);
  width: clamp(34px, 7vw, 64px);
  aspect-ratio: .8;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 32% 28%, #ffffff85 0%, transparent 27%), var(--color);
  animation: practice-balloon-float 3.45s var(--delay) ease-out forwards;
}
.practice-balloon::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 45px;
  border-left: 1px solid #e4efff;
  border-radius: 50%;
}
@keyframes practice-star-pop {
  0% { transform: scale(.2) rotate(-22deg); }
  35% { opacity: 1; transform: scale(1.16) rotate(12deg); }
  75% { opacity: 1; }
  100% { transform: scale(.85); opacity: 0; }
}
@keyframes practice-balloon-float {
  25% { transform: translate(10px,-31vh) rotate(9deg); }
  65% { transform: translate(-12px,-76vh) rotate(-9deg); }
  100% { transform: translate(8px,-125vh); }
}

.homework-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:20px 0}.homework-group-status{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:16px;background:white;color:#082b48;border:2px solid #b6cfee;border-radius:12px;text-align:left;cursor:pointer}.homework-group-status[aria-pressed="true"]{border-color:#082b48;box-shadow:0 0 0 1px #082b48}.homework-state{font-size:.82rem;font-weight:750;padding:4px 9px;border-radius:20px}.homework-state.assigned{background:#d8f1e3;color:#185438}.homework-state.none{background:#dce8f6;color:#173e60}.homework-state.pending{background:#fff0ce;color:#6b4b0d}.homework-selection-status{font-weight:750;padding:12px 16px;background:white;border-radius:10px}.homework-actions button[value="no-homework"]{border:2px solid #082b48;background:white;color:#082b48}.homework-actions button[value="no-homework"][aria-pressed="true"]{background:#dce8f6}

.family-home .family-groups{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
