/* Home top-priority alerts. Scoped to the portal home only. */
body[data-portal-home] .home-alerts{padding-top:20px;padding-bottom:6px;min-width:0}
body[data-portal-home] .home-alerts-header{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:12px}
body[data-portal-home] .home-alerts-title{display:flex;align-items:center;gap:9px;margin:0;color:#122f63;font-size:clamp(21px,2.4vw,26px);line-height:1.35;letter-spacing:-.025em}
body[data-portal-home] .home-alerts-title svg{width:23px;height:23px;color:#2859a0;flex:none}
body[data-portal-home] .home-alerts-subtitle{margin:5px 0 0;font-size:13px;line-height:1.5;color:#576981}
body[data-portal-home] .home-alerts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
body[data-portal-home] .home-alerts-grid .dashboard-schedule{grid-area:auto}
body[data-portal-home] .home-alert-card{min-width:0;min-height:0;padding:17px 18px;border:1px solid #d9e3f1;border-radius:15px;background:#fff;box-shadow:0 3px 14px rgba(20,45,112,.035)}
body[data-portal-home] .home-alert-card .dashboard-panel-heading{margin-bottom:10px;align-items:center}
body[data-portal-home] .home-alert-card .dashboard-panel-heading h2{font-size:17px;line-height:1.4;margin:0;color:#152f60}
body[data-portal-home] .home-alert-card .dashboard-panel-heading a{font-size:12px}
body[data-portal-home] .home-alert-card .home-schedule-items{gap:8px}
body[data-portal-home] .home-alert-card .home-schedule-link{min-height:74px}
body[data-portal-home] .home-alert-card .home-schedule-date{flex-basis:62px}
body[data-portal-home] .home-recruit-items{list-style:none;margin:0;padding:0;display:grid;gap:8px}
body[data-portal-home] .home-recruit-link{display:flex;align-items:center;gap:11px;min-height:74px;padding:9px 10px;border:1px solid #e0e8f4;border-radius:10px;background:#fafcff;color:#172f55;text-decoration:none;transition:background .16s,border-color .16s}
body[data-portal-home] .home-recruit-link:hover,body[data-portal-home] .home-recruit-link:focus-visible{background:#edf4ff;border-color:#7e9dcf}
body[data-portal-home] .home-recruit-date{flex:0 0 62px;min-height:51px;padding:5px 3px;border-radius:9px;background:#eaf1fc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center}
body[data-portal-home] .home-recruit-day{font-size:13px;font-weight:800;color:#16447f;line-height:1.2}
body[data-portal-home] .home-recruit-countdown{font-size:11px;font-weight:750;line-height:1.3;color:#2b598b}
body[data-portal-home] .home-recruit-copy{flex:1;min-width:0;display:grid;gap:2px}
body[data-portal-home] .home-recruit-company{font-size:12px;font-weight:700;color:#315c92;overflow-wrap:anywhere}
body[data-portal-home] .home-recruit-position{font-size:14px;font-weight:800;line-height:1.45;color:#172f55;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body[data-portal-home] .home-recruit-meta{font-size:11px;line-height:1.4;color:#596c84}
body[data-portal-home] .home-recruit-arrow{flex:none;color:#426596}
body[data-portal-home] .home-alert-empty{margin:0;padding:17px 10px;border:1px dashed #d0dbea;border-radius:10px;background:#fafcff;color:#5d6b80;font-size:13px;line-height:1.7;text-align:center;word-break:keep-all}
body[data-portal-home] .home-alert-empty-link{display:inline-block;min-height:35px;padding:7px;color:#1a4e92;font-weight:700}
body[data-portal-home] .home-alert-card [data-urgency="critical"]{color:#b42318;font-weight:800}
body[data-portal-home] .home-alert-card [data-urgency="soon"]{color:#81521c;font-weight:800}
body[data-portal-home] .home-alert-card .home-schedule-date:has([data-urgency="critical"]),body[data-portal-home] .home-recruit-date:has([data-urgency="critical"]){background:#fff1f0}
body[data-portal-home] .home-alert-card .home-schedule-date:has([data-urgency="soon"]),body[data-portal-home] .home-recruit-date:has([data-urgency="soon"]){background:#fff6e8}
/* The existing schedule preview is moved into alerts, freeing the dashboard rail. */
body[data-portal-home] .dashboard-main{grid-template-areas:"primary side";grid-template-rows:auto;align-items:start}
body[data-portal-home] .dashboard-side{min-width:0}
@media(min-width:901px){
 body[data-portal-home] .dashboard-main{grid-template-areas:"start highlights" "start personal" "search search";grid-template-rows:auto auto auto;align-items:stretch}
 body[data-portal-home] .dashboard-start{grid-area:start}
 body[data-portal-home] .dashboard-highlights{grid-area:highlights}
 body[data-portal-home] .dashboard-personal{grid-area:personal}
 body[data-portal-home] .portal-search{grid-area:search}
}
@media(max-width:900px){
 body[data-portal-home] .dashboard-main{grid-template-columns:minmax(0,1fr);grid-template-areas:"primary" "side";grid-template-rows:auto}
}
@media(max-width:767px){
 body[data-portal-home] .home-alerts{padding-top:14px;padding-bottom:0}
 body[data-portal-home] .home-alerts-header{margin-bottom:9px}
 body[data-portal-home] .home-alerts-title{font-size:21px}
 body[data-portal-home] .home-alerts-subtitle{font-size:12px}
 body[data-portal-home] .home-alerts-grid{grid-template-columns:minmax(0,1fr);gap:10px}
 body[data-portal-home] .home-alert-card{padding:13px}
 body[data-portal-home] .home-alert-card .home-schedule-link,body[data-portal-home] .home-recruit-link{min-height:67px}
 body[data-portal-home] .dashboard-hero{padding-top:14px}
}
@media(prefers-reduced-motion:reduce){
 body[data-portal-home] .home-recruit-link{transition:none}
}

/* Only one of the second-column alert feeds is exposed at a time. */
body[data-portal-home] #home-project-alert-list[hidden],body[data-portal-home] #home-recruit-alert-list[hidden]{display:none!important}

body[data-portal-home] .home-schedule-grade{font-size:11px;font-weight:800;color:#36567d;background:#edf3fa;padding:1px 6px;border-radius:5px}

/* Career-phase students should see job deadlines before course dates. */
body[data-portal-home][data-home-grade="2"] .home-alert-recruit{order:-1}

/* Phase 3: one first-year calendar; second-year job deadlines + shared calendar. */
body[data-portal-home] .home-alert-recruit[hidden]{display:none!important}
body[data-portal-home]:not([data-home-grade="2"]) .home-alerts-grid{grid-template-columns:minmax(0,1fr)}
@media(min-width:768px){
  body[data-portal-home]:not([data-home-grade="2"]) .dashboard-schedule .home-schedule-items{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* A permanent, equally accessible practical-exam entry for both grades. */
body[data-portal-home] .home-practical{min-width:0;padding-top:17px;padding-bottom:0}
body[data-portal-home] .home-practical-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:9px}
body[data-portal-home] .home-practical-heading h2{margin:0;color:#142f63;font-size:19px;letter-spacing:-.025em}
body[data-portal-home] .home-practical-heading>span{font-size:12px;font-weight:750;color:#4c6281}
body[data-portal-home] .home-practical-card{position:relative;display:grid;grid-template-columns:50px minmax(0,1fr) auto;gap:17px;align-items:center;min-width:0;border:1px solid #bfd2eb;border-radius:15px;padding:17px 58px 17px 19px;background:#fafdff;box-shadow:0 3px 14px rgba(20,45,112,.035)}
body[data-portal-home] .home-practical-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:12px;background:#e5effe;color:#245699;flex:none}
body[data-portal-home] .home-practical-icon svg{width:27px;height:27px}
body[data-portal-home] .home-practical-copy{min-width:0}
body[data-portal-home] .home-practical-copy h3{margin:0 0 5px;color:#162f60;font-size:17px;line-height:1.4;font-weight:800;overflow-wrap:anywhere}
body[data-portal-home] .home-practical-copy p{margin:0 0 5px;color:#415a7b;font-size:13px;line-height:1.5;word-break:keep-all}
body[data-portal-home] .home-practical-copy>span{font-size:12px;color:#31588e;font-weight:750}
body[data-portal-home] .home-practical-actions{display:flex;flex-direction:column;gap:7px;align-items:stretch;min-width:190px}
body[data-portal-home] .home-practical-link{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:9px 16px;background:#163d82;color:#fff;text-decoration:none;border-radius:9px;font-size:14px;font-weight:800;white-space:nowrap}
body[data-portal-home] .home-practical-link:hover{background:#2358a4}
body[data-portal-home] .home-practical-cert-link{display:flex;align-items:center;justify-content:center;min-height:34px;color:#25528f;font-size:12px;font-weight:750;text-decoration:underline;text-underline-offset:3px}
body[data-portal-home] .home-practical-favorite{position:absolute;top:10px;right:10px;z-index:1;display:grid;place-items:center;width:42px;height:42px;border:1px solid #d6e3f4;border-radius:50%;background:#fff;color:#284e8b;font-family:inherit;font-weight:600;font-size:25px;line-height:1;cursor:pointer}
body[data-portal-home] .home-practical-favorite[aria-pressed="true"],body[data-portal-home] .home-practical-favorite:hover{background:#e5efff;border-color:#9cb5d9}
body[data-portal-home] .home-practical-favorite:focus-visible,body[data-portal-home] .home-practical-link:focus-visible,body[data-portal-home] .home-practical-cert-link:focus-visible{outline:3px solid #159acc;outline-offset:3px}
@media(max-width:900px){
 body[data-portal-home] .home-practical-card{grid-template-columns:50px minmax(0,1fr);gap:12px;padding:16px 57px 16px 16px}
 body[data-portal-home] .home-practical-actions{grid-column:1/-1;flex-direction:row;align-items:center;gap:13px;min-width:0}
 body[data-portal-home] .home-practical-link{flex:1}
 body[data-portal-home] .home-practical-cert-link{padding:8px}
}
@media(max-width:767px){
 body[data-portal-home] .home-practical{padding-top:13px}
 body[data-portal-home] .home-practical-heading h2{font-size:17px}
 body[data-portal-home] .home-practical-card{grid-template-columns:42px minmax(0,1fr);padding:13px 48px 13px 13px;gap:11px}
 body[data-portal-home] .home-practical-icon{width:42px;height:42px}
 body[data-portal-home] .home-practical-icon svg{width:24px;height:24px}
 body[data-portal-home] .home-practical-copy h3{font-size:15px}
 body[data-portal-home] .home-practical-actions{gap:7px;flex-wrap:wrap}
 body[data-portal-home] .home-practical-link{min-width:0;white-space:normal;font-size:13px}
 body[data-portal-home] .home-practical-favorite{width:37px;height:37px;top:9px;right:8px}
}
@media(max-width:410px){
 body[data-portal-home] .home-practical-actions{flex-direction:column}
 body[data-portal-home] .home-practical-link{width:100%}
 body[data-portal-home] .home-practical-cert-link{min-height:36px}
}

/* Do not hide the third first-year entry on phones: override legacy rail truncation. */
@media(max-width:767px){body[data-portal-home][data-home-grade="1"] .home-schedule-items > li:nth-child(n+3){display:block}}
