.family-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 900;
}
.family-brand img { border-radius: 12px; }
.family-page { background: #f5f5fb; }
.family-top { background: var(--navy); color: white; }
.family-top > div, .family-shell { width: min(1060px, calc(100% - 32px)); margin-inline: auto; }
.family-top > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 14px; }
.family-top__actions { display: flex; align-items: center; gap: 8px; }
.family-top__actions form { margin: 0; }
.family-top__button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 12px; white-space: nowrap; }
.family-top__logout { border: 1px solid #ffffff58; color: #fff; background: #ffffff0d; }
.family-top__logout:hover, .family-top__logout:focus-visible { color: #fff; background: #ffffff24; }
@media (max-width: 500px) {
  .family-top > div { flex-wrap: wrap; }
  .family-top__actions { flex: 1 1 100%; }
  .family-top__actions > *, .family-top__actions form button { width: 100%; }
  .login-header { flex-wrap: wrap; }
}
.family-shell { display: grid; gap: 20px; padding-block: 30px 55px; }
.family-hero {
  padding: clamp(24px, 5vw, 48px);
  border-radius: 28px;
  background: linear-gradient(125deg, #24204a, #402c80);
  color: #fff;
}
.family-hero .eyebrow { color: #d4caff; }
.family-hero h1 { margin: 0 0 6px; font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.12; }
.family-hero p, .family-card p { margin-block: 4px 12px; }
.family-tabs, .family-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.family-card {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.family-card h2, .family-card h3 { margin: 0; }
.family-card summary { cursor: pointer; font-weight: 750; }
.family-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 10px; }
.family-stats div { padding: 12px 15px; border-radius: 14px; background: #f0edff; }
.family-stats dt { color: var(--muted); font-size: .83rem; }
.family-stats dd { margin: 3px 0 0; font-weight: 850; }
.family-activity { max-width: 420px; padding: 0; list-style: none; }
.family-activity li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.family-package { display: grid; gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.family-disclosure { padding-top: 14px; border-top: 1px solid var(--line); }
.family-form, .family-fields { display: grid; gap: 14px; }
.family-form { margin-top: 12px; justify-items: start; }
.family-form > .field, .family-fields { width: 100%; }
.family-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.family-form .field > span { font-size: .88rem; font-weight: 750; }
.family-form textarea[rows="3"] { min-height: 80px; }
.family-annual-plan {
  margin-block: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.family-annual-plan > summary { padding-block: 4px; }
.family-annual-plan[open] > summary { margin-bottom: 12px; }
.family-annual-plan__status {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin: 4px 4px 0;
  padding: 4px 8px;
  border-radius: 8px;
  color: #483b78;
  background: #f0edff;
  font-size: .8rem;
  font-weight: 700;
}
.family-year-chapters { margin-block: 16px 0; padding-inline-start: 24px; }
.family-year-chapters li { padding: 12px 0 12px 4px; border-top: 1px solid var(--line); }
.family-year-chapters li::marker { color: #483b78; font-weight: 750; }
.family-year-chapters__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.family-year-chapters h3 { font-size: 1rem; }
.family-year-chapters p { margin-block: 3px; }
.family-year-chapters .family-annual-plan__status { margin-inline: 0; }
.family-annual-plan__hint { max-width: 68ch; color: var(--muted); }
@media (max-width: 600px) {
  .family-year-chapters__row { grid-template-columns: minmax(0, 1fr); }
}
