/* Final responsive safety layer. Loaded after every feature stylesheet. */
:root{--page-frame:1540px;--page-gutter:34px}
html,body{max-width:100%}
img,video,canvas,svg{max-width:100%}
input,select,textarea,button{max-width:100%}
.mobile-nav,.mobile-more-panel{display:none}
.app-shell,.profile-page,.firms-page,.colleges-page,.events-page,.article-page,.article-editor-page{width:100%;min-width:0}
.post,.card,.rail-card,.firm-panel,.college-panel,.dossier-card,.event-detail,.article-content{min-width:0;overflow-wrap:anywhere}

/* Keep the application navigation visible without removing it from page flow. */
:is(.logged-in,.guest-workspace){padding-top:0}
:is(.logged-in,.guest-workspace) .topbar{
  position:sticky;
  top:0;
  width:100%;
  z-index:60;
  box-shadow:0 4px 18px rgba(20,50,40,.08);
}

@media(max-width:1024px){
  :root{--page-gutter:22px}
  .topbar{gap:18px;padding-inline:22px}
  .topnav{gap:8px}
  .app-shell{grid-template-columns:190px minmax(0,1fr);gap:22px;padding-inline:22px}
  .right-rail{display:none}
  .firms-page,.colleges-page,.events-page{padding-inline:22px}
  .firms-hero,.colleges-hero{grid-template-columns:1fr;padding:34px;gap:24px}
  .firm-card-grid,.college-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .firm-profile-grid,.college-profile-grid{grid-template-columns:minmax(0,1fr) 290px}
  .firm-profile-identity,.college-profile-identity{grid-template-columns:auto minmax(0,1fr);padding-inline:24px}
  .firm-actions,.college-actions{grid-column:1/-1;justify-content:flex-start}
  .firm-actions .outline-btn,.firm-actions .primary-btn,.college-actions .outline-btn,.college-actions .primary-btn{margin-left:0}
  .events-body{grid-template-columns:minmax(300px,.75fr) minmax(0,1.25fr)}
  .event-type-strip{overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
  .event-type-strip button{white-space:nowrap}
  .drawer{width:min(560px,92vw)}
  .jobs-drawer{width:100vw}
  .jobs-body{grid-template-columns:minmax(300px,40%) minmax(0,1fr)}
  .resume-studio-body{grid-template-columns:240px minmax(0,1fr)}
}

@media(max-width:800px){
  :root{--mobile-gutter:14px;--page-gutter:14px}
  body{font-size:14px}
  :is(.logged-in,.guest-workspace){padding-top:0}
  .topbar{height:64px;padding-inline:var(--mobile-gutter);gap:10px}
  .brand{min-width:0;flex:none}
  .brand img{width:132px!important;height:42px!important}
  .search{height:40px;min-width:0;padding-inline:9px}
  .search input{min-width:0;padding-inline:7px}
  .topnav{gap:1px;flex:none}
  .icon-btn{min-width:40px;min-height:40px;padding:9px}
  .profile-menu{min-width:42px;min-height:42px}
  .app-shell{display:block;padding:16px var(--mobile-gutter) 72px}
  .sidebar,.right-rail{display:none}
  .mobile-nav{position:fixed;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));z-index:85;display:grid;grid-template-columns:repeat(5,1fr);min-height:62px;padding:6px;border:1px solid rgba(186,200,192,.9);border-radius:16px;background:rgba(255,253,250,.96);box-shadow:0 16px 42px rgba(12,42,33,.22);backdrop-filter:blur(18px)}
  .mobile-nav button{display:flex;min-width:0;min-height:48px;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;border-radius:10px;background:transparent;color:#617069;cursor:pointer}
  .mobile-nav button:hover,.mobile-nav button:focus-visible,.mobile-nav button.active{outline:0;background:#e7eee9;color:var(--green)}
  .mobile-nav button>span{font-size:18px;line-height:1}.mobile-nav button>small{font-size:12px;font-weight:750;line-height:1.2}
  .mobile-more-panel{position:fixed;right:12px;bottom:84px;z-index:86;display:grid;width:min(260px,calc(100vw - 24px));padding:8px;border:1px solid #d2dbd5;border-radius:14px;background:#fffdfa;box-shadow:0 20px 54px rgba(12,42,33,.24)}
  .mobile-more-panel[hidden]{display:none}.mobile-more-panel button{min-height:44px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:#29443a;text-align:left;font-weight:650;cursor:pointer}.mobile-more-panel button:hover,.mobile-more-panel button:focus-visible{outline:0;background:#e8efea;color:var(--green)}
  .welcome{gap:12px}
  .welcome h1{font-size:clamp(22px,6vw,27px)}
  .composer{padding:15px}
  .composer-row{gap:9px}
  .composer-actions{margin-left:0;overflow-x:auto}
  .composer-actions button{white-space:nowrap;min-height:40px}
  .post{padding:17px 15px}
  .post-head{align-items:flex-start}
  .post-copy{font-size:15px}
  .post-meta{gap:10px;flex-wrap:wrap}
  .post-actions{gap:2px}
  .post-actions button{min-width:44px;min-height:42px;padding:8px}
  .comment-entry input{min-width:0}
  .modal-backdrop{padding:10px;align-items:center}
  .modal{width:100%;max-height:calc(100dvh - 20px);overflow:auto;padding:20px;border-radius:12px}
  .modal-head{position:relative}
  .modal-head button{min-width:42px;min-height:42px}
  .modal-footer{gap:10px}
  .modal-footer .primary-btn{min-height:44px}
  .drawer{inset:64px 0 0 auto;width:100vw;max-width:none;height:calc(100dvh - 64px)}
  .drawer-head{padding-inline:18px}
  .firms-page,.colleges-page,.events-page{padding:18px var(--mobile-gutter) 72px}
  .firms-page-top,.colleges-page-top,.events-page-top{height:auto;min-height:58px;gap:10px}
  .firms-page-top .primary-btn,.colleges-page-top .primary-btn,.events-page-top .primary-btn{font-size:11px}
  .firms-hero,.colleges-hero{grid-template-columns:1fr;padding:27px 22px;border-radius:13px}
  .firms-hero h1,.colleges-hero h1{font-size:clamp(29px,8vw,38px)}
  .firms-directory-head,.colleges-directory-head{margin-top:27px}
  .firm-card-grid,.college-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
  .firm-profile-cover,.college-profile-cover{height:150px}
  .firm-profile-identity,.college-profile-identity{display:flex;flex-wrap:wrap;gap:14px;padding:0 18px 22px}
  .firm-profile-logo,.college-profile-logo{width:88px;height:88px;margin-top:-42px;border-width:5px;font-size:28px}
  .firm-profile-name,.college-profile-copy{flex:1;min-width:180px}
  .firm-profile-name h1,.college-profile-copy h1{font-size:clamp(27px,7vw,36px)}
  .firm-actions,.college-actions{width:100%;display:flex;justify-content:flex-start;overflow-x:auto;padding-bottom:3px;flex-wrap:nowrap}
  .firm-actions button,.college-actions button{flex:none;white-space:nowrap;min-height:42px}
  .firm-profile-grid,.college-profile-grid{display:block}
  .firm-panel,.college-panel{padding:20px}
  .firm-contact dd,.college-contact dd{max-width:100%}
  .firm-team-member,.firm-job{align-items:flex-start}
  .firm-member-edit{min-height:36px}
  .events-toolbar{grid-template-columns:1fr 1fr}
  .events-toolbar .event-search{grid-column:1/-1}
  .events-body{display:block}
  .events-list{max-height:none;border-right:0}
  .event-detail{margin-top:16px}
  .jobs-body{display:block}
  .jobs-list{max-height:42dvh;border-right:0;border-bottom:1px solid var(--line)}
  .job-detail{padding:23px 18px 70px}
  .job-detail-head{display:block}
  .job-form-grid{grid-template-columns:1fr}
  .article-hero h1{font-size:clamp(34px,9vw,48px)}
  .article-content{padding:27px 18px}
  .article-editor-shell{padding-inline:var(--mobile-gutter)}
  .dossier-grid{grid-template-columns:1fr}
  .dossier-identity{align-items:flex-start}
  .resume-studio{inset:0;width:100vw;height:100dvh}
  .resume-studio-head{padding:18px}
  .resume-studio-body{display:block;overflow:auto}
  .resume-template-panel{position:static;width:100%;max-height:220px}
  .resume-preview-stage{min-height:520px}
  .resume-studio-footer{gap:8px;padding:12px}
}

@media(max-width:560px){
  :root{--page-gutter:12px}
  body{font-size:13px}
  .topbar{display:flex;padding-inline:12px;gap:8px;justify-content:space-between}
  .topbar .brand{width:136px!important;min-width:136px!important;flex:0 0 136px!important;justify-content:flex-start;overflow:visible}
  .topbar .brand img{display:block;width:136px!important;max-width:136px;height:40px!important;object-fit:contain;object-position:left center}
  .topbar .brand-tagline{display:none!important}
  .topbar .search{display:flex;width:40px;min-width:40px;max-width:40px;height:40px;flex:0 0 40px;padding:0;justify-content:center;background:transparent;border-color:transparent;cursor:text;transition:background .18s,border-color .18s,box-shadow .18s}
  .topbar .search svg{width:21px;flex:0 0 21px}
  .topbar .search input{width:0;min-width:0;flex:0;padding:0;opacity:0;pointer-events:none}
  .topbar .search:focus-within{position:absolute;top:58px;left:8px;right:8px;z-index:30;width:auto;min-width:0;max-width:none;height:48px;padding:0 14px;justify-content:flex-start;background:#fff;border-color:#8fa99e;box-shadow:0 10px 28px rgba(14,48,38,.2)}
  .topbar .search:focus-within input{width:auto;min-width:0;flex:1;padding:0 10px;opacity:1;pointer-events:auto}
  .topbar .topnav{width:auto;min-width:80px;margin-left:auto;justify-content:flex-end}
  .topnav .icon-btn{min-width:36px;width:36px;padding:7px}
  .topnav .profile-menu{min-width:38px}
  .topnav .avatar{width:34px;height:34px}
  .topnav .profile-menu .profile-chevron{display:none}
  .app-shell{width:100%;max-width:none;padding:14px 8px 68px}
  .feed{width:100%;max-width:none;min-width:0}
  .welcome{display:grid;grid-template-columns:1fr;align-items:start;gap:11px;margin-bottom:18px}
  .welcome>div{min-width:0}
  .welcome h1{margin:0;font-size:clamp(24px,7vw,29px);line-height:1.12}
  .welcome .primary-btn{width:100%;min-height:46px;margin:0;white-space:nowrap;border-radius:8px;font-size:13px}
  .composer,.post{width:100%;max-width:100%;margin-inline:0}
  .composer{padding:14px 12px}
  .composer-prompt{min-width:0;padding-inline:12px}
  .post{margin-bottom:12px;border-radius:8px;padding-inline:14px}
  .post-author{min-width:0}
  .post-author strong,.post-author span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .live-post-attachment{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
  .post-topic{padding:10px}
  .question-box{align-items:flex-start}
  .feed-heading{align-items:flex-end}
  .feed-tabs{overflow-x:auto}
  .modal-backdrop{padding:0;align-items:end}
  .modal{max-height:94dvh;border-radius:16px 16px 0 0;padding:18px}
  .modal-footer{position:sticky;bottom:0;background:var(--paper);padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .firm-card-grid,.college-card-grid{grid-template-columns:1fr}
  .firm-card,.college-card{min-height:0}
  .firm-profile-name,.college-profile-copy{min-width:0;width:100%}
  .firm-profile-name h1,.college-profile-copy h1{font-size:28px}
  .firm-stats,.college-profile-location{gap:10px;flex-wrap:wrap}
  .firm-panel,.college-panel{padding:17px}
  .firm-team-member{flex-wrap:wrap}
  .firm-team-member-copy{min-width:calc(100% - 62px)}
  .firm-member-edit{margin-left:58px}
  .firm-inline-actions{display:grid;grid-template-columns:1fr 1fr}
  .events-toolbar{display:block}
  .events-toolbar>*{width:100%;margin-bottom:9px}
  .event-card-row,.event-detail-head{display:block}
  .profile-page{padding-inline:10px}
  .profile-page-top{align-items:flex-start;gap:8px}
  .profile-page-top>div{overflow-x:auto;max-width:70vw}
  .dossier-identity{padding-inline:14px}
  .dossier-name{min-width:0}
  .dossier-name h1{font-size:23px}
  .dossier-stats{overflow-x:auto;justify-content:flex-start}
  .dossier-stats div{min-width:74px}
  .dossier-card{padding:17px}
  .dossier-left,.dossier-side{display:block}
  .dossier-left>* ,.dossier-side>*{margin-bottom:10px}
  .jobs-toolbar{overflow-x:auto;padding-inline:12px}
  .jobs-toolbar>*{flex:none;min-height:40px}
  .jobs-list{max-height:38dvh}
  .job-detail{padding-inline:14px}
  .article-topbar,.article-editor-top{overflow-x:auto}
  .article-topbar>* ,.article-editor-top>*{flex:none}
  .story-frame{width:100vw;height:100dvh}
  .resume-studio-head h1{font-size:24px}
  .resume-studio-footer>div{display:none}
  .resume-studio-footer button{flex:1}
  .toast{bottom:max(14px,env(safe-area-inset-bottom));width:calc(100% - 28px);text-align:center}
}

@media(max-width:390px){
  .topbar .brand{width:112px!important;min-width:112px!important;flex-basis:112px!important}
  .topbar .brand img{width:112px!important;max-width:112px}
  .feed-heading{display:block}
  .feed-tabs{margin-top:8px}
}

/*
 * One application frame
 * Header and every full-page experience share the same outer width and gutter.
 * Feature styles may control their internal grids, but never their page edges.
 */
:is(.logged-in,.guest-workspace) .topbar,
.app-shell,
.profile-page,
.jobs-page,
.events-page,
.firms-page,
.colleges-page,
.article-topbar,
.article-layout,
.article-editor-top,
.article-editor-shell{
  padding-left:var(--page-gutter);
  padding-right:var(--page-gutter);
}

.app-shell,
.profile-page,
.jobs-page,
.events-page,
.firms-page,
.colleges-page,
.article-topbar,
.article-layout,
.article-editor-top,
.article-editor-shell{
  width:100%;
  max-width:var(--page-frame);
  margin-left:auto;
  margin-right:auto;
}

.firms-page-top,
.firms-directory,
.firm-detail,
.colleges-page-top,
.colleges-directory,
.college-detail{
  width:100%;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
}

/*
 * Shared secondary page navigation.
 * Every full-page view uses the same article-style back/action bar.
 */
.profile-page-top,
.jobs-page-top,
.events-page-top,
.firms-page-top,
.colleges-page-top,
.article-topbar,
.article-editor-top{
  box-sizing:border-box;
  min-height:64px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 var(--page-gutter);
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,rgba(255,253,250,.98),rgba(246,244,237,.97));
  backdrop-filter:blur(12px);
  box-shadow:0 8px 24px rgba(20,50,40,.045);
}

.profile-page-top,
.jobs-page-top,
.events-page-top,
.firms-page-top,
.colleges-page-top{
  position:sticky;
  top:74px;
  z-index:12;
  width:auto;
  max-width:none;
  margin-top:-28px;
  margin-left:calc(-1 * var(--page-gutter));
  margin-right:calc(-1 * var(--page-gutter));
  margin-bottom:24px;
}

.profile-page-top>button:first-child,
.jobs-page-top>button:first-child,
.events-page-top>button:first-child,
.firms-page-top>button:first-child,
.colleges-page-top>button:first-child,
.article-topbar>button:first-child,
.article-editor-top>button:first-child{
  margin:0;
  min-height:38px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:8px;
  background:rgba(232,237,231,.7);
  color:var(--green);
  font-weight:750;
  cursor:pointer;
  transition:background .18s,border-color .18s,transform .18s;
}

.profile-page-top>button:first-child:hover,
.jobs-page-top>button:first-child:hover,
.events-page-top>button:first-child:hover,
.firms-page-top>button:first-child:hover,
.colleges-page-top>button:first-child:hover,
.article-topbar>button:first-child:hover,
.article-editor-top>button:first-child:hover{
  background:#e3ebe6;
  border-color:#cedbd3;
  transform:translateX(-2px);
}

.profile-page-top .primary-btn,
.jobs-page-top .primary-btn,
.events-page-top .primary-btn,
.firms-page-top .primary-btn,
.colleges-page-top .primary-btn,
.article-topbar .primary-btn,
.article-editor-top .primary-btn{
  min-height:44px;
  padding:0 18px;
  border-radius:8px;
}

/* Directory pages: editorial scale without oversized empty columns. */
.firms-hero,.colleges-hero{
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 22px 52px rgba(18,54,43,.14);
}
.firms-directory-head,.colleges-directory-head{margin-top:32px}
.firm-card-grid,.college-card-grid{
  grid-template-columns:repeat(auto-fill,minmax(300px,420px));
  justify-content:start;
  gap:20px;
}
.firm-card,.college-card{
  width:100%;
  min-height:0;
  box-shadow:0 8px 25px rgba(25,45,36,.055);
}
.firm-card-cover{height:94px}
.firm-card-body{padding-bottom:24px}
.firm-card h3{font-size:22px}

@media(max-width:800px){
  .profile-page-top,
  .jobs-page-top,
  .events-page-top,
  .firms-page-top,
  .colleges-page-top,
  .article-topbar,
  .article-editor-top{
    min-height:64px;
    height:64px;
    top:64px;
    gap:10px;
  }
  .profile-page-top,
  .jobs-page-top,
  .events-page-top,
  .firms-page-top,
  .colleges-page-top{
    margin-top:-18px;
  }
  .jobs-page .jobs-toolbar,.events-toolbar{top:128px}
  .firm-card-grid,.college-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:560px){
  .firm-card-grid,.college-card-grid{grid-template-columns:1fr}
  .profile-page-top>button:first-child,
  .jobs-page-top>button:first-child,
  .events-page-top>button:first-child,
  .firms-page-top>button:first-child,
  .colleges-page-top>button:first-child,
  .article-topbar>button:first-child,
  .article-editor-top>button:first-child{
    padding-inline:8px;
    background:transparent;
  }
}

/* All dialogs must sit above the sticky navigation and remain viewport-safe. */
.modal-backdrop{
  z-index:90;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right))
          max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
}
.modal-backdrop.open{
  display:flex;
  align-items:center;
  justify-content:center;
}
.modal-backdrop>.modal{
  position:relative;
  max-height:calc(100dvh - 40px);
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid rgba(255,255,255,.7);
  border-radius:14px;
  box-shadow:0 30px 90px rgba(5,24,18,.35);
}
.modal-backdrop>.modal>.modal-head{
  position:sticky;
  top:0;
  z-index:5;
  background:linear-gradient(180deg,var(--paper) 80%,rgba(255,253,250,.94));
}
.modal-backdrop>.modal>.modal-head button{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:50%;
}
.modal-backdrop>.modal>.modal-head button:hover{background:#e9eeea}

/* Consistent typography for structured forms; editorial composers keep serif text. */
button,input,select,textarea{font:inherit}
.job-modal,
.firm-modal,
.college-modal,
.event-modal,
.apply-modal{
  --form-font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.job-modal label,
.firm-modal label,
.college-modal label,
.event-modal label,
.apply-modal label{
  font-family:var(--form-font);
  font-size:11px;
  line-height:1.35;
  font-weight:750;
  letter-spacing:0;
  color:#243c34;
}
.job-modal input,
.job-modal select,
.job-modal textarea,
.firm-modal input,
.firm-modal select,
.firm-modal textarea,
.college-modal input,
.college-modal select,
.college-modal textarea,
.event-modal input,
.event-modal select,
.event-modal textarea,
.apply-modal input,
.apply-modal select,
.apply-modal textarea{
  font-family:var(--form-font)!important;
  font-size:14px!important;
  line-height:1.5;
  font-weight:450;
  letter-spacing:0;
  color:var(--ink);
}
.job-modal input::placeholder,
.job-modal textarea::placeholder,
.firm-modal input::placeholder,
.firm-modal textarea::placeholder,
.college-modal input::placeholder,
.college-modal textarea::placeholder,
.event-modal input::placeholder,
.event-modal textarea::placeholder,
.apply-modal input::placeholder,
.apply-modal textarea::placeholder{
  color:#7b837f;
  font-weight:400;
  opacity:1;
}
.job-modal input[readonly],
.firm-modal input[readonly],
.college-modal input[readonly],
.event-modal input[readonly]{
  color:#30443d;
  font-weight:600;
  background:#f3f3ee;
}
.job-modal select option,
.firm-modal select option,
.college-modal select option,
.event-modal select option,
.apply-modal select option{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important;
  font-size:14px!important;
  font-weight:400!important;
  color:var(--ink);
  background:#fffdfa;
}
.job-modal .wide-label textarea{font-size:15px!important;line-height:1.6}

/* Branded dropdowns replace inconsistent operating-system select menus. */
.native-select-hidden{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important;
}
.custom-select{position:relative;width:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.custom-select-trigger{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 13px;
  border:1px solid #d7d9d2;
  border-radius:7px;
  background:#fbfaf6;
  color:var(--ink);
  text-align:left;
  font-size:14px;
  font-weight:450;
  cursor:pointer;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
.custom-select-trigger:hover{border-color:#9fb2a8;background:#fff}
.custom-select.open .custom-select-trigger{
  border-color:#4c806e;
  background:#fff;
  box-shadow:0 0 0 4px rgba(35,100,79,.1);
}
.custom-select-trigger span.placeholder{color:#7b837f}
.custom-select-trigger i{
  width:8px;
  height:8px;
  flex:0 0 auto;
  border-right:2px solid #35584c;
  border-bottom:2px solid #35584c;
  transform:rotate(45deg) translateY(-2px);
  transition:transform .18s;
}
.custom-select.open .custom-select-trigger i{transform:rotate(225deg) translate(-1px,-1px)}
.custom-select-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 7px);
  z-index:30;
  display:none;
  max-height:240px;
  overflow:auto;
  padding:6px;
  border:1px solid #cbd7d0;
  border-radius:10px;
  background:#fffdfa;
  box-shadow:0 18px 48px rgba(12,42,33,.2);
}
.custom-select.open .custom-select-menu{display:grid;gap:2px;animation:selectMenuIn .14s ease-out}
.custom-select-option{
  width:100%;
  min-height:40px;
  padding:8px 11px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#29433a;
  text-align:left;
  font-size:14px;
  font-weight:450;
  cursor:pointer;
}
.custom-select-option:hover,.custom-select-option:focus{outline:0;background:#e9f0ec;color:#174b3d}
.custom-select-option.selected{background:#dceae3;color:#114b3a;font-weight:700}
.custom-select-option.selected:after{content:"✓";float:right;color:#28705a}
@keyframes selectMenuIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}


@media(max-width:560px){
  #modal{inset:0;padding:0;background:#fffdfa;backdrop-filter:none}
  #modal.open{display:block}
  #modal>.modal{display:flex;flex-direction:column;width:100vw;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:0 18px;overflow-y:auto;overscroll-behavior:contain;border:0;border-radius:0;background:#fffdfa;box-shadow:none;animation:mobileComposerIn .18s ease-out}
  #modal .modal-head{position:sticky;top:0;z-index:4;flex:none;align-items:flex-start;margin:0 -18px;padding:20px 18px 15px;background:rgba(255,253,250,.97);border-bottom:1px solid #e2e3dc;backdrop-filter:blur(12px)}
  #modal .modal-head h2{font-size:28px;line-height:1.08}
  #modal .modal-head .eyebrow{margin-bottom:7px}
  #modal .modal-head button{width:44px;height:44px;display:grid;place-items:center;padding:0;border-radius:50%}
  #modal .modal-author{flex:none;margin:16px 0 10px}
  #modal #postText{flex:none;width:100%;min-height:28dvh;max-height:42dvh;margin:0;padding:18px 2px;border-bottom:1px solid var(--line);font-size:19px;line-height:1.5;resize:vertical}
  #modal .poll-builder,#modal .topic-picker{flex:none;margin-top:14px}
  #modal .poll-builder{padding:13px}
  #modal .poll-option-input{min-height:46px}
  #modal .topic-suggestions{max-height:22dvh;overflow:auto}
  #modal .modal-tools{position:sticky;bottom:66px;z-index:3;flex:none;display:flex;gap:3px;margin:14px -18px 0;padding:10px 12px;overflow-x:auto;background:rgba(255,253,250,.97);border-top:1px solid #e2e3dc;backdrop-filter:blur(12px)}
  #modal .modal-tools button{flex:none;min-height:42px;padding:8px 10px;white-space:nowrap}
  #modal .modal-tools #fileStatus{flex:none;max-width:110px}
  #modal .modal-footer{position:sticky;bottom:0;z-index:4;flex:none;display:flex;margin:0 -18px;padding:10px 18px max(12px,env(safe-area-inset-bottom));background:rgba(255,253,250,.98);border-top:1px solid #d9ddd7;box-shadow:0 -8px 24px rgba(18,56,44,.08)}
  #modal .modal-footer span{display:none}
  #modal .modal-footer .primary-btn{width:100%;min-height:48px;margin:0;border-radius:9px;font-size:14px}
  @keyframes mobileComposerIn{from{opacity:.7;transform:translateY(10px)}to{opacity:1;transform:none}}
}

@media(hover:none) and (pointer:coarse){
  button,a,input,select,textarea{touch-action:manipulation}
  .nav-item,.icon-btn,.outline-btn,.primary-btn,.text-link,.tab{min-height:44px}
  input,select{min-height:44px}
  .firm-field-edit{width:36px;height:36px}
}

/* Keep the working primary navigation available throughout laptop/desktop views. */
@media(min-width:1001px){
body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) .app-shell{display:block!important;position:fixed;inset:74px auto 0 0;z-index:14;width:290px;max-width:none;margin:0;padding:28px 16px 18px 34px;background:var(--cream);border-right:1px solid rgba(210,212,203,.8)}
body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) .app-shell>.feed,body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) .app-shell>.right-rail{display:none!important}
body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) .app-shell>.sidebar{display:flex;position:static;width:240px;height:100%;max-height:none}
body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) :is(.profile-page,.jobs-page,.events-page,.firms-page,.colleges-page,.article-page,.article-editor-page){width:calc(100% - 290px);max-width:none;margin-left:290px}
body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) .sidebar-footer{display:none}
body:is(.profile-view,.jobs-view,.events-view,.firms-view,.colleges-view,.article-view,.article-editor-view) :is(.profile-page-top,.jobs-page-top,.events-page-top,.firms-page-top,.colleges-page-top,.article-topbar,.article-editor-top)>button:first-child{display:none!important}
body.events-view .events-page-top{display:none!important}
}
