/* Clear map navigation and accessible controls */
.map-controls>.view-switch{display:flex;flex-wrap:wrap;gap:12px;margin:0;padding:20px;background:transparent;border:0;border-bottom:1px solid var(--border);border-radius:0;box-shadow:none;width:100%;box-sizing:border-box}
.map-controls>.view-switch button{flex:0 1 auto;min-height:48px;padding:12px 22px;border:2px solid var(--teal);border-radius:8px;background:#fff;color:var(--teal-dark);box-shadow:none;white-space:normal;line-height:1.35}
.map-controls>.view-switch button[aria-selected=true]{background:var(--teal);color:#fff;border-color:var(--teal);box-shadow:0 3px 8px #193e7222}
.map-controls>.view-switch button[data-view=funding][aria-selected=true]{background:var(--purple);border-color:var(--purple)}
.map-controls>.view-switch button:hover{box-shadow:0 0 0 3px #0091e222}
.role-finder{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding:16px 20px 6px}.role-finder[hidden]{display:none}.role-finder label{font-weight:700;color:var(--ink)}.role-finder select{min-height:46px;max-width:100%;padding:9px 34px 9px 12px;border:1px solid var(--teal);border-radius:6px;background:white;color:var(--ink);font:inherit}.role-finder span{font-size:.85rem;color:var(--muted)}
.navigation-help{margin:0;padding:12px 20px;font-size:.875rem;color:var(--muted)}
:is(.role-node,.funding-node,.nihr-node,.mobile-role,.stage-head):is(:hover,:focus-visible){outline:3px solid var(--orange);outline-offset:3px;z-index:5;box-shadow:0 4px 14px #193e7233}
button:focus-visible,select:focus-visible{outline:3px solid var(--orange);outline-offset:3px}
@media(max-width:720px){.map-controls>.view-switch{gap:10px;padding:14px}.map-controls>.view-switch button{flex:1 1 140px;padding:12px;min-height:48px}.role-finder{padding:14px 14px 4px;align-items:stretch}.role-finder label,.role-finder select,.role-finder span{width:100%}.navigation-help{padding:12px 14px}.mobile-role{min-height:48px}}

.map-controls{display:flex;align-items:center;flex-wrap:wrap;gap:16px 24px;padding:20px;border-bottom:1px solid var(--border)}
.map-controls>.view-switch{width:auto;padding:0;border:0;flex:0 1 auto}
.map-controls .role-finder{padding:0;flex:1 1 280px;gap:8px 12px}
.map-controls .role-finder select{flex:1;min-width:180px;width:220px}
.map-controls .role-finder span{display:none}
@media(max-width:720px){.map-controls{padding:14px;gap:16px}.map-controls>.view-switch{width:100%;padding:0}.map-controls .role-finder{flex-basis:100%;padding:0}.map-controls .role-finder select{width:100%;min-width:0}}

#nihr-view>.nihr-related{padding:4px 20px 20px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}#nihr-view>.nihr-related>h3,#nihr-view>.nihr-related>p{grid-column:1/-1;margin:0}#nihr-view>.nihr-related>.story-card{margin:0;align-items:flex-start}.nihr-related .archive-label{font-size:.75rem}@media(max-width:900px){#nihr-view>.nihr-related{grid-template-columns:1fr}}
/* Separate related stories from the preceding pathway content. */
#nihr-view>.nihr-related{margin-top:28px;padding-top:24px}
.panel-content>.nihr-related{margin-top:28px;padding-top:8px}

.page-heading>div{width:100%;min-width:0}.heading-share-row{display:flex;align-items:center;justify-content:space-between;gap:20px}.heading-share-row h1{font-size:clamp(32px,3.7vw,58px);white-space:normal;flex:1;margin:0}.social-sharing{display:flex;align-items:center;gap:5px;flex-shrink:0;color:var(--muted)}.social-sharing>span{font-size:12px;margin-right:5px}.social-sharing a,.social-sharing button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:36px;padding:4px 6px;background:transparent;border:0;border-radius:5px;color:var(--dr-navy);font:700 13px Lato,sans-serif;text-decoration:none;cursor:pointer}.social-sharing a:hover,.social-sharing button:hover{background:#e8f3f6}.social-sharing [data-share=linkedin]{font-size:19px}.social-sharing [data-share=facebook]{font-size:21px}.social-sharing [data-share=copy]{font-size:23px}#share-copy{box-sizing:border-box;width:100%;font:inherit;line-height:1.6;padding:12px;border:1px solid var(--border);border-radius:6px;color:var(--ink)}.share-actions{display:flex;flex-wrap:wrap;gap:18px;margin-top:16px}#share-dialog{max-width:600px}#share-dialog>a{font-size:14px}@media(max-width:850px){.heading-share-row{flex-wrap:wrap;gap:12px}.heading-share-row h1{flex-basis:100%}.social-sharing{margin-left:auto}.social-sharing a,.social-sharing button{min-height:44px;min-width:36px}}

/* Keep the supplied sponsor artwork legible without shrinking six logos onto a phone. */
.site-footer{background:#193e72;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 28px;padding-top:0;padding-bottom:20px}.sponsors{flex:0 0 100%;width:100%;min-width:0;max-width:1440px}.sponsor-strip{display:block;width:100%;height:auto;max-width:100%}.sponsor-mobile{display:none}.site-footer .analytics-preferences,.site-footer>a{min-height:44px;display:inline-flex;align-items:center;margin:0}.tool-help-links a{text-decoration:none}.tool-help-links{flex-shrink:0}
@media(max-width:720px){.site-header{flex-wrap:wrap}.tool-help-links{width:100%;justify-content:flex-end;gap:12px!important}.tool-help-links .text-button{font-size:13px;min-height:44px;padding:8px}.site-footer{display:flex;padding:4px 16px 18px;gap:8px 24px}.sponsors{max-width:440px}.sponsor-strip{display:none}.sponsor-mobile{display:block}.sponsor-mobile span{display:block;width:100%;aspect-ratio:660/230;background-image:url('sponsor-logos.jpg');background-repeat:no-repeat;background-size:310.303% auto;background-position:0 50%}.sponsor-mobile span:nth-child(2){background-position:47.5504% 50%}.sponsor-mobile span:nth-child(3){aspect-ratio:728/230;background-size:281.319% auto;background-position:100% 50%}.social-sharing{flex-wrap:wrap;max-width:100%}.social-sharing a,.social-sharing button{min-width:44px}.framework-toolbar{gap:10px}.map-instruction{min-width:0}.map-controls,.role-finder{min-width:0}.story-popup{max-width:100%}.story-navigation{flex-wrap:wrap}.story-navigation button,.story-step-dot,.close-button{min-width:44px;min-height:44px}.panel-content{overflow-wrap:anywhere}.brand{min-width:0}.brand div{min-width:0}.brand strong{overflow-wrap:anywhere}}
@media(max-width:380px){.site-header{padding-inline:16px}.brand strong{font-size:19px}.map-controls>.view-switch{flex-direction:column}.map-controls>.view-switch button{flex-basis:auto;width:100%}.under-map>span{line-height:1.8}}
/* Compact sponsor footer: trim the artwork's empty vertical space in its container. */
.site-footer{padding:12px 24px;gap:8px 24px;justify-content:space-between}.sponsors{flex:0 1 640px;max-width:640px;width:100%;height:60px;overflow:hidden}.sponsor-strip{display:block;width:100%;height:60px;object-fit:cover;object-position:center}.sponsor-mobile{display:none}.site-footer .analytics-preferences,.site-footer>a{font-size:12px;min-height:36px}
@media(max-width:720px){.site-footer{padding:8px 16px;justify-content:center;gap:0 20px}.sponsors{flex:0 0 100%;max-width:500px;height:48px}.sponsor-strip{display:block;height:48px;object-fit:cover}.sponsor-mobile{display:none}.site-footer .analytics-preferences,.site-footer>a{font-size:11px;min-height:36px}}
.site-footer .analytics-preferences{margin-left:auto;justify-content:flex-end;text-align:right}

/* Career story contributions use the same dialog and colours as the framework. */
.site-footer .story-submit-link{border:0;background:transparent;color:#fff;font:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;min-height:44px;padding:4px 0;cursor:pointer;flex-shrink:0}
.site-footer .story-submit-link:hover{text-decoration-thickness:2px}
.site-footer .story-submit-link:focus-visible{outline:3px solid #ff922d;outline-offset:4px}
body.story-submit-open{overflow:hidden}
#story-submit-dialog{box-sizing:border-box;width:calc(100% - 32px);max-width:650px;padding:32px;margin:auto;overscroll-behavior:contain}
#story-submit-dialog .close-button{top:12px;right:12px;min-width:44px;min-height:44px}
#story-submit-dialog .eyebrow{margin:0 40px 10px 0}
#story-submit-dialog h2{margin:0 28px 16px 0}
.story-submit-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0 16px}
.story-submit-options a{display:flex;flex-direction:column;gap:10px;padding:20px;border:2px solid var(--dr-navy);border-radius:6px;background:var(--dr-pale);color:var(--dr-ink);text-decoration:none;overflow-wrap:anywhere}
.story-submit-options a:hover{background:#dceffa;border-color:var(--dr-blue-text);text-decoration:none}
.story-submit-options a:focus-visible{outline:3px solid #ff922d;outline-offset:3px}
.story-submit-options strong{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--dr-navy);font-size:18px}
.story-submit-options a>span{font-size:15px;line-height:1.5}
#story-submit-note{font-size:13px;color:var(--dr-muted);margin:0}
@media(max-width:560px){#story-submit-dialog{padding:28px 22px}.story-submit-options{grid-template-columns:1fr;gap:12px;margin-top:20px}.story-submit-options a{padding:16px}.site-footer .story-submit-link{font-size:11px}}
/* Compact case-study reading on phones; desktop dimensions stay unchanged. */
@media(max-width:720px){
.story-popup .panel-content{padding:18px 16px 20px}
.story-popup .panel-content h2{font-size:23px;line-height:1.15;margin-top:8px;margin-bottom:12px}
.story-popup .panel-content h3,.story-popup .panel-content .story-step-title{font-size:19px!important;line-height:1.3;margin-top:16px;margin-bottom:8px}
.story-popup .panel-content p,.story-popup .story-step-body p{font-size:15px;line-height:1.5;margin-bottom:10px}
.story-popup .story-profile{grid-template-columns:54px minmax(0,1fr);gap:10px;margin:10px 0 12px}
.story-popup .story-portrait{width:54px;height:54px}
.story-popup .story-profile h2{font-size:22px;margin:0 28px 4px 0}
.story-popup .story-profile p{font-size:12px;line-height:1.4;margin:0}
.story-popup .back-button{font-size:12px;margin-bottom:12px;min-height:32px}
.story-popup .panel-content .eyebrow{font-size:10px;line-height:1.3;margin-bottom:6px}
.story-popup .story-quote{font-size:14px;line-height:1.45;margin:12px 0;padding:8px 0 8px 12px}
.story-popup .story-steps{gap:4px;margin:12px 0}
.story-popup .story-step-dot{min-width:36px;min-height:36px;width:36px;height:36px;font-size:12px}
.story-popup .story-step-body{min-height:0}
.story-popup .stage-tags{gap:5px;margin:10px 0 12px}
.story-popup .tag{font-size:11px;padding:5px 7px}
.story-popup .story-navigation{gap:8px;margin-top:14px;padding-top:12px}
.story-popup .story-navigation button{min-height:44px;font-size:13px}
.story-popup .panel-content .archive-label{font-size:11px;line-height:1.45;margin-top:12px}
.story-popup .story-card{padding:10px 12px;margin:8px 0}
.story-popup .story-card .story-name{font-size:18px;margin-bottom:5px}
.story-popup .story-card p{font-size:13px;line-height:1.45;margin-bottom:8px}
.story-popup .story-card-current{grid-template-columns:44px minmax(0,1fr);gap:9px}
.story-popup .story-card-portrait{width:44px;height:44px}
.story-popup .panel-divider{margin:16px 0}
}

/* The NIHR overview keeps career stories in one horizontally scrollable row. */
#nihr-view>.nihr-story-carousel{display:block;min-width:0}
#nihr-view>.nihr-story-carousel>h3{margin:0 0 10px}
#nihr-view>.nihr-story-carousel>p{margin:0 0 12px}
.nihr-story-controls{display:flex;justify-content:flex-end;gap:8px;margin:0 0 10px}
.nihr-story-controls button{width:42px;height:42px;border:1px solid var(--purple);color:var(--purple);background:#fff;border-radius:4px;font-size:1.3rem;cursor:pointer}
.nihr-story-controls button:hover{background:var(--teal-light)}
.nihr-story-track{display:flex;flex-wrap:nowrap;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:2px;padding:3px 3px 14px;overscroll-behavior-x:contain;max-width:100%;min-width:0}
.nihr-story-track>.story-card{flex:0 0 calc((100% - 32px)/3);box-sizing:border-box;min-width:0;margin:0;scroll-snap-align:start;align-content:start;align-items:start}
.nihr-story-track:focus-visible,.nihr-story-controls button:focus-visible{outline:3px solid var(--orange);outline-offset:2px}
@media(max-width:900px){.nihr-story-track>.story-card{flex-basis:calc((100% - 16px)/2)}}
@media(max-width:600px){.nihr-story-track>.story-card{flex-basis:88%}.nihr-story-controls{margin-top:8px}}

/* Keep story controls stable while the reading area scrolls. */
.story-popup.story-mode{overflow:hidden}
.story-popup.story-mode .panel-content{display:flex;flex-direction:column;height:100%;min-height:0;padding:0;overflow:hidden}
.story-reading{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;padding:24px;overscroll-behavior:contain}
.story-popup.story-mode .story-navigation{flex:0 0 auto;flex-wrap:nowrap;margin:0;padding:14px 24px;border-top:1px solid var(--border);background:white;gap:10px}
.story-navigation>span{white-space:nowrap}
.story-card-current:not(:has(>.story-card-portrait)){grid-template-columns:minmax(0,1fr)}
@media(min-width:721px){
 .framework-layout>.popup-rail{margin-top:var(--panel-map-top,0px)}
 .framework-layout.popup-over-map>.popup-rail{top:var(--panel-map-top,0px);margin-top:0}
}
@media(max-width:720px){
 .framework>.popup-rail{width:100%;height:auto;box-sizing:border-box}
 .story-popup{position:relative;left:auto;right:auto;bottom:auto;width:100%;max-height:76dvh;border-radius:0;z-index:auto}
 .story-popup.story-mode{height:min(680px,76dvh)}
 .story-popup .panel-content{min-height:0}
 .story-reading{padding:18px 16px 20px}
 .story-popup.story-mode .story-navigation{padding:12px 16px}
}
@media print{.story-reading{overflow:visible}.story-popup.story-mode,.story-popup.story-mode .panel-content{height:auto;overflow:visible}}

/* Changing a story must not re-anchor the surrounding page. */
.framework-layout{overflow-anchor:none}
