/* Caryan shared design tokens: one source for staff, family and admin. Loaded last on every page. */
:root{--cy-navy:#1F3B5A;--cy-ink:#22374E;--cy-muted:#5b6b7d;--cy-gold:#C5A253;--cy-gold-line:#C5A449;--cy-cream:#FBF8F1;--cy-line:#ECE4D2;--cy-card:#fff;
--cy-r-card:16px;--cy-r-btn:12px;--cy-shadow:0 1px 3px rgba(16,32,54,.06);--cy-serif:'Source Serif 4',Georgia,serif;--cy-sans:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;
--cy-fs-body:16px;--cy-fs-h1:28px;--cy-fs-h2:20px;--cy-fs-h3:17px;--cy-fs-label:12.5px;--cy-fs-btn:15px;--cy-fs-pill:12.5px}
@media(max-width:600px){:root{--cy-fs-h1:26px}}
/* type + color */
html body{font-family:var(--cy-sans)!important;font-size:var(--cy-fs-body)!important;color:var(--cy-ink);background-color:var(--cy-cream)!important}
html body button,html body input,html body select,html body textarea{font-family:var(--cy-sans)}
html body h1:not(.sr){font-family:var(--cy-serif)!important;font-size:var(--cy-fs-h1)!important;font-weight:600!important;color:var(--cy-navy)!important;letter-spacing:-.01em!important}
html body h2:not(.sh):not(.h2):not(.sr){font-family:var(--cy-serif)!important;font-size:var(--cy-fs-h2)!important;font-weight:600!important;color:var(--cy-navy)!important;letter-spacing:-.01em!important}
html body .card h2:not(.sh),html body .ch h2,html body h3{font-family:var(--cy-serif)!important;font-size:var(--cy-fs-h3)!important;font-weight:600!important;color:var(--cy-navy)!important;letter-spacing:0!important}
html body table{font-size:14.5px}
/* section labels */
html body h2.sh,html body h2.h2,html body .sh,html body small.k,html body .eyebrow{font-family:var(--cy-sans)!important;font-size:var(--cy-fs-label)!important;font-weight:600!important;text-transform:uppercase!important;letter-spacing:.08em!important;color:var(--cy-muted)!important}
/* buttons: primary gold, outline navy */
html body .btn,html body a.fer,html body a.reqb,html body button.go{font-family:var(--cy-sans)!important;font-size:var(--cy-fs-btn)!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;border-radius:var(--cy-r-btn)!important;min-height:44px;box-shadow:none!important;box-sizing:border-box;max-width:100%}
html body .btn.gold,html body .btn.g,html body .btn.pri,html body button.btn:not(.ghost):not(.gh):not(.sm):not(.out):not(.danger),html body a.reqb,html body button.go,html body .fev .fer:not(.flog){background:var(--cy-gold)!important;color:var(--cy-navy)!important;border:1.5px solid var(--cy-gold)!important}
html body .btn.ghost,html body .btn.gh,html body .btn.sm,html body a.btn:not(.gold):not(.g):not(.pri):not(.danger),html body a.fer:not(.fev a){background:#fff!important;color:var(--cy-navy)!important;border:1.5px solid var(--cy-navy)!important}
html body .btn.sm{min-height:36px;font-size:14px!important}
/* cards */
html body .card,html body .vc,html body .ccard,html body a.c,html body .stat,html body section.card{border-radius:var(--cy-r-card)!important;border:1px solid var(--cy-line)!important;box-shadow:var(--cy-shadow)!important;background-color:var(--cy-card)}
/* pills */
html body .pill,html body .badge,html body .chip{font-family:var(--cy-sans)!important;font-size:var(--cy-fs-pill)!important;font-weight:600!important;border-radius:999px!important;letter-spacing:0!important}
/* thin line icons */
html body svg.li,html body .ic svg,html body .fgi svg{stroke-width:1.5}

html body .fev .fer{white-space:nowrap!important;min-height:40px;padding:0 14px!important}
html body .fev .fer.flog{background:#fff!important;color:#1F3B5A!important;border:1.5px solid #1F3B5A!important}
/* Open menus sit above all page content and lock page scroll (admin drawer, family and staff avatar menus) */
@media (max-width:820px){.shell>.side{z-index:1000!important;background:#fff!important}.side.open{position:fixed!important;left:0;right:0;top:0;max-height:100dvh;overflow-y:auto!important;overscroll-behavior:contain}.side.open nav{max-height:none!important;overflow:visible!important}}
html:has(.side.open),html:has(#pmn:not([hidden])),html:has(.avm.on){overflow:hidden!important;overscroll-behavior:none}
html:has(.side.open) body,html:has(#pmn:not([hidden])) body,html:has(.avm.on) body{overflow:hidden!important}
html:has(.side.open) .side,html:has(#pmn:not([hidden])) #pmn,html:has(.avm.on) .avm{touch-action:pan-y}
#pmn,.avm{z-index:1000!important}
/* Admin tables as stacked cards at phone and iPad-portrait widths (labels come from mtable.js) */
@media (max-width:820px){
 table.mcards,table.mcards tbody,table.mcards tfoot,table.mcards tr,table.mcards td,table.mcards th{display:block;width:auto!important;min-width:0!important;max-width:100%}
 table.mcards{border:0!important;background:none!important;table-layout:auto}
 table.mcards thead{display:none}
 table.mcards tr{background:#fff;border:1px solid var(--cy-line,#e6e9ef);border-radius:12px;padding:10px 14px;margin:0 0 10px}
 table.mcards td,table.mcards tbody th{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:6px 0!important;border:0!important;border-top:1px solid #f1f3f6!important;text-align:right;white-space:normal!important;word-break:break-word;overflow-wrap:anywhere}
 table.mcards td:first-child,table.mcards tbody th:first-child{border-top:0!important}
 table.mcards td[data-label]::before{content:attr(data-label);flex:0 0 auto;min-width:38%;white-space:nowrap;text-align:left;font:600 12px/1.4 Inter,system-ui,sans-serif;letter-spacing:.04em;text-transform:uppercase;color:#6b7686}
 table.mcards td:not([data-label]){justify-content:flex-start;text-align:left}
 table.mcards td.mc-empty{display:none}
 table.mcards td>*{max-width:100%}
 table.mcards td .btn{white-space:nowrap}
 .gw:has(table.mcards){overflow:visible!important;max-width:100%}
 table.mcards td{flex-wrap:wrap}
 table.mcards td form{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;max-width:100%;min-width:0}
 table.mcards td form input:not([type=hidden]){min-width:0;max-width:110px}
 table.mcards td .gc{display:block;width:100%;margin:2px 0;text-align:left}
 table.mcards td.tod{background:none}
 table.mcards td.cn{display:block!important;text-align:left}
 table.mcards td.cn::before{display:block;margin-bottom:2px}
 table.mcards td.cn .hs{display:grid!important;width:max-content;margin-top:6px;min-width:150px}
}
