.owner-site .family-record{max-width:1000px;margin-inline:auto;gap:12px;font-family:Arial,Helvetica,sans-serif}
.family-record .family-overview{padding:16px;border:1px solid var(--line);border-radius:14px;margin:0}
.record-parent-heading{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;align-items:center}
.record-parent-name{min-width:0}.family-record .record-parent-name h1{font-family:inherit;font-size:1.35rem;line-height:1.3;letter-spacing:normal;margin:0 0 5px;overflow-wrap:anywhere}
.record-parent-name>a{font-size:.875rem}.record-parent-facts{display:grid;grid-template-columns:.7fr 1fr 1fr;gap:8px;margin:14px 0 8px;padding-top:12px;border-top:1px solid var(--line)}
.record-parent-facts dt,.record-child-facts dt{font-size:.74rem;line-height:1.4;color:var(--muted)}
.record-parent-facts dd,.record-child-facts dd{margin:3px 0 0;font-size:.875rem;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.record-parent-status{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.8rem}
.family-record .record-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0;padding:0;border:0;position:static}
.family-record .record-tabs a{display:flex;justify-content:center;align-items:center;gap:8px;min-height:44px;padding:9px 12px;border:1px solid var(--line);border-bottom:3px solid transparent;border-radius:8px 8px 0 0;font-size:.9rem;text-decoration:none}
.family-record .record-tabs a[aria-current=page]{border-bottom-color:var(--red);background:var(--owner-soft,#fff0f2)}
.family-record :is(.children-panel,.history-panel){padding:0;border-radius:14px;overflow:hidden;margin:0;border:1px solid var(--line)}
.family-record .panel-heading{padding:14px;gap:10px}.family-record .panel-heading h2{font-family:inherit;font-size:1.15rem;margin:0}
.record-children{list-style:none;margin:0;padding:0}.record-child{padding:14px;border-top:1px solid var(--line)}
.record-child-heading,.record-child-payment{display:flex;align-items:center;justify-content:space-between;gap:10px}.record-child-heading h3{font-family:inherit;font-size:1rem;margin:0;overflow-wrap:anywhere}
.record-child-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0}
.record-child-facts .receipt-amount{font-weight:400;font-size:.8rem}.record-child-payment{padding-top:4px}
.owner-site .family-record .button,.owner-site .parent-child-records .button{background:#b51e33;color:#fff;border:1px solid #c54455;min-height:44px;padding:9px 12px;border-radius:8px;font-size:.8rem;line-height:1.35;white-space:normal}
.owner-site .family-record .button:hover,.owner-site .parent-child-records .button:hover{background:#971b2c}
.days-remaining{font-weight:700;font-size:.85rem}.owner-site .due-urgent{color:#b4192d;font-weight:700}html[data-theme=dark] .owner-site .due-urgent{color:#ff99a6}
.family-record .history-filter{padding:0 14px 14px}.history-filter label{display:block;font-size:.85rem;margin-bottom:6px}
.history-filter>div{display:flex;gap:8px}.history-filter select{min-width:0;flex:1;font-size:16px;min-height:44px;padding:8px}
.family-record .payment-timeline{padding:0 14px 4px}.family-record .payment-timeline>li{padding:14px 0 14px 18px}
.family-record .timeline-top{gap:10px}.family-record .timeline-top time{font-size:.85rem}.family-record .timeline-top h3{font-family:inherit;font-size:.95rem}
.family-record .timeline-top>strong{font-size:1rem;white-space:normal;text-align:right}.family-record .timeline-top small{font-size:.7rem}
.family-record .history-coverage-list{margin:8px 0;padding:0}.family-record .history-coverage-list li{display:flex;flex-wrap:wrap;gap:4px 12px;padding:8px 0;font-size:.85rem}.family-record .history-coverage-list li small{flex-basis:100%;color:var(--muted)}
.owner-site .parent-record-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:14px}
.parent-record-row .parent-identity{grid-column:1;min-width:0}.parent-record-row>.status-badge{grid-column:2;grid-row:1;align-self:start}
.parent-record-row .parent-due{grid-column:1;text-align:left;min-width:0}.parent-record-row .row-action{grid-column:2;align-self:center;padding:10px;min-height:44px;font-size:.8rem}
.parent-child-records{grid-column:1/-1;list-style:none;padding:0;margin:0;border-top:1px solid var(--line)}
.parent-child-records>li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.parent-child-records>li>div{min-width:0}.parent-child-records strong{font-size:.9rem;overflow-wrap:anywhere}.parent-child-records small{display:block;font-size:.75rem;color:var(--muted);margin-top:3px}
.parent-child-records .button{flex-shrink:0}.initial-amount{margin-block:14px}.initial-amount select{width:100%;min-height:48px;font-size:16px}
@media(max-width:600px){.owner-site .owner-main{padding-inline:12px}.family-record .family-overview{padding:12px}.record-parent-heading{grid-template-columns:34px minmax(0,1fr) auto;gap:8px}.family-record .record-parent-name h1{font-size:1.15rem}.record-parent-facts{gap:6px}.record-parent-facts dd{font-size:.78rem}.record-parent-facts dt{font-size:.7rem}.record-child-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}.family-record .record-edit{padding:8px;font-size:.75rem}.family-record .panel-heading{padding:12px}.record-child{padding:12px}.parent-record-row .parent-due{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}.parent-record-row .row-action{grid-column:1/-1;width:100%}.parent-record-row .parent-due small{margin-left:auto}.owner-site .parent-panel{padding:12px}.owner-site .parent-record-row{padding:12px}.parent-child-records .button{padding:9px;font-size:.75rem}}

/* Explicit row placement avoids the legacy mobile grid moving children below navigation. */
.owner-site .parent-record-row .parent-child-records{grid-row:2;grid-column:1/-1}
.owner-site .parent-record-row .parent-due{grid-row:3}
.owner-site .parent-record-row .row-action{grid-row:3}
@media(max-width:600px){
.owner-site .owner-main{width:calc(100% - 24px);padding-inline:0}
.owner-site .parent-panel{padding:0}
.owner-site .parent-record-row .parent-due{grid-row:3}
.owner-site .parent-record-row .row-action{grid-row:4}
}

/* Shared current-membership signal. Historical receipts deliberately use blue, not late/current. */
.owner-site .membership-highlight{--membership-ink:#14633e;--membership-bg:#e8f5ed;--membership-edge:#80ad95;display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px 8px;max-width:100%;padding:4px 7px;border:1px solid var(--membership-edge);border-radius:7px;background:var(--membership-bg);color:var(--membership-ink);font-variant-numeric:tabular-nums;line-height:1.45;vertical-align:middle}
.owner-site .membership-highlight :is(.membership-date,.membership-days){color:inherit;font-size:.8rem;font-weight:750;white-space:normal}
.owner-site .membership-date{white-space:nowrap!important}
.owner-site .membership-expired{--membership-ink:#a71930;--membership-bg:#fff0f2;--membership-edge:#cb7b89}
.owner-site :is(.membership-soon,.membership-today){--membership-ink:#8a4300;--membership-bg:#fff2df;--membership-edge:#bf8547}
.owner-site .membership-expired{border-inline-start:3px solid var(--membership-ink)}
.owner-site .membership-unknown{--membership-ink:#64418b;--membership-bg:#f3edfa;--membership-edge:#ad94c9}
.owner-site .membership-history{--membership-ink:#245886;--membership-bg:#edf4fb;--membership-edge:#8eacc8}
html[data-theme=dark] .owner-site .membership-highlight{--membership-ink:#9fe5c5;--membership-bg:#193a31;--membership-edge:#5b9a83}
html[data-theme=dark] .owner-site .membership-expired{--membership-ink:#ffb2bd;--membership-bg:#40242e;--membership-edge:#b96477}
html[data-theme=dark] .owner-site :is(.membership-soon,.membership-today){--membership-ink:#ffca8a;--membership-bg:#3d2d1b;--membership-edge:#c28a4b}
html[data-theme=dark] .owner-site .membership-unknown{--membership-ink:#d9c6ff;--membership-bg:#322944;--membership-edge:#a68dc8}
html[data-theme=dark] .owner-site .membership-history{--membership-ink:#b7d7ff;--membership-bg:#21374e;--membership-edge:#759ac3}
.owner-site .parent-due .membership-highlight{margin-top:4px}.owner-site .parent-child-records .membership-highlight{margin-top:4px}
.owner-site .record-parent-facts dd:has(.membership-highlight){white-space:normal}
.owner-site .record-parent-facts .membership-date{font-size:inherit}
.owner-site .record-parent-status{flex-wrap:wrap}
.owner-site .payment-person>.membership-highlight{align-self:flex-start}
.owner-site .manual-quote .membership-highlight{display:flex;width:fit-content;margin-top:8px}
.owner-site .manual-quote .membership-date{font-size:1.4rem}
.owner-site .manual-quote .membership-days{font-size:.85rem}
.owner-site .history-coverage .membership-highlight{margin-left:4px}
.amount-editor{border:0;min-width:0;padding:0;margin:0 0 20px}.amount-editor legend{font-weight:700;font-size:1rem}.amount-editor>p{margin:8px 0 14px}
.amount-option-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:end;margin-bottom:12px}
.amount-option-row .field{margin:0}.amount-option-row .field label{margin-bottom:5px}.amount-option-row input[type=number]{width:100%;min-height:44px;font-size:16px}
.amount-remove{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px;cursor:pointer;font-size:.85rem}
.owner-site .amount-remove input[type=checkbox]{appearance:auto;width:20px;height:20px;min-height:20px;margin:0;accent-color:var(--red)}
.amount-remove-note{grid-column:1/-1;margin:0;color:var(--red);font-size:.8rem}.amount-option-row.is-removing input[type=number]{border-style:dashed}
.amount-option-row input[readonly]{opacity:.75}.amount-option-row .field-validation-error{display:block}
@media(max-width:600px){
 .owner-site .enrollment-page>.back-link{margin-bottom:8px;min-height:44px;display:inline-flex;align-items:center}
 .owner-site .enrollment-page .page-heading{margin:0 0 14px}
 .owner-site .enrollment-page .page-heading h1{margin-top:5px;font-size:1.7rem}
 .owner-site .enrollment-page .page-subtitle{margin-top:5px;font-size:.8rem}
 .owner-site .enrollment-page .form-card{padding:14px}
 .owner-site .enrollment-parent{margin-bottom:12px}
 .owner-site .enrollment-parent h2{font-size:1.15rem;margin-bottom:14px}
 .owner-site .enrollment-page .field{margin-bottom:12px}
 .owner-site .enrollment-page .field-pair{gap:0}
 .owner-site .enrollment-page input:not([type=hidden]):not([type=checkbox]),.owner-site .enrollment-page select{min-height:44px;padding:9px 10px;font-size:16px}
 .owner-site .enrollment-page .field label{margin-bottom:6px}
 .owner-site .enrollment-page .field-help{font-size:.75rem;line-height:1.5;margin-top:6px}
 .owner-site .enrollment-page .count-field{margin-bottom:0}
 .owner-site .enrollment-children{gap:12px}
 .owner-site .enrollment-children>.field-help{margin:0}
 .owner-site .enrollment-page .draft-heading{margin-bottom:12px}
 .owner-site .enrollment-page .initial-amount{margin-block:10px}
 .owner-site .record-parent-facts{grid-template-columns:.6fr .85fr 1.15fr}
 .owner-site .record-parent-facts .membership-highlight{padding:3px 5px}
 .owner-site .record-child-payment{flex-wrap:wrap}
 .owner-site .settings-page .form-card{padding:16px}
}
@media(forced-colors:active){.owner-site .membership-highlight{border-color:CanvasText;color:CanvasText;background:Canvas}}

@media(max-width:600px){
 .owner-site .parent-record-row{gap:8px;padding:10px}
 .owner-site .parent-record-row .parent-identity{gap:8px}
 .owner-site .parent-record-row .parent-identity h3{margin:0;line-height:1.35}
 .owner-site .parent-record-row .parent-identity p{margin:2px 0 0;gap:4px}
 .owner-site .parent-record-row .parent-identity a{min-height:28px;padding-block:2px}
 .owner-site .parent-record-row .avatar{width:34px;height:34px;flex:none}
 .owner-site .parent-child-records>li{padding:8px 0}
 .owner-site .parent-list{gap:8px;padding:8px}
 .owner-site .parents-directory .page-heading{margin-bottom:14px}
 .owner-site .parents-directory .parent-tools{padding-bottom:8px}
 .owner-site .parents-directory .panel-heading{padding:14px}
}

.owner-site .search-form[data-live-search]{display:block;width:100%}
.owner-site .search-form[data-live-search]>label{display:block;margin-bottom:6px}
.owner-site .search-form[data-live-search] #parent-search{width:100%;padding-inline:12px}
.owner-site .search-live-status{font-size:.75rem;line-height:1.5;color:var(--muted);margin:0;padding:0 14px 10px;min-height:24px}
.owner-site .search-live-status.is-quiet:not([data-search-error]){position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.owner-site [data-live-results][aria-busy=true]{opacity:.7}
@media(prefers-reduced-motion:reduce){.owner-site [data-live-results]{transition:none}}

/* Reversible archive controls live only on edit pages. */
.archive-edit-fields{border:0;padding:0;margin:0;min-width:0}
.archive-edit-fields:disabled{opacity:.72}
.archive-action{margin-top:20px}
.archive-action h2{font-size:1.25rem;margin:0 0 10px}
.archive-action .confirm-payment{margin:16px 0}
.archive-action .confirm-payment input{flex-shrink:0;min-width:22px;min-height:22px}
.archive-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:12px}
.archive-list h3{margin:0 0 8px;overflow-wrap:anywhere}
.archive-list ul{list-style:none;padding:0;margin:14px 0 0}
.archive-list li li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0}
.archive-list li li a{min-height:44px;display:inline-flex;align-items:center}
.archive-link{margin:8px 0 16px}
.archive-directory .parent-panel{padding:16px}
@media(max-width:640px){.archive-action{padding:14px;margin-top:12px}.archive-list>.form-card{padding:14px}.archive-directory .parent-panel{padding:12px}}

/* A complete family is one card; the status belongs to its parent heading. */
.owner-site .parent-list{display:grid;gap:16px;padding:14px;background:var(--paper);list-style:none}
.owner-site .parent-list>li{border:0;padding:0;min-width:0}
.owner-site .parent-record-row{border:1px solid var(--line);border-radius:14px;background:var(--owner-surface,#fff);padding:16px;box-shadow:0 2px 8px #14213308}
.owner-site .parent-record-row:hover{background:var(--owner-surface,#fff)}
.owner-site .parent-record-row .parent-identity{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:10px;align-items:start}
.owner-site .parent-record-row .parent-identity h3{margin:0}
.owner-site .parent-record-row .parent-identity p{margin:2px 0 0;gap:4px}
.owner-site .parent-record-row .parent-identity a{min-height:28px;padding-block:2px}
.owner-site .parent-record-row .parent-identity .status-badge{display:inline-flex;align-self:start;margin:0;font-size:.875rem;line-height:1.3;font-weight:700;padding:5px 8px;border:1px solid currentColor;border-radius:8px}
.owner-site .parent-record-row{row-gap:8px}
.owner-site .parent-record-row .parent-child-records{grid-row:2;border-top:1px solid var(--line);padding:12px 0 0;display:grid;gap:10px}
.owner-site .parent-child-records>li{border:1px solid var(--line);border-left:3px solid var(--blue);border-radius:9px;background:var(--owner-soft,#f5f7fa);padding:12px}
.owner-site .parent-record-row .row-action{grid-row:3;grid-column:1/-1;justify-self:end;width:auto;display:inline-flex;justify-content:center;gap:8px;padding:10px 16px;border:1px solid var(--ink);border-radius:8px;background:transparent;color:var(--ink);text-decoration:none;font-weight:700}
.owner-site .parent-record-row .row-action:hover{background:var(--owner-soft,#f5f7fa)}
.owner-site .parent-record-row .row-action:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
@media(max-width:600px){.owner-site .parent-list{gap:12px;padding:8px}.owner-site .parent-record-row{padding:10px}.owner-site .parent-child-records>li{padding:10px 8px;gap:8px}.owner-site .parent-record-row .row-action{width:100%;grid-row:3}}

/* One child's cash action and optional manual SMS composition stay together. */
.child-record-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:110px;max-width:300px}
.owner-site .parent-child-records .child-record-actions{justify-self:end}
.owner-site .child-record-actions .sms-compose{background:transparent;color:var(--ink);border:1px solid var(--line)}
.owner-site .child-record-actions .sms-compose:hover{background:var(--owner-surface,#fff)}
.sms-reminder{display:flex;flex-direction:column;gap:2px}
.sms-fallback{font-size:.75rem;max-width:300px}.sms-fallback summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:center;text-decoration:underline}
.sms-fallback p{font-size:inherit;line-height:1.5;margin:4px 0}.sms-fallback label{font-size:inherit;display:block}.sms-fallback textarea{width:100%;font-size:16px;line-height:1.5;margin-top:4px;resize:vertical}
.sms-unavailable{font-size:.75rem;color:var(--muted);max-width:180px;line-height:1.5}
@media(max-width:600px){.child-record-actions{min-width:96px;max-width:150px}.record-child-payment .child-record-actions{max-width:none;width:100%}.sms-fallback[open]{max-width:100%}.parent-child-records>li:has(.sms-fallback[open]){display:grid;grid-template-columns:1fr}.parent-child-records>li:has(.sms-fallback[open]) .child-record-actions{max-width:none;width:100%}}

/* Parent name leads the family hierarchy on both directory surfaces. */
.owner-site .parent-record-row .parent-identity h3{font-size:1.125rem;line-height:1.35;overflow-wrap:anywhere}
.archive-directory .parent-panel h2{font-size:1.25rem;line-height:1.35;margin:0 0 12px}.archive-directory .archive-list h3{font-size:1.125rem;line-height:1.35}

/* Editing personal details is secondary to recording an actual payment. */
.owner-site .family-record .record-edit{background:var(--owner-soft,#f1f4f8);color:var(--ink);border-color:var(--muted);box-shadow:none}
.owner-site .family-record .record-edit:hover{background:var(--paper);color:var(--ink);border-color:var(--muted)}
.owner-site .family-record .record-edit:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
/* Receipt corrections share the compact owner layout and native dialog focus handling. */
.receipt-actions{display:flex;flex-wrap:wrap;gap:.5rem;grid-column:1/-1;margin-top:.35rem}
.receipt-actions .button{min-height:44px}
.correction-detail{margin-block:1rem;border:1px solid var(--line);border-radius:12px;padding:.7rem}
.correction-detail summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700}
.correction-periods{list-style:none;padding:0;display:grid;gap:.7rem}
.correction-periods li{display:grid;gap:.25rem;padding:.6rem;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere}
.correction-dialog textarea{width:100%;box-sizing:border-box}
.correction-dialog .form-actions{flex-wrap:wrap}
.correction-dialog .payment-modal-heading h1{margin-top:.5rem}

/* Family section links and their selected panel form one compact, continuous card.
   These are document links, not client-side ARIA tabs: native keyboard navigation applies. */
.family-record .family-tabbed{min-width:0;margin-top:12px;border:1px solid var(--line);border-radius:12px;background:var(--owner-surface,#fff);overflow:hidden}
.family-record .family-tabbed .record-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0;padding:0;border:0}
.family-record .family-tabbed .record-tabs a{margin:0;min-height:48px;border:0;border-bottom:3px solid transparent;border-radius:0;background:var(--paper);color:var(--muted);font-weight:600}
.family-record .family-tabbed .record-tabs a+a{border-left:1px solid var(--line)}
.family-record .family-tabbed .record-tabs a[aria-current=page]{background:var(--owner-surface,#fff);color:var(--red);border-bottom-color:var(--red);font-weight:800}
.family-record .family-tabbed .record-tabs a:focus-visible{outline:3px solid var(--blue);outline-offset:-4px}
.family-record .family-tabbed :is(.children-panel,.history-panel){border:0;border-radius:0;margin:0;overflow:visible}
.family-record .family-tabbed .panel-heading{border:0;padding:12px 14px;margin:0}
.family-record .family-tabbed .children-toolbar{justify-content:flex-end;padding:10px 14px}
.family-record .family-tabbed .children-toolbar:not(:has(a)){display:none}
.family-record .family-tabbed .record-child:target{outline-offset:-3px}
html[data-theme=dark] .family-record .family-tabbed .record-tabs a[aria-current=page]{background:#3b2532;color:#ffb2bd;border-bottom-color:#ff99a6}
@media(max-width:600px){.family-record .family-tabbed{margin-top:10px}.family-record .family-tabbed .children-toolbar{padding:8px 12px}.family-record .family-tabbed .record-tabs a{padding:10px 8px}}
@media(forced-colors:active){.family-record .family-tabbed .record-tabs a[aria-current=page]{border-bottom-color:Highlight;color:Highlight}}

/* Attendance history is a neutral secondary action, distinct from payment. */
.owner-site .child-record-actions .child-attendance-link {color:#334155;background:#f1f5f9;border:1px solid #94a3b8;box-shadow:none;}
.owner-site .child-record-actions .child-attendance-link:hover {color:#0f172a;background:#e2e8f0;border-color:#64748b;}
.owner-site .child-record-actions .child-attendance-link:focus-visible {outline:3px solid #475569;outline-offset:3px;}
[data-theme="dark"] .owner-site .child-record-actions .child-attendance-link {color:#e2e8f0;background:#263449;border-color:#64748b;}
[data-theme="dark"] .owner-site .child-record-actions .child-attendance-link:hover {color:#fff;background:#334155;border-color:#94a3b8;}
[data-theme="dark"] .owner-site .child-record-actions .child-attendance-link:focus-visible {outline-color:#cbd5e1;}