:root {
  font: 16px/1.55 system-ui,-apple-system,sans-serif;
  color: #132f4a;
  background: #eef7fc;
  --navy: #071d38;
  --blue: #075aa4;
  --body: system-ui,sans-serif;
  --edge: #bad6ea;
}
* { box-sizing: border-box }
body { margin: 0; background: linear-gradient(180deg,#e0f3ff,#f5fbff 520px) }
[hidden] { display: none !important }
button,input,select { font: inherit }
:focus-visible { outline: 3px solid #1778c5; outline-offset: 3px }
.family-head,.family-main { width: min(1080px,calc(100% - 28px)); margin: auto }
.family-head { min-height: 76px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 }
.family-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; color: var(--navy); text-decoration: none }
.family-main { padding: 8px 0 40px }
.family-hero {
  padding: clamp(24px,5vw,52px);
  border-radius: 22px;
  color: white;
  background: radial-gradient(ellipse at 105% -30%,#26d3d755 0 48%,transparent 48.5%),
    radial-gradient(ellipse at 103% 120%,#6ac6ff38 0 34%,transparent 34.5%),
    linear-gradient(115deg,#08274f 8%,#06549a 66%,#007b89);
  box-shadow: 0 12px 26px #143f6725;
}
.family-hero p { max-width: 55ch; color: #ecf8ff }
.family-hero h1,.family-card h1,.family-card h2 { line-height: 1.15; margin: 0 0 .5em }
.family-hero h1,.family-card h1 { font-size: clamp(1.9rem,5vw,3rem) }
.family-card h2 { font-size: clamp(1.35rem,3vw,1.6rem) }
.family-card h3 { font-size: 1rem; margin: .85rem 0 .35rem }
.family-nav,.family-filter,.family-login-actions,.family-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.family-nav { margin: 16px 0 14px }
.family-nav .family-action { flex: 1 1 130px }
.family-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px }
.family-action,.family-calendar .dec-save,.family-calendar .dec-months a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #8dbce0;
  border-radius: 10px;
  background: #e6f4ff;
  color: #104475;
  text-align: center;
  text-decoration: none;
  font-weight: 730;
  cursor: pointer;
  transition: background-color .18s,border-color .18s,box-shadow .18s,transform .16s;
}
.family-action:hover,.family-calendar .dec-save:hover,.family-calendar .dec-months a:hover {
  background: #cfeaff;
  box-shadow: 0 3px 10px #0c4b7820;
}
.family-primary,.family-calendar .dec-months a[aria-current=true] { background: #075aa4; color: white; border-color: #075aa4 }
.family-primary:hover,.family-calendar .dec-months a[aria-current=true]:hover { background: #064b89; color: white }
.family-secondary { background: #ffffff1d; color: white; border-color: #a5dbef }
.family-secondary:hover { background: #ffffff36 }
.family-action:active,.family-calendar .dec-save:active,.family-calendar .dec-months a:active { transform: scale(.97) }
.family-action:disabled { opacity: .7; cursor: wait }
.family-card {
  min-width: 0; margin: 0 0 14px; padding: clamp(16px,3vw,28px);
  border: 1px solid var(--edge); border-radius: 16px; background: #fff;
  overflow-wrap: anywhere; scroll-margin-top: 12px;
  box-shadow: 0 5px 15px #143f670a;
}
.family-main>.family-card:first-child { max-width: 620px; border-top: 5px solid #1368b3 }
.family-next { border-top: 5px solid #1975b7; background: linear-gradient(180deg,#e8f6ff,#fff) }
.family-payment { border-top: 5px solid #008476; background: linear-gradient(180deg,#e5f9f3,#fff) }
.family-billing-cards { display: grid; gap: 12px; margin-top: 12px }
.family-billing-card { min-width: 0; padding: 12px; border: 1px solid var(--edge); border-radius: 10px; background: #fff }
.family-billing-card[data-billing=group] { border-left: 4px solid #1975b7; background: #f0f8ff }
.family-billing-card[data-billing=private] { border-left: 4px solid #008476; background: #f0fbf8 }
.family-billing-card[data-billing=legacy] { border-left: 4px solid #a26d14; background: #fff9ed }
.family-billing-card h3 { margin-top: 0 }
.family-billing-card p { margin: 6px 0 0 }
.family-guide { border-top: 5px solid #cc8712; background: linear-gradient(180deg,#fff6df,#fffdfa) }
.family-card input {
  display: block; min-height: 46px; width: min(100%,410px); padding: 8px 12px; margin: 5px 0 13px;
  border: 1px solid #8bb6d3; border-radius: 8px; background: #fff; color: var(--navy);
}
[data-family-result]:has(span:empty) { margin: 0 }
[data-family-result][data-state=sent] {
  padding: 12px 16px;
  border: 1px solid #8bd7c9;
  border-radius: 10px;
  background: #e5f9f3;
  color: #075349;
}
[data-family-result][data-state=sent] strong { display: block; margin-bottom: 4px }
[data-family-result] + .family-action { margin-top: 12px }
.family-login-actions { border-top: 1px solid var(--edge); margin-top: 18px; padding-top: 18px }
.family-demo-link { background: #cff6ee; color: #075349; border-color: #76cbbd }
.family-filter { margin: 0 0 14px }
.family-filter button { background: #fff; justify-content: flex-start; text-align: left }
.family-filter button:hover { background: #e0f1ff }
.family-filter button[aria-pressed=true] { background: #0b427c; border-color: #0b427c; color: white }
.family-filter button span { font-size: .875rem; font-weight: 600 }
.family-bookings { margin: 0; padding: 0; list-style: none }
.family-bookings li { padding: 10px 0; border-bottom: 1px solid var(--edge) }
.family-bookings li:last-child { border-bottom: 0 }
.family-tag,.family-demo { display: inline-block; padding: 3px 8px; border-radius: 7px; font-size: .875rem; font-weight: 650 }
.family-tag { background: #e9f1fa; color: #294b6b }
.family-tag[data-status=booked] { background: #d6edff; color: #104475 }
.family-tag:is([data-status=confirmed],[data-status=attended]) { background: #cbf2e7; color: #04554a }
.family-tag:is([data-status=rescheduled],[data-status=unavailable]) { background: #ffedc1; color: #693c00 }
.family-tag[data-status=missed] { background: #ffe6e6; color: #812424 }
.family-hero .family-demo { background: #ffecad; color: #5e3804; margin: 4px 0 0 }
.family-credit { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 8px 0 0; padding: 9px 12px; color: #075349; background: #cff6ee; border-radius: 8px }
.family-amount strong { color: #07584c; font-size: clamp(1.6rem,3vw,2.2rem) }
.family-amount span { display: block }
.family-main progress { display: block; width: 100%; height: 15px; margin: .7rem 0; border: 0; border-radius: 1em; background: #cee8e4; accent-color: #087f70 }
.family-main progress::-webkit-progress-bar { border-radius: 1em; background: #cee8e4 }
.family-main progress::-webkit-progress-value { border-radius: 1em; background: linear-gradient(90deg,#08746e,#149e84); animation: family-fill .7s ease-out }
.family-main progress::-moz-progress-bar { border-radius: 1em; background: #087f70 }
.family-history { padding: 12px 0 }
.family-history summary { list-style: none; justify-content: space-between; text-align: left }
.family-history summary::-webkit-details-marker { display: none }
.family-history summary::after { content: ''; display: block; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-inline: 3px }
.family-history[open] summary::after { transform: translateY(2px) rotate(225deg) }
.family-contact p { margin: 0 }
.family-calendar { padding: clamp(8px,2vw,16px); border-top: 5px solid #1975b7 }
.family-calendar .dec-schedule { margin: 0 }
.family-guide ol { padding-inline-start: 1.25em }
.family-guide li+li { margin-top: 6px }
@keyframes family-fill { from { opacity: .4; transform: scaleX(.04); transform-origin: left } to { opacity: 1; transform: none } }
@media(max-width:680px) { .family-grid { grid-template-columns: 1fr } }
@media(max-width:430px) {
  .family-brand span { display: none }
  .family-brand img { width: 42px; height: 42px }
  .family-head .family-home { padding-inline: 9px }
}
@media(prefers-reduced-motion:reduce) {
  .family-action,.family-main * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important }
}
.family-session-type { display: inline-block; margin-inline: 4px; color: #134c7d; font-size: .875rem; font-weight: 700 }
[data-training-kind=private] .family-session-type { color: #07584c }
.family-invoices > li { padding-block: 16px }
.family-invoices p { margin: 6px 0 }
.family-invoices ul { margin-top: 8px; padding-inline-start: 20px }
.family-invoices ul li { border: 0; padding: 2px 0 }
.family-settings { width: min(100%,700px); margin-inline: auto }
.family-settings h1 { line-height: 1.15; font-size: clamp(1.9rem,5vw,2.7rem) }
.family-settings-form { margin-top: 12px; padding: clamp(12px,3vw,20px); border: 1px solid var(--edge); border-radius: 12px; background: #f1f9ff }
.family-settings-form label { display: block; font-weight: 650 }
.family-settings-message { padding: 12px 16px; border-radius: 10px; background: #cff6ee; color: #075349 }
.family-settings-message[data-error=true] { background: #ffedc1; color: #693c00 }
