@import url('./brand-fonts/noto-sans-sc/index.css');

/* 2026-10-29 — Public site uses the existing Klassroom administrator type system.
   Admin/dashboard/course authoring screens are intentionally untouched.
   Klassroom already includes OpenSans (body) and Montserrat (headings).
   Navigation enlargement requested earlier remains intact. */

/* Only customer-facing site surfaces, not administrator/course editing screens. */
body.notloggedin,
body#page-site-index,
body[id^="page-local-cometoukapi-public-"],
body[id^="page-local-cometoukapi-course-"] {
 --ctuk-reading-font:'OpenSans','Open Sans',Arial,'Microsoft YaHei',sans-serif;
 --ctuk-heading-font:'Montserrat','OpenSans',Arial,'Microsoft YaHei',sans-serif;
 font-family:var(--ctuk-reading-font)!important;
 letter-spacing:normal;
}

body.notloggedin :is(p,li,dt,dd,th,td,blockquote,small,label,button,input,select,textarea,nav,article,section,header,footer),
body#page-site-index :is(p,li,dt,dd,th,td,blockquote,small,label,button,input,select,textarea,nav,article,section,header,footer),
body[id^="page-local-cometoukapi-public-"] :is(p,li,dt,dd,th,td,blockquote,small,label,button,input,select,textarea,nav,article,section,header,footer),
body[id^="page-local-cometoukapi-course-"] :is(p,li,dt,dd,th,td,blockquote,small,label,button,input,select,textarea,nav,article,section,header,footer) {
 font-family:var(--ctuk-reading-font)!important;
}

body.notloggedin :is(h1,h2,h3,h4,h5,h6),
body#page-site-index :is(h1,h2,h3,h4,h5,h6),
body[id^="page-local-cometoukapi-public-"] :is(h1,h2,h3,h4,h5,h6),
body[id^="page-local-cometoukapi-course-"] :is(h1,h2,h3,h4,h5,h6) {
 font-family:var(--ctuk-heading-font)!important;
}

/* Override former homepage Georgia !important declarations, including when logged in. */
body#page-site-index.theme .ctuk-home .ctuk-metrics .ctuk-card h3,
body#page-site-index.theme .ctuk-home>section:nth-child(2) h2,
body#page-site-index.theme .ctuk-home>.ctuk-learn h2 {
 font-family:var(--ctuk-heading-font)!important;
}

/* Public navigation: larger labels, but leave menu actions and icon fonts intact. */
#nav-main .navbar a.navbar-brand,
#nav-main .navbar a.navbar-brand .site-name,
#nav-main ul.navigation-wrapper ul.navigation>li>a,
#nav-main ul.apply>li>a.btn {
 font-size:17px!important;
 font-weight:600!important;
 line-height:1.3!important;
 letter-spacing:0!important;
}
#nav-main ul.navigation-wrapper ul.navigation>li>a,
#nav-main .navbar a.navbar-brand {
 min-height:46px;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
}
#nav-main .ctuk-language-popover a{font-size:16px!important}
@media(min-width:769px) and (max-width:1250px){
 #nav-main ul.navigation-wrapper ul.navigation>li>a,
 #nav-main ul.apply>li>a.btn,
 #nav-main .navbar a.navbar-brand{font-size:15.5px!important}
}
@media(max-width:768px){
 #nav-main ul.navigation-wrapper ul.navigation>li>a,
 #nav-main .navbar a.navbar-brand{font-size:16px!important;min-height:42px}
 #nav-main ul.apply>li>a.btn{font-size:15px!important}
}

/* 2026-10-29: full Chinese type unification, across anonymous and authenticated pages.
   Noto Sans SC WOFF2 is self-hosted. Preserve the dedicated fonts for icons,
   code, formula rendering, and rich text editor internals. */
body.lang-zh_cn,
body#page-site-index.lang-zh_cn,
body[id^="page-local-cometoukapi-public-"].lang-zh_cn,
body[id^="page-local-cometoukapi-course-"].lang-zh_cn {
 --ctuk-reading-font:'Noto Sans SC Variable','Noto Sans SC',sans-serif;
 --ctuk-heading-font:'Noto Sans SC Variable','Noto Sans SC',sans-serif;
 font-family:var(--ctuk-reading-font)!important;
 letter-spacing:normal;
}
body.lang-zh_cn :is(h1,h2,h3,h4,h5,h6,p,a,span,div,li,dt,dd,th,td,b,strong,em,small,blockquote,label,button,input,select,textarea,option,article,section,header,footer,nav):not(:is(.icon,.fa,.fas,.far,.fab,.glyphicon,.material-icons,.CodeMirror,.ace_editor,.monaco-editor,.MathJax)),
body#page-site-index.lang-zh_cn :is(h1,h2,h3,h4,h5,h6,p,a,span,div,li,dt,dd,th,td,b,strong,em,small,blockquote,label,button,input,select,textarea,option,article,section,header,footer,nav):not(:is(.icon,.fa,.fas,.far,.fab,.glyphicon,.material-icons,.CodeMirror,.ace_editor,.monaco-editor,.MathJax)) {
 font-family:'Noto Sans SC Variable','Noto Sans SC',sans-serif!important;
}
body#page-site-index.lang-zh_cn .ctuk-home .ctuk-metrics .ctuk-card h3,
body#page-site-index.lang-zh_cn .ctuk-home>section:nth-child(2) h2,
body#page-site-index.lang-zh_cn .ctuk-home>.ctuk-learn h2 {
 font-family:'Noto Sans SC Variable','Noto Sans SC',sans-serif!important;
}
body.lang-zh_cn :is(code,pre,kbd,samp,.CodeMirror,.ace_editor,.monaco-editor,.MathJax){
 font-family:ui-monospace,SFMono-Regular,Consolas,monospace!important;
}

/* 2026-10-29: EN/ES navigation density fix. Chinese remains unchanged.
   English/Spanish labels are materially longer than Chinese labels. */
@media (min-width:769px){
 body:is(.lang-en,.lang-es) #nav-main .navbar a.navbar-brand,
 body:is(.lang-en,.lang-es) #nav-main .navbar a.navbar-brand .site-name,
 body:is(.lang-en,.lang-es) #nav-main ul.navigation-wrapper ul.navigation>li>a,
 body:is(.lang-en,.lang-es) #nav-main ul.apply>li>a.btn {
  font-size:clamp(12px,1.02vw,14px)!important;
  font-weight:500!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
 }
 body:is(.lang-en,.lang-es) #nav-main ul.navigation-wrapper ul.navigation>li>a {
  padding-left:clamp(6px,.7vw,11px)!important;
  padding-right:clamp(6px,.7vw,11px)!important;
 }
 body:is(.lang-en,.lang-es) #nav-main .navbar a.navbar-brand {
  padding-left:12px!important;
  padding-right:12px!important;
 }
 body:is(.lang-en,.lang-es) #nav-main ul.navigation-wrapper ul.navigation>li,
 body:is(.lang-en,.lang-es) #nav-main ul.navigation-wrapper ul.navigation {
  white-space:nowrap!important;
 }
}
@media (max-width:768px){
 body:is(.lang-en,.lang-es) #nav-main ul.navigation-wrapper ul.navigation>li>a,
 body:is(.lang-en,.lang-es) #nav-main .navbar a.navbar-brand,
 body:is(.lang-en,.lang-es) #nav-main ul.apply>li>a.btn {
  font-size:14px!important;
  font-weight:500!important;
 }
}
