/* Insight Levels 31153: Cart Gooods-style division only.
   Geometry is new. Colors, semantic content, icons, links and role rules stay owned
   by the original portal/site palette and PHP view helpers. */
.portal-site-layout { min-width:0; }
.portal-site-layout .portal-site-header {
  display:block; width:100%; min-height:0; margin:0; padding:0;
  position:relative; z-index:45; border-bottom:1px solid var(--border);
  background:var(--card); color:var(--ink);
}
.portal-site-header-inner {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; width:min(100%,1600px); min-height:68px;
  margin-inline:auto; padding:10px clamp(14px,2.5vw,32px);
}
.portal-site-header-primary { display:flex; align-items:center; min-width:0; gap:clamp(12px,2.5vw,34px); }
.portal-site-logo { display:inline-flex; flex:none; align-items:center; justify-content:center; }
.portal-site-logo img { display:block; width:clamp(118px,14vw,166px); height:auto; }
.portal-site-links { display:flex; align-items:center; flex-wrap:nowrap; gap:clamp(3px,.8vw,12px); min-width:0; }
.portal-site-links > a,
.portal-site-more > summary {
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-height:40px; padding:6px 9px; color:var(--ink);
  font-size:clamp(12px,1.15vw,14px); font-weight:700; line-height:1.5;
  white-space:nowrap; border-radius:10px; text-decoration:none;
}
.portal-site-more { position:relative; margin:0; }
.portal-site-more > summary { list-style:none; cursor:pointer; }
.portal-site-more > summary::-webkit-details-marker { display:none; }
.portal-site-more > summary svg { width:14px; height:14px; transform:rotate(-90deg); }
.portal-site-more[open] > summary svg { transform:rotate(90deg); }
.portal-site-links > a:hover,
.portal-site-more > summary:hover { background:var(--overview-tint,var(--brand-tint)); color:var(--overview-link,var(--link)); }
.portal-site-links > .portal-site-current { border:1px solid var(--border); }
.portal-site-more-links {
  position:absolute; inset-block-start:100%; inset-inline-start:0; z-index:100;
  display:grid; min-width:185px; padding:7px; background:var(--card);
  color:var(--ink); border:1px solid var(--border); border-radius:13px;
  box-shadow:0 14px 34px rgba(0,0,0,.1);
}
.portal-site-more-links a { display:block; padding:8px 12px; color:var(--ink); font-size:13px; font-weight:700; border-radius:9px; }
.portal-site-more-links a:hover { text-decoration:none; background:var(--overview-tint,var(--brand-tint)); }
.portal-site-actions { display:flex; align-items:center; flex:none; gap:9px; }
.portal-site-actions .admin-header-icon,
.portal-site-actions .trainee-notifications-btn,
.portal-site-actions .sidebar-toggle { display:grid; place-items:center; flex:none; min-width:41px; width:41px; min-height:41px; height:41px; padding:8px; margin:0; }
.portal-site-actions .admin-header-icon .admin-nav-icon { flex:none; }
.portal-site-actions .user-pill { max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.portal-site-actions .sidebar-toggle { display:none; }
.portal-site-header :is(a,summary):focus-visible { outline:2px solid var(--overview-link,var(--primary)); outline-offset:2px; }

/* Move the identity card out of the right/left columns, beneath the site header. */
.portal-welcome-band {
  background:var(--card); border-block-end:1px solid var(--border);
  min-width:0; padding:13px clamp(16px,3vw,36px);
}
.portal-welcome-band > .trainee-welcome {
  display:flex; align-items:center; justify-content:space-between;
  width:min(100%,1540px); min-height:75px; margin:0 auto;
  padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; gap:16px;
}
.portal-welcome-band .trainee-identity { min-width:0; }
.portal-welcome-band .trainee-identity h2 { margin:0; font-size:clamp(17px,2.4vw,23px); line-height:1.35; }
.portal-welcome-band .trainee-identity .eyebrow { margin:0 0 2px; }
.portal-welcome-band .trainee-session { display:flex; flex-wrap:wrap; align-items:center; gap:8px; width:auto; }
.portal-welcome-band .trainee-session > form { display:flex; width:auto; margin:0; }
.portal-welcome-band .trainee-session .btn,
.portal-welcome-band .trainee-session .portal-switch-btn { width:auto; min-height:40px; margin:0; padding:7px 12px; font-size:13px; white-space:nowrap; }
.portal-welcome-band .portal-welcome-logout { margin:0; }
.portal-welcome-band .portal-welcome-logout button { display:inline-flex; align-items:center; gap:6px; }

@media (min-width:781px) {
  .portal-site-layout {
    --portal-column-width:245px;
    display:grid; grid-template-columns:var(--portal-column-width) minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    align-items:start; min-height:100vh;
  }
  /* 31162: Single 1200px centered frame for the authenticated trainee dashboard.
     Header, account banner, sidebar and main content share the SAME outer edges. */
  .portal-site-layout.trainee-shell {
    grid-template-columns:minmax(18px,1fr) 228px minmax(0,972px) minmax(18px,1fr);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    column-gap:0;
  }
  .portal-site-layout.trainee-shell > .sidebar { grid-column:2; grid-row:3; }
  .portal-site-layout.trainee-shell > .main-area { grid-column:3; grid-row:3; }
  .trainee-shell.portal-site-layout .portal-site-header-inner {
    width:min(1200px,calc(100% - 36px));
    margin-inline:auto;
    padding:10px 0;
    gap:0;
  }
  .trainee-shell.portal-site-layout .portal-site-header-primary {
    display:flex; align-items:center; flex:1 1 auto; width:100%; min-width:0;
    gap:clamp(14px,2.2vw,30px);
  }
  /* 31163: Compact, content-sized navigation like the reference header.
     The former space-between + flex:1 made each label occupy a full column
     and created the excessive gaps seen in production. The 1200px frame
     remains shared with the account banner, sidebar and dashboard. */
  .trainee-shell.portal-site-layout .portal-site-links {
    display:flex; align-items:center; flex:0 1 auto;
    width:max-content; max-width:100%; min-width:0;
    justify-content:flex-start; flex-wrap:nowrap;
    gap:clamp(8px,1vw,14px);
  }
  .trainee-shell.portal-site-layout .portal-site-links > :is(.portal-site-main-link,.portal-site-more,.portal-site-current) {
    flex:0 0 auto; min-width:auto; margin:0;
    display:inline-flex; align-items:center; justify-content:center;
  }
  .trainee-shell.portal-site-layout .portal-site-links > .portal-site-current {
    margin-inline-start:4px;
  }
  .trainee-shell.portal-site-layout .portal-site-more > summary { width:auto; }
  .trainee-shell.portal-site-layout .portal-welcome-band { padding-inline:0; }
  .trainee-shell.portal-site-layout .portal-welcome-band > .trainee-welcome {
    width:min(1200px,calc(100% - 36px)); margin-inline:auto;
  }
  .portal-site-layout.admin-desktop-shell { --portal-column-width:var(--admin-nav-width,270px); }
  /* Authenticated trainee uses the exact login-header markup and styling. */
  .portal-site-layout.trainee-shell > .il-auth-site-header { grid-column:1 / -1; grid-row:1; }
  .portal-site-layout > .portal-site-header { grid-column:1 / -1; grid-row:1; }
  .portal-site-layout > .portal-welcome-band { grid-column:1 / -1; grid-row:2; }
  .portal-site-layout > .sidebar {
    grid-column:1; grid-row:3;
    align-self:start; justify-self:stretch;
    position:sticky; inset-block-start:16px; inset-inline: auto;
    width:auto; height:auto; max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
    margin:16px 0 16px 12px; border-radius:16px;
    overflow:auto; box-shadow:none;
  }
  .portal-site-layout.admin-desktop-shell > .sidebar {
    width:auto; height:auto; padding:0;
    overflow:auto; background:var(--admin-nav-bg); color:var(--admin-nav-text);
  }
  .portal-site-layout > .main-area {
    grid-column:2; grid-row:3; align-self:stretch;
    display:flex; flex-direction:column; min-width:0; width:100%;
  }
  .portal-site-layout > .main-area > .content { width:100%; max-width:none; padding:25px clamp(14px,2.4vw,32px) 40px; }
  .portal-site-layout > :is(.trainee-footer,.portal-admin-footer) { grid-column:1 / -1; grid-row:4; }
  .portal-site-layout.trainee-shell > .sidebar > :is(.sidebar-brand,.side-title) { display:none; }
  .portal-site-layout.trainee-shell > .sidebar { padding-block:17px 22px; }
  .portal-site-layout.admin-desktop-shell .desktop-admin-sidebar { height:auto; min-height:0; }
  .portal-site-layout.admin-desktop-shell .admin-nav-scroll { overflow:visible; }
  .portal-site-layout.admin-desktop-shell .admin-nav-brandbar { flex-basis:48px; min-height:48px; }
  .portal-site-layout.admin-desktop-shell .admin-nav-brandbar > a { display:none; }
  .portal-site-layout.admin-desktop-shell .admin-nav-brandbar > .admin-nav-collapse { margin-inline-start:auto; }
  .portal-site-layout.admin-desktop-shell .admin-nav-footer { padding-block:9px; }
  .portal-site-layout .trainee-resume-mobile,
  .portal-site-layout .trainee-section-menu { display:none; }
}

@media (max-width:1100px) and (min-width:781px) {
  .portal-site-header-inner { gap:6px; }
  .portal-site-header-primary { gap:12px; }
  .portal-site-links { gap:1px; }
  .portal-site-links > a, .portal-site-more > summary { padding-inline:6px; font-size:12px; }
  .portal-site-actions .user-pill { max-width:105px; }
  .portal-welcome-band > .trainee-welcome { gap:10px; }
}

@media (max-width:780px) {
  .portal-site-layout { display:block; min-height:100vh; }
  .portal-site-header-inner { min-height:61px; padding:8px 12px; gap:8px; }
  .portal-site-header-primary { gap:7px; }
  .portal-site-logo img { width:clamp(100px,29vw,138px); }
  .portal-site-links > a { display:none; }
  .portal-site-more > summary { width:38px; min-height:38px; padding:6px; font-size:0; }
  .portal-site-more > summary::before { content:'☰'; font-size:21px; line-height:1; }
  .portal-site-more > summary svg { display:none; }
  .portal-site-more-links { inset-inline-start:auto; inset-inline-end:0; min-width:min(260px,calc(100vw - 24px)); }
  .portal-site-more-links::before { content:''; }
  .portal-site-more-links a { min-height:42px; }
  .portal-site-actions { gap:6px; }
  .portal-site-actions .user-pill { display:none; }
  .portal-site-actions .sidebar-toggle { display:grid; }
  .portal-site-actions .admin-header-icon,
  .portal-site-actions .trainee-notifications-btn,
  .portal-site-actions .sidebar-toggle { width:38px; height:38px; min-height:38px; min-width:38px; padding:6px; }
  .portal-welcome-band { padding:14px 12px; }
  .portal-welcome-band > .trainee-welcome {
    display:flex; flex-wrap:wrap; align-items:center; gap:12px;
    width:100%; min-height:0; padding:0; border:0; border-radius:0;
  }
  .portal-welcome-band .trainee-identity { width:100%; }
  .portal-welcome-band .trainee-session { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:8px; }
  .portal-welcome-band .trainee-session > :is(a,form) { width:100%; min-width:0; }
  .portal-welcome-band .trainee-session .btn,
  .portal-welcome-band .trainee-session .portal-switch-btn { width:100%; min-height:41px; font-size:12px; padding:7px 5px; }
  .portal-welcome-band .trainee-session svg { width:16px; }
  .portal-welcome-band .trainee-resume-mobile:not([hidden]) { margin-block-start:12px; }
  .portal-welcome-band .trainee-section-menu { margin-block:12px 0; }
  .portal-site-layout > .main-area { min-width:0; width:100%; }
  .portal-site-layout > .main-area > .content { padding-block-start:18px; }
  .portal-site-layout.admin-desktop-shell > .sidebar {
    position:fixed; inset-block:0; height:100dvh; width:min(390px,84vw);
    margin:0; border-radius:0; max-height:none;
  }
  .portal-site-layout .trainee-footer,
  .portal-site-layout .portal-admin-footer { width:auto; }
}
@media (max-width:390px) {
  .portal-site-header-inner { gap:4px; padding-inline:7px; }
  .portal-site-logo img { width:105px; }
  .portal-site-actions { gap:3px; }
  .portal-site-actions .admin-avatar { width:34px; height:34px; }
  .portal-welcome-band .trainee-identity h2 { font-size:17px; }
}

/* Published palette may style links more specifically; limit the correction to the site navigation. */
.il-portal .portal-site-header .portal-site-links > a,
.il-portal .portal-site-header .portal-site-more > summary,
.il-portal .portal-site-header .portal-site-more-links a { color:var(--ink); }
.il-portal .portal-site-header .portal-site-links > a:hover,
.il-portal .portal-site-header .portal-site-more > summary:hover { color:var(--overview-link,var(--link)); }

.portal-site-mobile-links { display:none; }
@media (max-width:780px){
  .portal-site-mobile-links { display:grid; border-block-end:1px solid var(--border); padding-block-end:6px; margin-block-end:6px; }
}


/* 31154 — Mobile header menu alignment and closed-dropdown containment.
   The details content is EXPLICITLY hidden when closed. In 31153 an author-level
   display:grid on the descendant could override the browser's default display:none,
   producing a large white overlay on the trainee dashboard. */
.portal-site-layout .portal-site-more:not([open]) > .portal-site-more-links {
  display:none !important;
  visibility:hidden;
}
@media (max-width:780px) {
  /* Keep the logo on the right. Move the single website navigation control
     to the extreme left, into the space previously occupied by the bell. */
  .portal-site-layout .portal-site-header-inner {
    position:relative;
    min-width:0;
    padding-left:62px;
  }
  .portal-site-layout .portal-site-header-primary { min-width:0; flex:1 1 auto; }
  .portal-site-layout .portal-site-links { min-width:0; }
  .portal-site-layout .portal-site-more { position:static; }
  .portal-site-layout .portal-site-more > summary {
    position:absolute;
    inset:auto auto auto 12px;
    top:50%; transform:translateY(-50%);
    display:flex; align-items:center; justify-content:center;
    width:42px; height:42px; min-height:42px;
    margin:0; padding:6px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--overview-tint,var(--card));
    z-index:2;
    cursor:pointer;
  }
  .portal-site-layout .portal-site-more-links {
    position:absolute;
    inset:auto auto auto 12px;
    top:calc(100% - 1px);
    display:grid;
    grid-template-columns:minmax(0,1fr);
    box-sizing:border-box;
    width:min(308px,calc(100vw - 24px));
    min-width:0;
    max-width:calc(100vw - 24px);
    max-height:calc(100dvh - 95px);
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    direction:rtl;
    z-index:105;
    padding:8px;
    border-radius:0 0 14px 14px;
    box-shadow:0 16px 28px rgba(0,0,0,.16);
  }
  .portal-site-layout .portal-site-more-links :is(.portal-site-mobile-links,a) {
    min-width:0; max-width:100%; overflow-wrap:anywhere;
  }
  .portal-site-layout .portal-site-more-links a { width:100%; }
  .portal-site-layout .portal-site-actions .admin-avatar { display:none; }
  .portal-site-layout.admin-desktop-shell .portal-site-header-inner { padding-left:114px; }
  .portal-site-layout.admin-desktop-shell .portal-site-actions .sidebar-toggle {
    position:absolute;
    top:50%; left:65px;
    transform:translateY(-50%);
    width:42px; height:42px;
    margin:0;
    z-index:2;
  }
}
@media (max-width:390px) {
  .portal-site-layout .portal-site-header-inner { padding-left:58px; }
  .portal-site-layout .portal-site-more > summary { left:8px; }
  .portal-site-layout .portal-site-more-links { left:8px; width:calc(100vw - 16px); max-width:calc(100vw - 16px); }
  .portal-site-layout.admin-desktop-shell .portal-site-header-inner { padding-left:108px; }
  .portal-site-layout.admin-desktop-shell .portal-site-actions .sidebar-toggle { left:58px; }
}

/* Build 31155 — unify the staff mobile header with the trainee header.
   One hamburger on the far left opens the admin drawer (no duplicate site
   hamburger), while site links remain accessible inside that drawer.
   Desktop site navigation and the existing permissions stay untouched. */
.portal-admin-site-links-mobile { display:none; }
/* Defensive hiding of older header-only icons; in-page alerts remain intact. */
.il-portal .portal-site-header :is(.admin-header-icon,.trainee-notifications-btn,.admin-avatar) {
  display:none !important;
}
@media (max-width:780px) {
  .il-portal .portal-site-layout.admin-desktop-shell .portal-site-header-inner {
    padding-left:66px;
  }
  .il-portal .portal-site-layout.admin-desktop-shell .portal-site-header .portal-site-more {
    display:none !important;
  }
  .il-portal .portal-site-layout.admin-desktop-shell .portal-site-header .portal-site-actions .sidebar-toggle {
    display:grid;
    position:absolute;
    top:50%; left:12px;
    transform:translateY(-50%);
    width:42px; height:42px;
    min-width:42px; min-height:42px;
    padding:8px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--overview-tint,var(--card));
    color:var(--overview-link,var(--ink));
    z-index:2;
  }
  .il-portal .portal-site-layout.admin-desktop-shell .portal-welcome-band .portal-welcome-logout {
    grid-column:1/-1;
  }
  .portal-site-layout.admin-desktop-shell .portal-admin-site-links-mobile {
    display:grid;
    gap:3px;
    margin:14px 0 6px;
    padding-top:10px;
    border-top:1px solid var(--admin-nav-border);
  }
  .portal-site-layout.admin-desktop-shell .portal-admin-site-link {
    display:flex;
    align-items:center;
    min-height:43px;
    padding:9px 13px;
    border-radius:11px;
    color:var(--admin-nav-text);
    font-size:14px;
    font-weight:700;
    text-decoration:none;
  }
  .portal-site-layout.admin-desktop-shell .portal-admin-site-link:is(:hover,:focus-visible) {
    background:var(--admin-nav-active);
    color:var(--admin-nav-text);
  }
}
@media (max-width:390px) {
  .il-portal .portal-site-layout.admin-desktop-shell .portal-site-header-inner {
    padding-left:58px;
  }
  .il-portal .portal-site-layout.admin-desktop-shell .portal-site-header .portal-site-actions .sidebar-toggle {
    left:8px;
  }
}

/* Build 31156 — menu icon geometry only (same SVG in both portal modes).
   Glyph-based ☰ depended on the phone font and rendered heavy/uneven bars.
   Replace it with three equal 15-unit lines, rounded and evenly spaced. */
.portal-site-header .portal-menu-bars {
  display:none;
  flex:none;
  transform:none;
}
@media (max-width:780px) {
  .il-portal .portal-site-layout .portal-site-more > summary::before {
    content:none;
  }
  .il-portal .portal-site-layout .portal-site-more > summary .portal-menu-bars {
    display:block;
    width:24px;
    height:24px;
    transform:none;
  }
  .il-portal .portal-site-layout .portal-site-more[open] > summary .portal-menu-bars {
    transform:none;
  }
  .il-portal .portal-site-layout.admin-desktop-shell .portal-site-actions .sidebar-toggle .portal-menu-bars {
    display:block;
    width:24px;
    height:24px;
    transform:none;
  }
}

/* Tablet widths keep ALL configured site links in the existing More menu.
   No duplicate links or navigation changes; staff drawer remains untouched. */
@media (min-width:781px) and (max-width:960px) {
  .trainee-shell.portal-site-layout .portal-site-links { justify-content:flex-end; gap:10px; }
  .trainee-shell.portal-site-layout .portal-site-links > .portal-site-main-link { display:none; }
  .trainee-shell.portal-site-layout .portal-site-links > .portal-site-current { flex:none; }
  .trainee-shell.portal-site-layout .portal-site-mobile-links {
    display:grid;
    border-block-end:1px solid var(--border);
    padding-block-end:6px;
    margin-block-end:6px;
  }
}

/* Build 31171: authenticated trainee dashboard ONLY.
 * Replace the removed site navigation with ONE balanced identity/logo band.
 * The public login header and admin/staff header are unchanged.
 * Keep the existing action buttons and mobile trainee section menu working.
 */
.il-portal .trainee-shell.portal-site-layout > .portal-welcome-band {
  padding:18px clamp(14px,2.5vw,32px) 22px;
}
.il-portal .trainee-shell.portal-site-layout > .portal-welcome-band > .trainee-welcome.trainee-welcome-brand {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  width:min(100%,1200px);
  min-height:0;
  margin-inline:auto;
  padding:0;
  gap:22px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.il-portal .trainee-shell.portal-site-layout .trainee-brandline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:clamp(20px,5vw,100px);
  width:100%;
  min-height:70px;
}
.il-portal .trainee-shell.portal-site-layout .trainee-welcome-logo {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:clamp(150px,16vw,215px);
  text-decoration:none;
}
.il-portal .trainee-shell.portal-site-layout .trainee-welcome-logo img {
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
}
.il-portal .trainee-shell.portal-site-layout > .portal-welcome-band .trainee-brandline .trainee-identity {
  display:flex;
  flex:0 1 auto;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  min-width:0;
  width:auto;
  margin:0;
  transform:none;
}
.il-portal .trainee-shell.portal-site-layout .trainee-identity-text {
  min-width:0;
  text-align:right;
}
.il-portal .trainee-shell.portal-site-layout .trainee-identity-text h2 {
  margin:0;
  font-size:clamp(16px,2.1vw,23px);
  line-height:1.45;
  overflow-wrap:anywhere;
}
.il-portal .trainee-shell.portal-site-layout > .portal-welcome-band .trainee-brandline .trainee-avatar {
  flex:none;
  display:grid;
  place-items:center;
  text-align:center;
  line-height:1;
  padding:0;
  width:50px;
  height:50px;
  border-radius:13px;
  font-size:18px;
}
/* Do not reserve an empty top-header grid row on desktop after removal. */
@media (min-width:781px) {
  .il-portal .portal-site-layout.trainee-shell {
    grid-template-rows:auto minmax(0,1fr) auto;
  }
  .il-portal .portal-site-layout.trainee-shell > .portal-welcome-band {grid-row:1;}
  .il-portal .portal-site-layout.trainee-shell > #portal-sidebar,
  .il-portal .portal-site-layout.trainee-shell > .main-area {grid-row:2;}
  .il-portal .portal-site-layout.trainee-shell > .trainee-footer {grid-row:3;}
}
@media (max-width:780px) {
  .il-portal .trainee-shell.portal-site-layout > .portal-welcome-band {padding:14px 12px 18px;}
  .il-portal .trainee-shell.portal-site-layout > .portal-welcome-band > .trainee-welcome.trainee-welcome-brand {gap:16px;}
  .il-portal .trainee-shell.portal-site-layout .trainee-brandline {gap:12px; min-height:62px;}
  .il-portal .trainee-shell.portal-site-layout .trainee-welcome-logo {width:clamp(104px,30vw,145px);}
  .il-portal .trainee-shell.portal-site-layout > .portal-welcome-band .trainee-brandline .trainee-identity {width:auto; flex:1 1 0; gap:8px;}
  .il-portal .trainee-shell.portal-site-layout .trainee-identity-text h2 {font-size:clamp(13px,3.1vw,17px);}
  .il-portal .trainee-shell.portal-site-layout > .portal-welcome-band .trainee-brandline .trainee-avatar {width:38px;height:38px;border-radius:10px;font-size:14px;display:grid;place-items:center;line-height:1;padding:0;}
}

/* Build 31172: move the existing trainee actions into the page-title row.
   Desktop: actions occupy the left side of the overview heading, above cards.
   Mobile: keep the two controls accessible without horizontal overflow.
   Do not affect the login screen or the staff/admin dashboard. */
.il-portal .trainee-shell.portal-site-layout > .portal-welcome-band > .trainee-welcome.trainee-welcome-brand {
  gap:0;
}
.il-portal .trainee-shell.portal-site-layout > .portal-welcome-band {
  padding-bottom:18px;
}
.il-portal .trainee-shell.portal-site-layout .main-area > .content > .page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
}
.il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions > .trainee-session {
  display:flex;
  grid-template-columns:none;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  width:auto;
}
.il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions .portal-switch-form {
  display:flex;
  flex:0 0 auto;
  width:auto;
  margin:0;
}
.il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions .trainee-session > a {
  flex:0 0 auto;
  width:auto;
}
.il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions :is(.btn,.portal-switch-btn) {
  width:auto;
  min-height:40px;
  margin:0;
  padding:7px 12px;
  font-size:13px;
  white-space:nowrap;
}
@media (max-width:780px) {
  .il-portal .trainee-shell.portal-site-layout .main-area > .content > .page-heading {
    flex-wrap:wrap;
    gap:12px;
  }
  .il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions {
    width:100%;
  }
}
@media (max-width:360px) {
  .il-portal .trainee-shell.portal-site-layout .main-area .trainee-heading-actions > .trainee-session {
    flex-wrap:wrap;
  }
}


/* Build 31180: same three-part breadcrumb in both trainee and supervision;
   keep section titles inside cards unchanged and avoid a duplicate page h1. */
body.il-portal .portal-site-layout .il-portal-breadcrumb {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px 7px;
  margin:0;
  line-height:1.7;
}
body.il-portal .portal-site-layout .il-portal-breadcrumb a {
  color:inherit;
  text-decoration:none;
}
body.il-portal .portal-site-layout .il-portal-breadcrumb a:hover,
body.il-portal .portal-site-layout .il-portal-breadcrumb a:focus-visible {text-decoration:underline}
body.il-portal .portal-site-layout .il-portal-breadcrumb [aria-current="page"] {font-weight:700}
