/* V3: one Arabic reading system for all roles and embedded pages. */
html.tk-readable { --tk-font:Tahoma,"Segoe UI",Arial,sans-serif;--tk-ink:#18324c;--tk-secondary:#41576b;--tk-border:#b8cad6;--tk-button:#123e62;--tk-soft:#f1f6fa; }
html.tk-readable[data-branch="girls"] { --tk-ink:#432744;--tk-secondary:#635067;--tk-border:#cfb7cd;--tk-button:#733a68;--tk-soft:#f8eef6; }
html.tk-readable body { font-family:var(--tk-font)!important;font-size:16px!important;font-weight:400!important;line-height:1.8!important;text-rendering:optimizeLegibility;-webkit-text-size-adjust:100%; }
html.tk-readable body :is(h1,h2,h3,h4,h5,h6,p,label,button,input,select,textarea,th,td,small,summary) { font-family:var(--tk-font)!important;letter-spacing:normal!important;text-shadow:none!important; }
html.tk-readable body :is(p,label,input,select,textarea,summary) { font-size:16px!important;line-height:1.8!important;font-weight:400!important; }
html.tk-readable body :is(h1,h2,h3,h4,h5,h6) { font-weight:700!important;line-height:1.6!important; }
html.tk-readable body h1 { font-size:clamp(24px,2.4vw,32px)!important; }
html.tk-readable body h2 { font-size:clamp(21px,2vw,26px)!important; }
html.tk-readable body :is(h3,h4,h5,h6) { font-size:18px!important; }
html.tk-readable body :is(b,strong) { font-weight:600!important; }
html.tk-readable body small { font-size:14px!important;line-height:1.8!important; }
html.tk-readable body :is(input,select,textarea) { color:var(--tk-ink)!important;background:#fff!important;border-color:var(--tk-border)!important; }
html.tk-readable body :is(input,textarea)::placeholder { color:var(--tk-secondary)!important;opacity:1!important; }
html.tk-readable body :is(button,.btn) { font-family:var(--tk-font)!important;font-size:15px!important;font-weight:600!important;line-height:1.65!important; }
html.tk-readable body :is(button,a,input,select,textarea):focus-visible { outline:3px solid #b57618;outline-offset:3px; }
/* Table text has a consistent size and weight; long Arabic copy wraps by word. */
html.tk-readable body table { font-family:var(--tk-font)!important;font-size:15px!important;line-height:1.8!important; }
html.tk-readable body table :is(td,th,p,small,span,label) { font-family:var(--tk-font)!important;font-size:15px!important;line-height:1.8!important; }
html.tk-readable body table td { font-weight:400!important;color:var(--tk-ink)!important;vertical-align:top;white-space:normal;word-break:normal;overflow-wrap:break-word;padding:14px 12px!important; }
html.tk-readable body table th { font-size:14px!important;font-weight:700!important;color:var(--tk-ink)!important;background:var(--tk-soft)!important;padding:12px!important; }
html.tk-readable body table :is(b,strong) { font-weight:600!important; }
html.tk-readable body table :is(small,.muted,.small,.sub) { color:var(--tk-secondary)!important; }
/* The dark menu keeps a distinct high-contrast palette. */
html.tk-readable body :is(.sidebar,.side) { color:#fff!important; }
html.tk-readable body :is(.sidebar .nav button,.sidebar #nav button,.side button.nav,.nav-group-head span,.nav-group-items button) { font-family:var(--tk-font)!important;font-size:16px!important;font-weight:500!important;line-height:1.65!important;color:#fff!important;white-space:normal;min-height:48px!important; }
html.tk-readable body :is(.sidebar,.side) :is(small,.small,.sub,.side-footer,.side-foot) { color:#e2dce9!important;font-size:13px!important;line-height:1.8!important; }
html.tk-readable[data-branch="girls"] body #appShell .nav-group-head { color:#f6d8ee!important;font-size:16px!important; }
html.tk-readable[data-branch="girls"] body #appShell .nav-group-items button { color:#fff!important;font-size:16px!important;font-weight:500!important; }
/* Work-page banners: coordinated foreground and background, never independently recolored. */
html.tk-readable body :is(.workspace-hero,.smart-page-hero) { background:#123e62!important;color:#fff!important;border-color:#123e62!important; }
html.tk-readable body :is(.workspace-hero,.smart-page-hero) :is(h1,h2,h3,h4,p,span,b,strong,small,.eyebrow) { color:#fff!important;opacity:1!important; }
html.tk-readable body :is(.workspace-hero,.smart-page-hero) p { font-size:16px!important;line-height:1.9!important; }
html.tk-readable[data-branch="girls"] body :is(.workspace-hero,.smart-page-hero) { background:#f5e8f2!important;border-color:#cfb7cd!important;color:#432744!important; }
html.tk-readable[data-branch="girls"] body :is(.workspace-hero,.smart-page-hero) :is(h1,h2,h3,h4,p,span,b,strong,small,.eyebrow) { color:#432744!important;opacity:1!important; }
html.tk-readable body :is(.workspace-hero,.smart-page-hero) :is(button,.btn,a.btn) { background:#fff!important;color:var(--tk-ink)!important;border:1px solid var(--tk-border)!important; }
html.tk-readable body :is(.workspace-hero,.smart-page-hero) :is(button,.btn,a.btn) :is(span,b,strong,small) { color:inherit!important; }
/* Morning page: preserve the boys dark clock card and use dark text on the girls light card. */
html.tk-readable body .manager-v36-morning { color:#fff!important; }
html.tk-readable body .manager-v36-morning :is(h2,p,b,strong,.manager-v36-kicker,.manager-v36-clock-time,.manager-v36-clock-caption,.m36-chip) { color:#fff!important;opacity:1!important; }
html.tk-readable[data-branch="girls"] body .manager-v36-morning :is(h2,p,b,strong,.manager-v36-kicker,.manager-v36-clock-time,.manager-v36-clock-caption,.m36-chip) { color:#432744!important;opacity:1!important; }
html.tk-readable body .manager-v36-morning .m36-chip { font-size:15px!important;line-height:1.7!important;background:#173e59!important;border-color:#617f95!important; }
html.tk-readable[data-branch="girls"] body .manager-v36-morning .m36-chip { background:#fff!important;border-color:#cfb7cd!important; }
html.tk-readable body .manager-v36-clock-time { font-size:18px!important;font-family:var(--tk-font)!important; }
html.tk-readable body .manager-v36-clock-caption { font-size:14px!important; }
html.tk-readable body .manager-v36-actions button.secondary { color:var(--tk-ink)!important;background:#fff!important;border-color:var(--tk-border)!important; }
/* Primary actions and status labels have explicit solid contrast pairs. */
html.tk-readable body :is(.btn.primary,button.primary,.entry-primary,.login-btn,.vp-login-btn,.student-login-btn,.manager-entry-actions button:last-child) { color:#fff!important;background:var(--tk-button)!important;border-color:var(--tk-button)!important; }
html.tk-readable body :is(.btn.primary,button.primary,.entry-primary,.login-btn,.vp-login-btn,.student-login-btn,.manager-entry-actions button:last-child) :is(span,b,strong) { color:#fff!important; }
html.tk-readable body :is(.btn.gold,button.gold) { color:#3d2b08!important;background:#f8df98!important;border-color:#bb8b24!important; }
html.tk-readable body :is(.badge,.chip,.tag) { font-family:var(--tk-font)!important;font-size:14px!important;font-weight:600!important;line-height:1.65!important;color:#25465e!important;background:#eef5fa!important;border-color:#b7cbd7!important; }
html.tk-readable body :is(.chip.green,.chip.ok,.chip.success,.badge.success,.tag.success) { color:#145b40!important;background:#eaf6ef!important; }
html.tk-readable body :is(.chip.red,.chip.danger,.chip.error,.badge.danger,.tag.danger) { color:#9a2634!important;background:#fff0f1!important; }
html.tk-readable body :is(.chip.warn,.chip.warning,.badge.warning,.tag.warning) { color:#774710!important;background:#fff4d9!important; }
html.tk-readable body :is(.card,.panel,.light-panel,.identity-card,.executive-panel,.manager-vmg-card,.manager-entry-card) { color:var(--tk-ink)!important; }
html.tk-readable body :is(.card,.panel,.light-panel,.identity-card,.executive-panel,.manager-vmg-card,.manager-entry-card) :is(.muted,.small,.sub) { color:var(--tk-secondary)!important;font-size:14px!important;opacity:1!important; }
/* Keep decorative headings legible without heavy strokes or glow. */
html.tk-readable body :is(.tk-girls-masthead,.tk-girls-welcome-copy,.manager-entry-heading) :is(h1,h2,p,small,span) { text-shadow:none!important;opacity:1!important; }
html.tk-readable[data-branch="girls"] body :is(.tk-girls-welcome-copy,.manager-entry-heading) :is(h1,h2,p,small,span) { color:#432744!important; }
html.tk-readable body .manager-entry-heading>span { color:#fff!important;background:var(--tk-button)!important; }
html.tk-readable[data-branch="girls"] body .manager-entry-heading>span { color:#fff!important; }
html.tk-readable[data-branch="girls"] body #appShell .nav-group-items button.active { background:#733a68!important;color:#fff!important; }
html.tk-readable[data-branch="girls"] body :is(.workspace-hero,.smart-page-hero) .workspace-icon { background:#fff!important;color:#432744!important;border:1px solid #cfb7cd!important; }
html.tk-readable body .footer span { font-family:var(--tk-font)!important;font-size:13px!important;line-height:1.8!important; }
@media(max-width:620px){html.tk-readable body :is(input,select,textarea){font-size:16px!important;}html.tk-readable body table :is(td,th,p,small,span){font-size:14px!important;}html.tk-readable body .manager-v36-actions button{min-height:48px!important;}}
@media print{html.tk-readable body{font-size:12pt!important;}html.tk-readable body table :is(td,th,p,small,span){font-size:10pt!important;line-height:1.6!important;}}

/* Role portal: explicit foreground/background pairs for each school branch. */
html.tk-readable[data-branch="girls"] body .roles-grid .role{background:linear-gradient(145deg,#fff,#fcf1fa)!important;color:#382044!important;border:1px solid #d9bedb!important;}
html.tk-readable[data-branch="girls"] body .roles-grid .role h3{color:#452049!important;font-size:20px!important;font-weight:800!important;line-height:1.8!important;}
html.tk-readable[data-branch="girls"] body .roles-grid .role p,html.tk-readable[data-branch="girls"] body .portal-hero p,html.tk-readable[data-branch="girls"] body .note{color:#5e4567!important;font-weight:500!important;opacity:1!important;}
html.tk-readable[data-branch="girls"] body .roles-grid .role a{background:#78357d!important;color:#fff!important;border-color:#78357d!important;font-size:16px!important;}
html.tk-readable[data-branch="girls"] body .roles-grid .role-icon{background:#f7e6f4!important;color:#78357d!important;border-color:#c6a0c8!important;}
html.tk-readable[data-branch="girls"] body .roles-grid .status,html.tk-readable[data-branch="girls"] body .portal-kicker{background:#f0e1f0!important;color:#563059!important;border-color:#c6a0c8!important;}
html.tk-readable[data-branch="boys"] body .roles-grid .role h3{color:#fff!important;font-size:20px!important;font-weight:800!important;}
html.tk-readable[data-branch="boys"] body .roles-grid .role p,html.tk-readable[data-branch="boys"] body .portal-hero p{color:#dceafb!important;opacity:1!important;}

/* Keep record dialogs above sticky tools and preserve the page underneath. */
html.tk-record-open body #appShell .topbar,html.tk-record-open body #moduleReturnBar,html.tk-record-open body #tkLocalBar{visibility:hidden!important;pointer-events:none!important}
html.tk-record-open body #modalRoot.modal-backdrop{position:fixed!important;inset:0!important;z-index:2147483001!important;overflow:auto!important;padding:24px 14px!important;align-items:safe center!important}
html.tk-record-open body #modalRoot .modal{max-height:calc(100dvh - 48px)!important;overflow:auto!important;margin:auto!important;position:relative!important}
@media(max-width:640px){html.tk-record-open body #modalRoot.modal-backdrop{padding:12px 8px!important}html.tk-record-open body #modalRoot .modal{max-height:calc(100dvh - 24px)!important}}

@media print{#tkLocalBar,#tkRestoreReviewBar{display:none!important}}
html.tk-record-open body #tkRestoreReviewBar{visibility:hidden!important;pointer-events:none!important}

html.tk-readable[data-branch="girls"] body .vp18-identity-hero,html.tk-readable[data-branch="girls"] body .vp18-vcard{background:#fbf2fa!important;border-color:#d8bdd8!important;color:#432744!important}html.tk-readable[data-branch="girls"] body :is(.vp18-identity-hero,.vp18-vcard) :is(h1,h2,h3,p,span){color:#432744!important;opacity:1!important;font-weight:600!important}
html.tk-readable body .smart-toolbar{display:flex!important;flex-wrap:wrap!important;gap:8px!important}html.tk-readable body .smart-toolbar button{width:auto!important;min-width:64px!important;height:auto!important;min-height:56px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;padding:8px!important;gap:5px;color:#fff!important}html.tk-readable body .smart-toolbar button span{font-size:13px!important;line-height:1.4!important}#academicActionFeedback{border:1px solid #c6a0c8;border-radius:10px;padding:12px;background:#f8eef6;color:#432744;font-weight:600;white-space:pre-wrap}

html.tk-readable[data-branch="girls"] body .vp18-head{background:linear-gradient(120deg,#faf0f8,#efe1f0)!important;border-color:#c8a8cc!important}html.tk-readable[data-branch="girls"] body .vp18-head :is(h1,p,span,b,div){color:#432744!important;opacity:1!important}html.tk-readable[data-branch="girls"] body .vp18-vcard :is(h3,p){color:#432744!important;font-size:17px!important}
html:has(#detailModal:not(.hidden)) body :is(.topbar,.vp21-manager-topbar,.vp21-topbar,#tkLocalBar,#tkRestoreReviewBar){visibility:hidden!important;pointer-events:none!important}html body #detailModal:not(.hidden){z-index:2147483001!important}html body #detailModal .modal{max-height:calc(100dvh - 40px);overflow:auto}

html[data-branch="girls"] .boys-source-row{display:none!important}
