/* ==========================================================================
   STG Portal V3: Families (hub, family page, My Family) + public pages (invite, reset).
   Built on app.css / stg.css / portal.css tokens. No pink, no line art.
   ========================================================================== */

/* ---------- Hub ---------- */
.fm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fm-tile { min-height: 0; padding: 12px; gap: 4px; justify-content: flex-start; text-decoration: none; cursor: pointer; transition: box-shadow .15s, transform .15s; }
@media (hover: hover) { .fm-tile:hover { box-shadow: var(--shadow-1); transform: translateY(-1px); } }
.fm-tile .t-value { font-size: 28px; min-height: 28px; display: block; }
.fm-tile .t-label { font-size: 12.5px; line-height: 1.25; }
.fm-tile-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-strong); margin-bottom: 6px; }
.fm-tile-ic .ico { width: 18px; height: 18px; }
.fm-tile.violet .fm-tile-ic { background: var(--violet-soft); color: var(--violet); }
.fm-tile.gold .fm-tile-ic { background: var(--gold-soft); color: var(--amber); }
.fm-tskel { display: block; width: 34px; height: 24px; border-radius: 8px; }
.fm-tile .t-value:empty::after { content: "–"; color: var(--faint); }
.fm-tile[data-nav="list?t=profile"] .t-value:empty::after { content: ""; }
.fm-hub .fm-side .section, .fm-hub .fm-main .section { margin-top: 22px; }
.fm-tools { top: 0; }
.fm-glist .row .pill { flex: none; }
.fm-glist .chev { width: 18px; height: 18px; color: var(--faint); flex: none; }
@media (min-width: 1024px) {
  .fm-tiles { grid-template-columns: repeat(3, minmax(0, 220px)); gap: 14px; }
  .fm-tile { padding: 16px; }
  .fm-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 28px; align-items: start; }
  .fm-cols.is-one { grid-template-columns: minmax(0, 1fr); }
  .fm-side { position: sticky; top: 64px; }
  .fm-glist { display: grid; grid-template-columns: 1fr 1fr; }
  .fm-glist .row + .row::before { display: none; }
  .fm-glist .row { border-bottom: 1px solid var(--line); }
  .fm-glist .row:nth-child(odd) { border-right: 1px solid var(--line); }
}
/* ≥1024 the shell keeps .page-body at 1180px; the hub uses that full width */

/* ---------- Family page ---------- */
.fm-ghead { display: flex; gap: 16px; align-items: flex-start; position: relative; }
.fm-ghead .fm-open { flex: none; }
@media (max-width: 520px) { .fm-ghead { flex-wrap: wrap; } .fm-ghead .fm-open { width: 100%; } }
.fm-acts { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0 0; }
@media (min-width: 560px) { .fm-acts { grid-template-columns: repeat(auto-fit, minmax(170px, max-content)); } }
.fm-family .ax-ugrid .row { align-items: flex-start; }
.fm-family .ax-ugrid .row > a.tap:first-child { margin-top: 2px; }
.fm-family .ax-ugrid .row .btn-sm { margin-top: 4px; }

/* ---------- My Family ---------- */
.fm-me { display: flex; align-items: center; gap: 14px; }
.fm-me b, .fm-me small { display: block; overflow-wrap: anywhere; }
.fm-me small { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.fm-kids { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .fm-kids { grid-template-columns: 1fr 1fr; } }
.card.fm-kid + .card.fm-kid { margin-top: 0; }
.fm-kid { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.fm-kid .grow { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.fm-kid-name { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 650; line-height: 1.15; }
.fm-kid small { color: var(--muted); font-size: var(--fs-sm); }
.fm-kid .pill { margin-top: 4px; }
.fm-kid .chev { color: var(--faint); width: 20px; height: 20px; flex: none; }
.fm-help { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; }
.fm-help b { display: block; }
.fm-help p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.fm-help-text { flex: 1; min-width: 0; }
.fm-help-btn { flex: none; align-self: center; white-space: nowrap; }
@media (max-width: 560px) { .fm-help { flex-wrap: wrap; } .fm-help-btn { margin-left: 48px; } }

/* ---------- Public pages (invite, reset): full-bleed like sign-in ---------- */
.page[data-route="invite"] .pg-head, .page[data-route="reset"] .pg-head { display: none; }
.page[data-route="invite"] .page-bare, .page[data-route="reset"] .page-bare { overflow-y: auto; }
.page[data-route="invite"] .auth-wrap, .page[data-route="reset"] .auth-wrap { flex: 1; min-height: 100%; }
.pb-card { max-width: 440px; }
.pb-card .auth-logo { height: 54px; }
.pb-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-strong); }
.pb-ic.coral { background: var(--coral-soft); color: var(--coral-strong); }
.pb-ic.amber { background: var(--amber-soft); color: var(--amber); }
.pb-ic.green { background: var(--green-soft); color: var(--green); }
.pb-card .auth-title { font-size: 27px; }
.pb-card .auth-sub b { color: var(--text); }
.pb-state .btn { margin-top: 4px; }
.pb-kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: -8px 0 20px; }
.pb-kids .pill { height: 28px; padding: 0 12px; font-size: 13px; }
.pb-seg { margin-bottom: 18px; }
.pb-seg button { font-size: 13px; padding: 0 6px; }
.pb-who { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-input); background: var(--surface-3); font-size: var(--fs-sm); margin-bottom: 14px; color: var(--text-2); }
.pb-who .ico { color: var(--teal-strong); flex: none; }
.pb-hint { margin: -6px 4px 14px; }
.pb-exp { text-align: center; font-size: var(--fs-xs); color: var(--faint); margin: 16px 0 0; }
.ax-opt { font-style: normal; font-weight: 600; color: var(--faint); font-size: var(--fs-xs); margin-left: 4px; }

/* Gymnast profile: Previous Assignments accordion under Current Team (record view, owner 11/11) */
.rec-acc { margin-top: 12px; padding: 0; overflow: hidden; }
.rec-acc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 700; color: var(--text); }
.rec-acc > summary::-webkit-details-marker { display: none; }
.rec-acc .rec-acc-chev { transition: transform .2s ease; }
.rec-acc[open] .rec-acc-chev { transform: rotate(180deg); }
.rec-acc-list { border-top: 1px solid var(--line); max-height: 420px; overflow-y: auto; }
.rec-acc-empty { padding: 0 16px 14px; margin: 0; }
