/* Shared visual contract. Loaded last on every portal page. */
:root{--font-ui:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-family:var(--font-ui);--text-body:15px;--text-label:13px;--text-small:12px;--heading-page:clamp(24px,1.25rem + .6vw,28px);--heading-panel:17px;--heading-item:15px;--radius-panel:12px;--space-panel:22px;--space-gap:20px}
@media screen{
 html{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body,body *{font-family:var(--font-ui)!important}
 body{font-size:var(--text-body)!important;line-height:1.55!important;color:var(--ink);background:var(--page)}
 .main h1,.main .page-heading h1,.main .student-heading h1,.main .leadership-home h1,.main .parent-welcome h1,.main .coach-workspace h1{font-size:var(--heading-page)!important;line-height:1.3!important;letter-spacing:-.025em;font-weight:700!important;overflow-wrap:anywhere}
 .main h2,.main .panel-heading h2{font-size:var(--heading-panel)!important;line-height:1.45!important;font-weight:700!important;letter-spacing:0}
 .main h3{font-size:var(--heading-item)!important;line-height:1.5!important;font-weight:700!important}
 .page-heading p,.student-heading p,.main .muted{font-size:14px;line-height:1.6}
 .main small,.field-help,.main .field-help{font-size:var(--text-small)!important;line-height:1.6;color:var(--muted)}
 .main .eyebrow{font-size:11.5px!important}.main :is(.document-row,.coach-member,.staff-task,.staff-event,.staff-group,.staff-news-row) strong{font-size:14px!important}
 .main :is(td,th) strong{font-size:inherit!important}.main :is(.lead-note,.lead-legend,.account-login-note){font-size:12px!important;line-height:1.6}
 .page-heading{gap:16px;flex-wrap:wrap;align-items:flex-start;margin-bottom:22px}
 .page-heading>div,.page-heading .button-row,.main>div,.main>section,.main>form{min-width:0}
 .main{padding:28px clamp(16px,2.2vw,36px)!important;min-width:0;width:100%}
 .panel{border-color:var(--line);border-radius:var(--radius-panel);background:var(--surface);min-width:0}
 .panel-heading{padding:16px 20px!important;gap:12px;flex-wrap:wrap}
 .form-panel{padding:var(--space-panel)!important;min-width:0}
 .form-panel label:not(.checkbox-label),.coach-filters label,.account-profile-fields label,.account-password-panel>label{font-size:var(--text-label)!important;font-weight:600;line-height:1.5;margin-bottom:6px}
 .form-panel input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.form-panel select,.form-panel textarea{width:100%;max-width:100%}
 input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{font-size:14px!important;line-height:1.5;min-height:44px;max-width:100%;border-color:#c6d6e8;border-radius:7px;box-shadow:none}
 textarea{resize:vertical;min-height:90px}
 input[type=checkbox],input[type=radio]{width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px;accent-color:var(--blue)}
 .checkbox-label{gap:10px;min-height:44px;line-height:1.55}
 .button{font-size:14px!important;line-height:1.45!important;font-weight:600!important;min-height:44px;padding:10px 14px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;max-width:100%;white-space:normal;text-align:center}
 .button.primary{background:var(--blue);color:white;border-color:var(--blue)}
 .button.danger{border-color:#ba4155;color:#a42438;background:white}
 .button-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
 .form-actions{gap:10px;flex-wrap:wrap;margin-top:20px}
 .sidebar nav a{font-size:14px!important;line-height:1.5;min-height:44px;padding:11px 14px}
 .sidebar nav a>span{min-width:0;overflow-wrap:anywhere}
 .topbar-title strong{font-size:16px!important;line-height:1.4}
 .account strong{font-size:13px!important;line-height:1.5;overflow-wrap:anywhere}
 .account span{font-size:12px;line-height:1.5}
 .status{font-size:12px!important;line-height:1.45!important;border-radius:5px;padding:4px 8px;white-space:normal}
 .main table{font-size:13px;line-height:1.55}
 .main th,.main td{font-size:13px!important;padding:12px 14px;overflow-wrap:anywhere}
 .main th{font-weight:600}
 .table-wrap,.table-scroll,.lead-table-scroll,.attendance-sheet-wrap{max-width:100%;overscroll-behavior-x:contain}
 .main .portfolio-criterion h2{font-size:13px!important}.main .portfolio-criterion h3{font-size:11px!important}
 .main .portfolio-sheet h1{font-size:26px!important}.main .portfolio-sheet .status{font-size:11px!important}
 .main .portfolio-form .portfolio-area-heading h2{font-size:17px!important}
 .mobile-bottom-nav a{line-height:1.3!important;font-size:11px!important}
 .mobile-bottom-nav span{overflow-wrap:anywhere;max-width:100%}
 .login-card h2{font-size:26px!important;line-height:1.3!important}.error-page h1{font-size:24px!important;line-height:1.35!important}
 .footer{font-size:12px;line-height:1.6;gap:12px;flex-wrap:wrap}
 .field-help{margin:7px 0 14px}.message-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;margin:14px 0;font-size:15px}
 .materials-workspace{max-width:1280px;margin:auto;display:grid;gap:var(--space-gap);min-width:0}
 .materials-workspace .page-heading,.materials-workspace>.panel{margin:0}
 .material-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.5fr);gap:18px;margin-bottom:18px}
 .material-fields>div{min-width:0}.material-fields label{margin-top:0}
 .material-card-heading{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:12px}
 .material-card-heading>div{min-width:0;flex:1}.material-card-heading .field-help{margin-bottom:0}
 .video-card,.private-message{padding:22px;border-top:1px solid var(--line);min-width:0}
 .video-card video{display:block;width:100%;height:auto;aspect-ratio:16/9;max-height:460px;background:#071e33;object-fit:contain;border-radius:8px;margin:18px 0}
 .video-options{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}.video-options summary{cursor:pointer;padding:10px 0;font-size:14px;font-weight:600}
 .inline-video-form{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:12px 0}
 .video-delete{margin-top:12px}.video-delete summary{color:#a42438}.video-delete p{margin:12px 0}
 .upload-progress{display:block;width:100%;height:14px;margin:18px 0 10px;accent-color:var(--blue)}.upload-progress[hidden]{display:none}
 .material-empty{padding:28px 22px}.material-empty p{margin-top:8px;color:var(--muted);font-size:14px}
 .message-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:20px}
 .message-group{padding:22px;color:var(--ink)}.message-group p{margin:8px 0 18px;color:var(--muted)}.message-group>span{color:var(--blue);font-size:14px}
 .message-recipients{margin:0 0 20px!important}.message-recipients legend{font-size:14px;font-weight:600;padding:0 6px}
 .private-message-preview{margin-bottom:20px}.private-message-preview .document-row{color:var(--ink);gap:14px;flex-wrap:wrap}.private-message-preview .document-row>span{font-size:13px;color:var(--blue)}
 .nav-message-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:11px;background:#d9eafb;color:#123c6c;margin-left:auto;font-size:11px;font-weight:700;padding:2px 6px}
 @media(max-width:900px){.account>div:last-of-type{max-width:160px}.main{padding-inline:20px!important}.materials-workspace{gap:18px}}
 @media(max-width:720px){
  :root{--space-panel:18px;--space-gap:16px;--heading-page:24px;--heading-panel:17px}
  .main{padding:20px 16px 100px!important}.main .page-heading{gap:12px;margin-bottom:18px}.materials-workspace .page-heading{margin-bottom:0}
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{font-size:16px!important;min-height:46px}
  .form-panel{padding:18px 16px!important}.panel-heading{padding:16px!important}.form-panel label:not(.checkbox-label){font-size:14px!important}
  .topbar-title strong{font-size:12px!important}.topbar-title span{font-size:11px}.topbar{padding-inline:16px;gap:8px}
  .topbar .account{gap:8px}.account .language-switcher{flex-shrink:0}.account strong{font-size:12px!important}
  .main h1,.main .page-heading h1,.main .student-heading h1,.main .leadership-home h1,.main .parent-welcome h1{font-size:24px!important}
  .main th,.main td{font-size:13px!important;padding:11px 10px}.status{font-size:11px!important}
  .material-fields{grid-template-columns:1fr;gap:16px}.video-card,.private-message{padding:18px 16px}.video-card video{max-height:360px;margin:16px 0}
  .inline-video-form{gap:10px}.inline-video-form>.button{width:100%}.material-empty{padding:22px 16px}
  .message-groups{gap:16px}.message-group{padding:20px}.video-card .button-row>.button,.materials-workspace .form-actions>.button{width:100%}
  .materials-workspace .page-heading>.button{width:100%}.footer{padding-inline:16px}.main .portfolio-sheet h1{font-size:24px!important}
 }
 @media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
}
@media print{.video-card video,.video-options,[data-video-upload],.message-recipients,.private-message form{display:none!important}.message-body{white-space:pre-wrap}}

@media screen{
 .coach-member{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:16px}.coach-member-actions{margin-left:auto;justify-content:flex-end;flex:0 1 auto}.coach-member>div:not(.coach-member-actions){min-width:120px}
 .form-panel .checkbox-label{font-size:14px!important;font-weight:400}
 .form-panel fieldset{min-width:0;max-width:100%}.form-panel label{overflow-wrap:anywhere}
 input::file-selector-button{font:inherit}
 .student-results-link>.button{flex-shrink:0;min-width:140px}
 meter{accent-color:var(--blue)}meter::-webkit-meter-optimum-value{background:var(--blue)}meter::-moz-meter-bar{background:var(--blue)}
 @media(max-width:1100px){.coach-member{grid-template-columns:42px minmax(0,1fr)}.coach-member-actions{grid-column:1/-1;width:100%;margin-left:0}}
 @media(max-width:720px){.coach-member-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.coach-member-actions>.button:last-child:nth-child(3){grid-column:1/-1}.student-results-link{flex-wrap:wrap}.student-results-link>.button{width:100%}.parent-child-heading>div{flex:1 0 100%}.parent-child-heading>.button{flex:1 1 calc(50% - 8px)}}
}

@media screen{
 .parent-payment-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;padding:20px 22px;border-top:1px solid var(--line)}
 .parent-payment-row>div{min-width:0}.parent-payment-row strong{font-size:14px;line-height:1.5}
 .parent-payment-row small{margin-top:4px}.parent-payment-details{display:grid;grid-template-columns:110px 105px 105px;align-items:center;gap:16px}
 .parent-payment-amount{min-width:110px;font-variant-numeric:tabular-nums}.parent-payment-amount>strong{white-space:nowrap}
 .parent-payment-details>.status{min-width:105px;text-align:center}.parent-payment-details>.button{min-width:105px}
 .parent-payments .panel-heading{border-bottom:0}.parent-payments .panel-note{padding:20px 22px}
 @media(max-width:720px){.parent-payment-row{grid-template-columns:minmax(0,1fr);gap:14px;padding:18px 16px}.parent-payment-details{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:12px}.parent-payment-amount{min-width:0;margin-right:auto}.parent-payment-details>.button{width:100%}.parent-payment-details>.status{min-width:0}}
}
