/* OS Author v2.46: an institution with its own portal (COECSA's COEDREP) in its own brand, through and through.
   Loaded last. editor.js (instTheme) sets html.inst and the institution's three colours from its portal settings:
   --ib its blue, --ia its green, --ii its black. Nothing else is used: white grounds, and lines, quiet text and soft
   fills made from the institution's own black and blue with transparency, so no OS Author colour shows anywhere.
   The background mark on the sign-in page is the institution's eye (COECSA's green leaf with its white pupil).
   A quiet "Powered by OS Author" stays. Dark mode (theme.css) keeps its own grounds and takes the blue as the accent. */

html.inst{--ib:#137AB9;--ia:#00B274;--ii:#231F20}
html.inst:not([data-theme=dark]).calm,html.inst:not([data-theme=dark]){
  --bg:#FFFFFF; --panel:#FFFFFF; --sunk:color-mix(in srgb,var(--ib) 5%,transparent); --ink:var(--ii); --muted:color-mix(in srgb,var(--ii) 70%,transparent); --faint:color-mix(in srgb,var(--ii) 50%,transparent);
  --line:color-mix(in srgb,var(--ii) 12%,transparent); --line-2:color-mix(in srgb,var(--ii) 20%,transparent); --blue:var(--ib); --blue-2:var(--ib); --blue-soft:color-mix(in srgb,var(--ib) 8%,transparent);
}
html.inst:not([data-theme=dark]) :is(.ez,.ez-ck,.shp-fix,.gb,.bsp,.pt,.pt-modal,.si,.shpop,.lc,.pt-auth,.hb){
  --paper:#FFFFFF; --surface:#FFFFFF; --surface-sunk:color-mix(in srgb,var(--ib) 5%,transparent); --hairline:color-mix(in srgb,var(--ii) 12%,transparent); --control-line:color-mix(in srgb,var(--ii) 35%,transparent);
  --ink:var(--ii); --ink-muted:color-mix(in srgb,var(--ii) 70%,transparent); --mut:color-mix(in srgb,var(--ii) 70%,transparent); --sunk:color-mix(in srgb,var(--ib) 5%,transparent); --line:color-mix(in srgb,var(--ii) 12%,transparent);
  --primary:var(--ib); --primary-hover:var(--ib); --brand:var(--ib); --brand-soft:color-mix(in srgb,var(--ib) 8%,transparent); --on-brand:#FFFFFF;
  --success:var(--ia); --success-soft:color-mix(in srgb,var(--ia) 10%,transparent); --seal:var(--ia); --seal-soft:color-mix(in srgb,var(--ia) 10%,transparent);
}
html.inst[data-theme=dark] :is(.ez,.ez-ck,.shp-fix,.gb,.bsp,.pt,.pt-modal,.si,.shpop,.lc,.pt-auth,.hb){--primary:var(--ib);--brand:var(--ib)}

/* the institution's type everywhere (COECSA: Avenir, with Figtree where Avenir is not installed) */
html.inst,html.inst body,html.inst :is(.ez,.ez-ck,.gb,.bsp,.pt,.pt-modal,.si,.lc,.pt-auth,.hb){--font-ui:var(--if,'Avenir LT Std','Avenir Next',Avenir,Figtree,'Segoe UI',system-ui,sans-serif);--font-display:var(--font-ui);--f:var(--font-ui)}
html.inst body{font-family:var(--font-ui)}

/* white grounds everywhere */
html.inst:not([data-theme=dark]) body,html.inst:not([data-theme=dark]) :is(.pt-side,.side,.pt-main,.pt-col,.si,.pt-auth){background:#FFFFFF}
html.inst:not([data-theme=dark]) :is(.pt-side,.side){border-color:color-mix(in srgb,var(--ii) 12%,transparent)}

/* every main button is the blue with white words; hovering adds a soft ring of the same blue */
html.inst :is(.b.pri,.ez-btn,.gb-go,.pt .pt-btn:not(.secondary):not(.quiet),.pt-modal .pt-btn:not(.secondary):not(.quiet),.sp-btn:not(.second),.pt-auth .pt-btn,.si .b.pri,.cp-go,.b.avatar){
  background:var(--ib)!important;border-color:var(--ib)!important;color:#FFFFFF!important}
html.inst :is(.b.pri,.ez-btn,.gb-go,.pt .pt-btn:not(.secondary):not(.quiet),.pt-auth .pt-btn,.si .b.pri,.cp-go):hover:not(:disabled){background:var(--ib)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--ib) 20%,transparent)!important}
html.inst :is(.ez-btn,.pt-auth .pt-btn)::after{background-color:rgba(255,255,255,.2)}

/* the current place: blue words on a faint blue */
html.inst :is(.pt-si.on,.side a.on,.sm-i.on),html.inst :is(.pt-si.on,.side a.on,.sm-i.on) svg{color:var(--ib)}
html.inst:not([data-theme=dark]) :is(.pt-si.on,.side a.on,.sm-i.on){background:color-mix(in srgb,var(--ib) 8%,transparent)}
html.inst:not([data-theme=dark]) :is(.pt-si:hover,.side a:hover){background:color-mix(in srgb,var(--ib) 5%,transparent)}
html.inst :is(.pt a.link,.pt-more,.hb-more,.lc a.link){color:var(--ib)}
html.inst :focus-visible{outline-color:var(--ib)}
html.inst :is(.pt-pow,.si-pow){color:color-mix(in srgb,var(--ii) 55%,transparent)}

/* the eye in place of the rings behind the sign-in page */
html.inst.eye .pt-rings{display:none}
html.inst.eye :is(.pt-auth,.si){position:relative;overflow:hidden}
html.inst.eye :is(.pt-auth,.si)::before{content:"";position:absolute;right:-240px;top:50%;width:620px;height:620px;transform:translateY(-50%);pointer-events:none;opacity:.1;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%2300B274' fill-rule='evenodd' d='M94 3C46 5 8 38 6 97C54 95 92 62 94 3ZM32 48a17 17 0 1 0 34 0a17 17 0 1 0-34 0Z'/%3E%3C/svg%3E")}
html.inst.eye :is(.pt-auth-card,.si-card,.si-side,.pt-tenant){position:relative;z-index:1}
@media (max-width:760px){html.inst.eye :is(.pt-auth,.si)::before{width:380px;height:380px;right:-150px;top:100px;transform:none}}

/* studio pages that set their own greys */
html.inst:not([data-theme=dark]) :is(.cp,.mw-r,.mw,.card,.ez-card,.hm3-cp){border-color:color-mix(in srgb,var(--ii) 12%,transparent)}
html.inst:not([data-theme=dark]) :is(.mw-r,.mw) :is(span,small,time):not(.ok):not(.b){color:color-mix(in srgb,var(--ii) 70%,transparent)}
html.inst:not([data-theme=dark]) .muted{color:color-mix(in srgb,var(--ii) 70%,transparent)}
html.inst :is(.mw-r .ok,.st-pub,.pill.ok){color:var(--ii)}
html.inst:not([data-theme=dark]) th{color:color-mix(in srgb,var(--ii) 70%,transparent)}
html.inst:not([data-theme=dark]) .badge{background:color-mix(in srgb,var(--ib) 9%,transparent);color:var(--ii);border-color:transparent}
html.inst:not([data-theme=dark]) .badge.ok{background:color-mix(in srgb,var(--ia) 14%,transparent);color:var(--ii)}

/* the institution's logo, centred at the top of the sign-in card */
.pt-card-logo{display:flex;justify-content:center;margin:0 0 18px}
.pt-card-logo img{max-height:64px;max-width:220px;width:auto;height:auto}

/* v2.46: the studio library for an institution's portal (Rise-like): Create new, then every course as a card */
.lib{max-width:1180px;margin:0 auto;padding:40px 32px 64px}
.lib-h{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-bottom:24px}
.lib-eyebrow{margin:0 0 6px;font-weight:700;font-size:13px;letter-spacing:.04em;color:var(--ib,#137AB9)}
.lib h1{margin:0;font-size:34px;line-height:1.15;font-weight:700;letter-spacing:-.02em;color:var(--ii,#231F20)}
.lib-sub{margin:8px 0 0;color:color-mix(in srgb,var(--ii,#231F20) 70%,transparent);max-width:60ch}
.lib-new{min-height:46px;padding:0 20px;border-radius:12px;display:inline-flex;align-items:center;gap:8px;font-weight:700}
.lib-new .ic,.lib-new svg{width:18px;height:18px}
.lib-tools{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:0 0 20px;padding-bottom:14px;border-bottom:1px solid color-mix(in srgb,var(--ii,#231F20) 12%,transparent)}
.lib-tabs{display:flex;gap:4px}
.lib-tabs button{font:inherit;font-weight:600;font-size:14px;padding:8px 14px;border-radius:999px;border:0;background:none;color:color-mix(in srgb,var(--ii,#231F20) 70%,transparent);cursor:pointer}
.lib-tabs button[aria-selected=true]{background:color-mix(in srgb,var(--ib,#137AB9) 10%,transparent);color:var(--ib,#137AB9)}
.lib-tools input{font:inherit;font-size:15px;min-height:40px;padding:0 14px;border-radius:10px;border:1px solid color-mix(in srgb,var(--ii,#231F20) 20%,transparent);background:#fff;min-width:240px}
.lib-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}
.lib-c{display:flex;flex-direction:column;background:#fff;border:1px solid color-mix(in srgb,var(--ii,#231F20) 12%,transparent);border-radius:14px;overflow:hidden;transition:box-shadow .15s,transform .15s}
.lib-c:hover{box-shadow:0 8px 24px -12px color-mix(in srgb,var(--ii,#231F20) 35%,transparent);transform:translateY(-2px)}
.lib-img{display:block;aspect-ratio:16/9;overflow:hidden;background:color-mix(in srgb,var(--ib,#137AB9) 8%,transparent)}
.lib-img img,.lib-img svg{width:100%;height:100%;object-fit:cover;display:block}
.lib-b{display:flex;flex-direction:column;gap:6px;padding:14px 16px 12px;flex:1}
.lib-kind{margin:0;font-size:12.5px;font-weight:700;color:var(--ib,#137AB9)}
.lib-c h3{margin:0;font-size:17px;line-height:1.3;font-weight:700}
.lib-c h3 a{color:var(--ii,#231F20);text-decoration:none}
.lib-c h3 a:hover{text-decoration:underline}
.lib-m{margin:0;font-size:13.5px;color:color-mix(in srgb,var(--ii,#231F20) 65%,transparent)}
.lib-a{display:flex;gap:4px;margin-top:auto;padding-top:10px;border-top:1px solid color-mix(in srgb,var(--ii,#231F20) 10%,transparent)}
.lib-act{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;padding:7px 10px;border-radius:8px;color:var(--ii,#231F20);text-decoration:none}
.lib-act svg,.lib-act .ic{width:15px;height:15px}
a.lib-act:hover{background:color-mix(in srgb,var(--ib,#137AB9) 8%,transparent);color:var(--ib,#137AB9)}
.lib-act.off{opacity:.4;cursor:default}
.lib-empty{color:color-mix(in srgb,var(--ii,#231F20) 65%,transparent)}
.menu.lib-menu{min-width:300px;padding:6px}
.menu.lib-menu>*{display:flex!important;gap:12px;align-items:flex-start;padding:10px 12px!important;border-radius:10px;text-align:left;width:100%}
.menu.lib-menu b{display:block;font-weight:700;color:var(--ii,#231F20)}
.menu.lib-menu small{display:block;font-size:13px;color:color-mix(in srgb,var(--ii,#231F20) 65%,transparent);margin-top:2px}
.menu.lib-menu svg{width:18px;height:18px;color:var(--ib,#137AB9);flex:none;margin-top:2px}
@media (max-width:640px){.lib{padding:24px 16px 48px}.lib h1{font-size:28px}.lib-tools input{min-width:0;width:100%}.lib-new{width:100%;justify-content:center}.lib-h .menu-wrap{width:100%}}

/* the sign-in card: a smaller heading, nothing under it */
.pt-auth-card h1.pt-signh{font-size:26px;margin:0 0 18px;text-align:center}
.pt-land{border:0;padding:0;margin:8px 0 4px}
.pt-land legend{font-weight:700;margin-bottom:8px}

/* on phones the sign-in card comes first, then the portal's name */
@media (max-width:900px){html.inst .pt-auth .pt-tenant{order:3}}

/* the portal's name (COEDREP) in the institution's blue */
html.inst :is(.pt-tenant h2,.pt-sname b,.pt-mtop .pt-nm){color:var(--ib)!important}

/* status labels in the brand's colours: done on a light green, your turn on a light blue (readable text in the brand black and blue) */
html.inst:not([data-theme=dark]) .pt-st.ok{background:color-mix(in srgb,var(--ia) 16%,transparent);color:var(--ii)}
html.inst:not([data-theme=dark]) .pt-st.you{background:color-mix(in srgb,var(--ib) 12%,transparent);color:var(--ib)}
