/* Scoped overrides; preserve the active theme and its controllers. */
.cg-reference-tutor .cg-interface-language,
.cg-reference-institution .cg-interface-language{display:flex;align-items:center;gap:4px;flex:none}
.cg-interface-language a{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:44px;padding:0 6px;color:var(--text-2,#526571);text-decoration:none;border-radius:8px;font:600 12px var(--sans,system-ui)}
.cg-interface-language a[aria-current="page"]{background:var(--gold-soft,#f4ebcc);color:var(--gold-text,#8b6910)}
.cg-interface-language a:focus-visible{outline:2px solid var(--gold,#c9a227);outline-offset:2px}
.cg-reference-tutor .top__crumb,.cg-reference-institution .top__crumb{min-width:0;overflow-wrap:anywhere}
.cg-reference-institution .list-rows .grow{overflow-wrap:anywhere;flex-basis:120px}
.cg-reference-institution .list-rows>div{flex-wrap:wrap}
@media(max-width:900px){
 .cg-reference-tutor .top,.cg-reference-institution .top{display:flex!important;position:relative;min-height:68px;height:auto;gap:12px;padding:12px 16px;flex-wrap:wrap}
 .cg-reference-tutor .top__actions,.cg-reference-institution .top__actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
}
@media(max-width:420px){
 .cg-reference-tutor .top__crumb,.cg-reference-institution .top__crumb{flex-basis:100%;font-size:13px}
 .cg-reference-tutor .top__actions,.cg-reference-institution .top__actions{margin-left:auto}
}
.cg-interface-qa-button{position:fixed;right:14px;bottom:100px;z-index:99998;padding:10px 14px;border:1px solid #c9a227;border-radius:10px;background:#0e2a3a;color:white;font:600 13px system-ui;cursor:pointer}
.cg-interface-qa-panel{position:fixed;right:12px;bottom:150px;z-index:99999;width:min(480px,calc(100vw - 24px));max-height:65vh;overflow:auto;padding:18px;box-sizing:border-box;background:#fff;color:#0e2a3a;border:2px solid #c9a227;border-radius:12px;box-shadow:0 10px 40px #0004;font:14px/1.5 system-ui}
.cg-interface-qa-panel[hidden]{display:none!important}
.cg-interface-qa-panel h2{font:600 20px system-ui;margin:0 0 10px;color:#0e2a3a}
.cg-interface-qa-panel button{padding:8px 12px;margin-right:8px;border-radius:8px;border:1px solid #85949c;background:#f5f7f8;color:#0e2a3a;cursor:pointer}
.cg-interface-qa-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 ui-monospace,monospace;color:#0e2a3a;background:#f5f7f8;padding:10px}

/* Programs: composition from admin-programmes.html, real controls retained. */
/* Static maquette-only state labels are never production content. */
body .cgcs-app .demo-flag,
body .cga-app .demo-flag,
body .cgcs-app .state-switch,
body .cga-app .state-switch,
body .cgcs-app [data-mockup-only],
body .cga-app [data-mockup-only]{display:none!important}

body.cga-admin-lot1-programs .cga-content>.cg-cia-entry[data-cia-card="1"]{display:none!important}
body.cga-admin-lot1-programs .cga-page-head{margin-bottom:28px;gap:20px}
body.cga-admin-lot1-programs .cga-program-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:16px}
body.cga-admin-lot1-programs .cga-filter-chips{display:flex;flex-wrap:wrap;gap:6px}
body.cga-admin-lot1-programs .cga-filter-chips a{min-height:36px;padding:7px 12px;font-size:12.5px}
body.cga-admin-lot1-programs .cga-filter-chips small{font-size:11px}
body.cga-admin-lot1-programs .cga-library-layout{grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}
body.cga-admin-lot1-programs .cga-library-list{position:static!important;display:block;height:auto!important;max-height:none!important;overflow:visible!important;align-self:start}
body.cga-admin-lot1-programs .cga-library-list>header{position:static;padding:20px 20px 12px}
body.cga-admin-lot1-programs .cga-library-scroll{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:4px 12px 12px}
body.cga-admin-lot1-programs .cga-library-item{grid-template-columns:4px minmax(0,1fr) auto;gap:14px;padding:14px;border-radius:14px;margin:0 0 6px}
body.cga-admin-lot1-programs .cga-library-item strong{font-size:14.5px;line-height:1.3;overflow-wrap:anywhere}
body.cga-admin-lot1-programs .cga-library-item small{display:block;margin-top:2px;font-size:12.5px}
body.cga-admin-lot1-programs .cga-library-item.cg-interface-technical-item{display:none!important}
body.cga-admin-lot1-programs .cga-library-detail{min-width:0;display:grid;gap:16px}
body.cga-admin-lot1-programs .cga-program-hero{padding:24px;gap:18px;margin:0}
body.cga-admin-lot1-programs .cga-program-hero-main{min-width:0}
body.cga-admin-lot1-programs .cga-program-hero-main h2{font-size:clamp(24px,2.2vw,32px);line-height:1.2;overflow-wrap:anywhere}
body.cga-admin-lot1-programs .cga-program-facts{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:14px}
body.cga-admin-lot1-programs .cga-program-facts span{font-size:12px}
body.cga-admin-lot1-programs .cga-program-stats{margin:0}
body.cga-admin-lot1-programs .cga-tabs{display:flex;flex-wrap:wrap;gap:6px}
body.cga-admin-lot1-programs .cga-tabs button{min-height:44px}
@media(min-width:901px){
 body.cga-admin-lot1-programs .cga-library-list{max-height:calc(100vh - 330px)!important;overflow:hidden!important}
 body.cga-admin-lot1-programs .cga-library-scroll{max-height:calc(100vh - 430px)!important;overflow-y:auto!important;scrollbar-gutter:stable}
 body.cga-admin-lot1-programs .cga-library-detail{position:sticky;top:20px}
 body.cga-admin-lot1-programs .cga-library-scroll::-webkit-scrollbar{width:8px}
 body.cga-admin-lot1-programs .cga-library-scroll::-webkit-scrollbar-thumb{background:rgba(40,64,76,.28);border-radius:8px}
}
@media(min-width:901px) and (max-width:1180px){
 body.cga-admin-lot1-programs .cga-library-layout{grid-template-columns:280px minmax(0,1fr)}
}
@media(max-width:900px){
 body.cga-admin-lot1-programs .cga-library-layout{grid-template-columns:minmax(0,1fr)}
 body.cga-admin-lot1-programs .cga-program-hero{padding:20px;grid-template-columns:minmax(0,1fr)}
 body.cga-admin-lot1-programs .cga-program-hero .cga-program-edit-button{justify-self:start}
 body.cga-admin-lot1-programs .cga-page-head{margin-bottom:22px}
}

/* Auth screens: maquette composition around the existing WordPress forms. */
body.coab-auth-screen .coab-auth-page{min-height:100vh;background:var(--bg);color:var(--text)}
body.coab-auth-screen .coab-auth-shell-inner{max-width:none;width:100%;margin:0;padding:0}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth]{display:grid;grid-template-columns:1.05fr 1fr;min-height:100vh;width:100%;max-width:none;margin:0;padding:0;gap:0;background:var(--bg)}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth]>.coab-auth-layout__card{display:grid;place-items:center;min-width:0;width:100%;max-width:none;padding:92px 24px 48px;margin:0;background:var(--bg)}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .coab-auth-card{width:min(520px,100%);max-width:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;color:var(--text)}
body.coab-auth-screen--login .coab-auth-layout[data-cg-reference-auth] .coab-auth-card{width:min(460px,100%)}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .certigate-auth-logo{display:none}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .coab-auth-card h2{font-family:var(--serif);font-size:36px;font-weight:600;letter-spacing:-.02em;line-height:1.1;color:var(--text)}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .coab-auth-subtitle{font-size:16px;color:var(--text-2)}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .coab-auth-form{margin-top:30px}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .coab-auth-submit{border-radius:12px;background:var(--gold);color:#141003;font-weight:700}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .coab-auth-links a{color:var(--gold-text)}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual{min-height:100vh}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual .brand{position:relative;z-index:1;align-self:flex-start}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual img{z-index:0}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual::before{z-index:1}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual>div{position:relative;z-index:2}
body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual .auth__points li{white-space:normal}
.cg-auth-brand-mark{display:inline-grid;place-items:center;width:38px;height:38px;margin-right:10px;border:2px solid currentColor;border-radius:50%;font-size:20px}
@media(max-width:900px){body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth]{grid-template-columns:1fr}body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth] .cg-reference-auth-visual{display:none}body.coab-auth-screen .coab-auth-layout[data-cg-reference-auth]>.coab-auth-layout__card{min-height:100vh;padding:96px 20px 40px}}

/* Forgot-password is a single focused action, as in the reference screen. */
body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth]{display:block;min-height:100vh;background:var(--bg)}
body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth]>.coab-auth-layout__card{display:grid;place-items:center;min-height:100vh;padding:72px 20px 48px;background:var(--bg)}
body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth] .coab-auth-card{width:min(520px,100%);padding:38px;border:1px solid var(--line);border-radius:26px;background:var(--surface);box-shadow:var(--shadow);}
body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth] .coab-auth-card h2{font-size:36px}
body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth] .coab-auth-form{margin-top:26px}
body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth] .coab-auth-submit{min-height:50px}
@media(max-width:900px){body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth]>.coab-auth-layout__card{min-height:100svh;padding:32px 16px 28px}body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth] .coab-auth-card{padding:26px 20px;border-radius:20px}body.coab-auth-screen.cg-auth-single .coab-auth-layout[data-cg-reference-auth] .coab-auth-card h2{font-size:30px}}
