/* Shared single-row course header; retain existing palette and control surfaces. */
:root{--shared-header-height:80px}
html{scroll-padding-top:calc(var(--shared-header-height) + 24px)}
.shell{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:24px;height:80px;padding:0 32px}
.shell .plan-brand{margin:0;font-size:20px;gap:10px}
.shell .plan-brand-icon{width:36px;height:36px;font-size:22px}
.course-navigation{min-width:0;justify-self:center;max-width:100%;overflow:auto;scrollbar-width:none}
.course-navigation::-webkit-scrollbar{display:none}
.shell .chapters{width:max-content;max-width:none;gap:4px;padding:5px;justify-content:center;flex-wrap:nowrap}
.shell .chapters[hidden]{display:none}
.shell .chapters a{padding:10px 13px;min-height:44px;font-size:15px}
.shell .switch{width:auto;flex-shrink:0;padding:5px}
.shell .switch button{min-width:0;padding:10px 16px;font-size:14px;white-space:nowrap}
.shell .consult-entry{min-height:46px;padding:11px 18px;font-size:15px}
#course{top:var(--shared-header-height)}
#course iframe{height:100%}
@media(max-width:1250px) and (min-width:761px){
.shell{gap:12px;padding-inline:20px}
.shell .chapters a{padding-inline:8px;font-size:13px}
.shell .switch button{padding-inline:10px;font-size:12px}
.shell .consult-entry{padding-inline:12px;font-size:13px}
.shell .plan-brand{font-size:17px;gap:7px}
}
@media(max-width:760px){
.shell{height:auto;min-height:112px;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;padding:10px 12px}
.shell .plan-brand{font-size:14px;gap:5px}
.shell .plan-brand-icon{width:28px;height:28px;font-size:18px}
.shell .switch{padding:3px;justify-self:end;max-width:100%}
.shell .switch button{font-size:11px;padding:7px 6px;min-height:40px;line-height:1.35;white-space:normal}
.shell .switch small{font-size:8px;margin-left:2px}
.shell .consult-entry{font-size:12px;gap:4px;padding:8px;min-height:40px}
.shell .consult-entry svg{display:none}
.course-navigation{grid-column:1/-1;grid-row:2;justify-self:center;width:100%}
.shell .chapters{min-width:100%;justify-content:space-between}
.shell .chapters a{font-size:12px;min-height:40px;padding:8px}
}

/* Reserve space for the brand in the two-row desktop header. */
@media(min-width:1251px) and (max-width:1450px){
 body:not(.course-view) .shell{
  grid-template-columns:max(140px,calc(max(0px,(100% - 1476px)/2) + max(40px,(100% - 1176px)/2) - 56px)) minmax(0,1fr) auto auto;
 }
}
@media(min-width:1251px){
 body:not(.course-view) .course-navigation{justify-self:start}
}

/* Keep the return-to-plan action visible while viewing the tool course. */
body.course-view .shell .switch button[data-view="plan"][aria-pressed="false"]{
 background:linear-gradient(125deg,#d8edb2,#adc982);
 color:#173d2b;
 box-shadow:inset 0 0 0 1px #eaffc5,inset 0 2px 0 #f5ffe0b3,0 2px 7px #0003;
 cursor:pointer;
 transition:background .18s ease,box-shadow .18s ease,transform .18s ease;
}
body.course-view .shell .switch button[data-view="plan"][aria-pressed="false"] small{
 color:#245035;text-shadow:0 1px #ffffff55;
}
@media(hover:hover){
 body.course-view .shell .switch button[data-view="plan"][aria-pressed="false"]:hover{
  background:linear-gradient(125deg,#e8ffc7,#c4e69a);
  box-shadow:inset 0 0 0 1px #f0ffdc,0 0 0 2px #c8ef9c55,0 3px 10px #0003;
  transform:translateY(-1px);
 }
}
body.course-view .shell .switch button[data-view="plan"]:focus-visible{
 outline:3px solid #e0ffb5;outline-offset:3px;
}
body.course-view .shell .switch button[data-view="plan"]:active{transform:scale(.96);}
@media(prefers-reduced-motion:reduce){
 body.course-view .shell .switch button[data-view="plan"][aria-pressed="false"]{transition:none;}
}
