/* Shared subject picker and header layout for the full course names. */
.topbar-inner{gap:18px}
.brand{flex:none}
.subject-switch{display:flex;align-items:center;gap:2px;padding:3px;border-radius:10px;background:#f1f4f9;flex:none;white-space:nowrap}
.subject-switch a{padding:6px 10px;border-radius:7px;font-size:.8rem;font-weight:650;color:#475467;line-height:1.3}
.subject-switch a:hover{color:#111827;background:#e8edf5}
.subject-switch a.active{background:#fff;color:#2f64e5;box-shadow:0 1px 4px #11182718}
.terver-page .subject-switch a.active{color:#198754}
.topnav{margin-left:0;gap:23px;flex:none}
@media(min-width:1271px){.terver-page .topbar-inner{gap:12px}.terver-page .topnav{gap:14px}}
@media(max-width:1270px){
  .topbar{height:106px}
  .topbar-inner{height:106px;flex-wrap:wrap;align-content:space-between;padding-top:7px;padding-bottom:0;gap:0 16px}
  .topnav{order:4;width:100%;height:43px;justify-content:flex-start;gap:30px;margin:0}
  .search-trigger{margin-left:auto}
  .sidebar{top:106px;max-height:calc(100vh - 106px)}
}
@media(max-width:960px){
  .topbar{height:148px}
  .topbar-inner{height:148px;align-content:flex-start;padding-top:6px;gap:0 10px}
  .mobile-menu{order:0}
  .brand{order:1;flex:1;min-width:0;font-size:1.05rem}
  .search-trigger{order:2;margin-left:auto}
  .subject-switch{order:3;width:100%;justify-content:center;margin:2px 0}
  .topnav{order:4;width:100%;height:42px;justify-content:space-between;gap:12px;overflow-x:auto}
  .topnav a{white-space:nowrap;font-size:.83rem}
  .sidebar{top:148px;max-height:calc(100vh - 148px)}
}
@media(max-width:600px){
  .topbar-inner{gap:0 7px}
  .brand{font-size:.98rem}
  .brand span,.terver-page .brand span{font-size:.98rem}
  .subject-switch{white-space:normal}
  .subject-switch a{flex:1;min-width:0;text-align:center;font-size:.76rem;line-height:1.2;padding:5px 4px}
  .topnav{gap:12px;justify-content:flex-start}
  .topnav a,.terver-page .topnav a{font-size:.76rem}
}
@media(max-width:385px){
  .brand span,.terver-page .brand span{display:none}
}
