/* Sleek, uniform sizing. To undo: remove nk_ui.css and nk_ui.js from inc.php. */
html{-webkit-text-size-adjust:100%}
html,body{max-width:100%;overflow-x:hidden}
img,video,svg{max-width:100%}
body :is(input[type=text],input[type=email],input[type=password],input[type=number],input[type=tel],input[type=date],input[type=search],input[type=time],input[type=url],input:not([type]),select){height:40px!important;min-height:0!important;padding:0 12px!important;border-radius:10px!important;font-size:14px!important;line-height:1.2!important;box-sizing:border-box!important;max-width:100%}
body textarea{padding:10px 12px!important;border-radius:12px!important;font-size:14px!important;box-sizing:border-box!important;max-width:100%}
body button,body input[type=submit],body input[type=button],body a.btn,body .btn{height:auto!important;min-height:36px!important;padding-top:8px!important;padding-bottom:8px!important;font-size:14px!important;line-height:1.2!important;border-radius:10px!important;font-weight:600}
body .b,body .card,body .panel{border-radius:14px!important;padding:14px 16px!important;margin-bottom:12px!important}
body details>summary{padding-top:10px!important;padding-bottom:10px!important}
body table td,body table th{padding:8px 10px!important}
body table td button,body table td a.btn{min-height:30px!important;padding-top:5px!important;padding-bottom:5px!important;font-size:13px!important}
body h1{font-size:22px!important}body h2{font-size:18px!important}body h3{font-size:16px!important}
.nkscroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.nknum{width:34px;text-align:center;color:#a31621;font-weight:700;font-size:12px}
.nknum2{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;margin-right:8px;border-radius:99px;background:#fdf3f4;color:#a31621;font-size:12px;font-weight:700;vertical-align:middle}
@media(min-width:821px){
 body header a{padding:8px 12px!important;min-height:0!important;font-size:14px!important;gap:10px!important;margin:1px 0!important;border-radius:10px!important;line-height:1.3!important}
 body header a svg{width:18px!important;height:18px!important}
}
@media(max-width:640px){
 body :is(input[type=text],input[type=email],input[type=password],input[type=number],input[type=tel],input[type=date],input[type=search],input[type=time],input[type=url],input:not([type]),select),body textarea{font-size:16px!important}
 body .b,body .card,body .panel{padding:12px!important;border-radius:12px!important}
 body table td,body table th{padding:7px 8px!important}
}
/* grades grid becomes one compact card per student on phones: nothing hidden, no sideways scroll */
@media(max-width:640px){
 body table.nkgrid,body table.nkgrid tbody{display:block;width:100%}
 body table.nkgrid tr:not([data-r]){display:none}
 body table.nkgrid tr[data-r]{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:8px;padding:10px;margin-bottom:8px;border:1px solid #f0d5d8;border-radius:12px;background:#fff}
 body table.nkgrid td{display:block;padding:0!important;border:0!important;min-width:0}
 body table.nkgrid td:first-child{grid-column:1/-1;font-weight:700;font-size:14px}
 body table.nkgrid td:first-child::before{display:none}
 body table.nkgrid td::before{content:attr(data-label);display:block;font-size:11px;font-weight:600;opacity:.65;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body table.nkgrid input.n{width:100%!important;box-sizing:border-box}
}
/* phone app bar + More sheet */
.nkbar{display:none}.nksheet{display:none}
@media(max-width:820px){
 body.nkhasbar header{display:none!important}
 body.nkhasbar{padding-bottom:78px}
 .nkbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:900;gap:2px;background:#fff;border-top:1px solid #f0d5d8;padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px rgba(163,22,33,.08)}
 .nkbar a,.nkbar button{flex:1;display:flex!important;flex-direction:column;align-items:center;gap:3px;padding:6px 2px!important;min-height:0!important;background:none!important;border:0!important;box-shadow:none!important;color:#7a5a5f!important;font-size:11px!important;font-weight:600!important;text-decoration:none;border-radius:10px!important;cursor:pointer}
 .nkbar svg{width:22px;height:22px;stroke:currentColor}
 .nkbar .on{color:#a31621!important;background:#fdf3f4!important}
 .nksheet{position:fixed;inset:0;z-index:1000}
 .nksheet:not([hidden]){display:block}
 .nkbd{position:absolute;inset:0;background:rgba(40,10,14,.35)}
 .nkpanel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:20px 20px 0 0;padding:10px 14px calc(16px + env(safe-area-inset-bottom));max-height:75vh;overflow:auto}
 .nkgrab{width:40px;height:4px;background:#e3b4ba;border-radius:99px;margin:0 auto 12px}
 .nkgridm{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .nkgridm a{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #f0d5d8;border-radius:12px;color:#3b1a1e;font-weight:600;font-size:14px;text-decoration:none}
 .nkgridm a.on{background:#a31621;color:#fff;border-color:#a31621}
 .nkgridm svg{width:20px;height:20px;stroke:currentColor;flex:none}
}
@media print{.nkbar,.nksheet{display:none!important}}
/* enquiries */
.nkeh{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.nkeh h2{margin:0!important}
.nkpill{display:inline-block;margin-left:8px;padding:2px 10px;border-radius:99px;background:#fdf3f4;color:#a31621;font-size:12px;font-weight:700;vertical-align:middle}
.nkql{font-size:13px;font-weight:600;color:#a31621;text-decoration:none;padding:6px 12px;border:1.5px solid #e3b4ba;border-radius:99px}
.nknote{margin:0 0 12px!important;padding:10px 12px!important;background:#fff8ec;border:1px solid #f2dcae;border-left:4px solid #e0a100;border-radius:12px;font-size:13px!important;color:#5a3d00}
.nkel{display:flex;flex-direction:column;gap:8px}
.nke{padding:10px 12px;border:1px solid #f0d5d8;border-radius:12px;background:#fff;font-size:13.5px;line-height:1.5}
.nke.new{border-left:4px solid #a31621;background:#fffafa}
.nke .r1{display:flex;justify-content:space-between;gap:8px;align-items:baseline;flex-wrap:wrap}
.nke b{font-size:14px}.nke small{opacity:.65;font-size:12px}
.nke p{margin:4px 0 0!important;word-break:break-word}
.nke .r3{display:flex;gap:8px;align-items:center;margin-top:6px;flex-wrap:wrap}
.nke a.ph{color:#a31621;font-weight:600;text-decoration:none;font-size:13px}
.nke a.dn{margin-left:auto;font-size:12.5px;font-weight:600;color:#17692e;background:#e7f6ec;padding:4px 12px;border-radius:99px;text-decoration:none}
/* nk-palette: maroon, white, black, a touch of gold. No blue anywhere. */
html{accent-color:#a31621}
*{-webkit-tap-highlight-color:rgba(163,22,33,.14)}
::selection{background:#f3c9ce;color:#1a1a1a}
:focus-visible{outline:2px solid #a31621!important;outline-offset:2px}
.nkbar a,.nkbar a:visited,.nkbar a:active,.nkbar a:focus,.nkbar button{color:#6b4a50!important}
.nkbar a.on,.nkbar a.on:visited{color:#a31621!important;background:#fdf3f4!important}
.nkbar svg,.nkbar svg *,.nkgridm svg,.nkgridm svg *{stroke:currentColor!important;fill:none!important}
.nkgridm a,.nkgridm a:visited,.nkgridm a:active,.nkgridm a:focus{color:#2b1a1d!important}
.nkgridm a.on,.nkgridm a.on:visited{color:#fff!important;background:#a31621!important}
.nke a.dn{background:#a31621!important;color:#fff!important}
/* class accordions (staff Classes and students) */
.nkac{border:1px solid #f0d5d8;border-radius:12px;background:#fff;margin-bottom:8px;overflow:hidden}
.nkac>summary{display:flex;align-items:center;gap:10px;padding:11px 14px!important;cursor:pointer;list-style:none;font-weight:700;font-size:14.5px;color:#2b1a1d}
.nkac>summary::-webkit-details-marker{display:none}
.nkac>summary em{margin-left:auto;font-style:normal;font-weight:600;font-size:12px;color:#a31621;background:#fdf3f4;padding:2px 10px;border-radius:99px}
.nkac>summary::after{content:"";width:8px;height:8px;border-right:2px solid #a31621;border-bottom:2px solid #a31621;transform:rotate(45deg);transition:transform .15s;margin:-3px 2px 0 4px}
.nkac[open]>summary::after{transform:rotate(-135deg);margin-top:3px}
.nkac[open]>summary{border-bottom:1px solid #f0d5d8;background:#fffafa}
.nkacb{padding:6px 8px}.nkacm{margin:8px 6px;font-size:13px;opacity:.7}
.nkhc{display:none!important}
