/* Focused premium treatment for an opened job.
   Opening a row should feel like the row expanding, not entering an admin record. */

.route-jobs.job-open .main{
  padding-top:34px;
}

.route-jobs .job-workspace{
  width:min(100%,940px);
  margin:0 auto;
}
.route-jobs .job-workspace[data-job-view="record"]{
  width:min(100%,1120px);
}
.route-jobs .job-workspace[data-job-view="task"]{
  width:min(100%,940px);
}

/* Identity: person first, place second. */
.route-jobs .job-detail-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:20px 34px;
  align-items:end;
  margin:0 0 18px;
}
.route-jobs .job-detail-top .job-back{
  display:inline-flex;
  width:max-content;
  min-height:36px;
  margin:0 0 20px;
  padding:0;
  border:0;
  background:transparent;
  color:#747974;
  font-size:.78rem;
  font-weight:550;
}
.route-jobs .job-detail-top .job-back:hover{
  color:var(--ink);
  text-decoration:none;
}
.route-jobs .job-detail-top .page-title{
  max-width:720px;
  margin:0;
  font-size:clamp(2.45rem,4.3vw,3.65rem);
  line-height:.98;
  letter-spacing:-.05em;
}
.route-jobs .job-detail-top .sub{
  margin-top:10px;
  color:#6b706c;
  font-size:.94rem;
  line-height:1.45;
}
.route-jobs .job-detail-top .actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px 18px;
  padding-bottom:2px;
}
.route-jobs .job-detail-top .actions .btn,
.route-jobs .job-detail-top .actions .btn.primary{
  min-height:40px;
  padding:8px 0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#505650;
  font-size:.8rem;
  font-weight:600;
  box-shadow:none;
}
.route-jobs .job-detail-top .actions .btn:hover,
.route-jobs .job-detail-top .actions .btn.primary:hover{
  color:#80683d;
  background:transparent;
  text-decoration:underline;
  text-underline-offset:4px;
}

/* Job context becomes one editorial metadata line. */
.route-jobs .job-hero{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:6px 12px;
  min-height:46px;
  padding:12px 0 15px;
  margin:0 0 5px;
  border:0;
  border-top:1px solid var(--jobs-line);
  border-bottom:1px solid var(--jobs-line);
  background:transparent;
}
.route-jobs .job-hero-main{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px 0;
  min-width:0;
}
.route-jobs .job-hero-main h2,
.route-jobs .job-hero-main p{
  display:inline-flex;
  align-items:center;
  margin:0;
  color:#686e69;
  font-size:.76rem;
  line-height:1.4;
  font-family:inherit;
  font-weight:550;
  letter-spacing:0;
}
.route-jobs .job-hero-main p::before{
  content:"·";
  margin:0 9px;
  color:#b39a6d;
}
.route-jobs .job-workspace[data-job-view="overview"] .job-work-summary,
.route-jobs .job-workspace[data-job-view="overview"] .job-stove-key-facts{
  display:none;
}
.route-jobs .job-status-pill{
  display:inline-flex;
  align-items:center;
  margin-left:auto;
  padding:0;
  border:0;
  background:transparent;
  color:#747974;
  font-size:.72rem;
  font-weight:550;
  text-transform:none;
}
.route-jobs .job-status-pill::before{
  width:5px;
  height:5px;
  margin-right:7px;
  background:var(--brand-gold);
}
.route-jobs .job-model-source{
  margin-left:0;
  color:#80683d;
  font-size:.72rem;
  font-weight:550;
}

/* Next step is the page's only strong working surface. */
.route-jobs .job-next-action:not(.job-next-menu){
  grid-template-columns:24px minmax(0,1fr) auto;
  gap:12px 20px;
  margin:0;
  padding:27px 0 25px;
  border:0;
  border-bottom:1px solid var(--jobs-line);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.route-jobs .job-next-marker{
  width:22px;
  height:22px;
  font-size:1rem;
}
.route-jobs .job-next-copy>span{
  color:#8a7047;
  font-size:.65rem;
  letter-spacing:.095em;
}
.route-jobs .job-next-copy>strong{
  margin-top:4px;
  font-family:var(--sp-serif,Georgia,"Times New Roman",serif);
  font-size:1.42rem;
  line-height:1.25;
  font-weight:500;
  letter-spacing:-.025em;
}
.route-jobs .job-next-copy>p{
  max-width:650px;
  margin-top:5px;
  font-size:.86rem;
  line-height:1.55;
}
.route-jobs .job-next-button.primary{
  min-height:44px;
  border-radius:6px;
  padding-inline:15px;
  background:#1a1b1b;
  border-color:#1a1b1b;
  color:var(--brand-white);
}

/* Directed next-step menu gets the same editorial treatment. */
.route-jobs .job-workspace .job-next-menu{
  margin:0;
  padding:27px 0 25px;
  border:0;
  border-bottom:1px solid var(--jobs-line);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.route-jobs .job-workspace .job-next-menu .job-choice-direction{
  max-width:720px;
  padding:0 0 16px;
  border-bottom:0;
}
.route-jobs .job-workspace .job-next-menu .job-choice-direction h2{
  margin-top:5px;
  font-family:var(--sp-serif,Georgia,"Times New Roman",serif);
  font-size:1.48rem;
  line-height:1.24;
  font-weight:500;
  letter-spacing:-.028em;
}
.route-jobs .job-workspace .job-next-menu .job-choice-direction p{
  margin-top:6px;
  font-size:.86rem;
}
.route-jobs .job-choice-primary{
  width:min(100%,360px);
  padding-top:10px;
}
.route-jobs .job-workspace .job-next-menu .job-choice-primary .job-choice-lead{
  min-height:50px;
  border-radius:6px;
  box-shadow:none;
}
.route-jobs .job-choice-visit-tools{
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid var(--jobs-line);
}
.route-jobs .job-choice-more{
  margin-top:14px;
  border-top:1px solid var(--jobs-line);
}
.route-jobs .job-choice-more>summary{
  min-height:48px;
  padding:13px 0;
  color:#6a6f6b;
  font-size:.82rem;
}

/* Record access is deliberately quiet. */
.route-jobs .job-record-open{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  margin:17px 0 0;
  padding:0;
  border:0;
  background:transparent;
  color:#80683d;
  font-size:.78rem;
  font-weight:600;
}
.route-jobs .job-record-open::after{
  content:"→";
  margin-left:7px;
  transition:transform var(--sp-motion-base,220ms) var(--sp-motion-ease,ease);
}
@media(hover:hover) and (pointer:fine){
  .route-jobs .job-record-open:hover::after{transform:translate3d(3px,0,0)}
}

/* The record/task views can use more width, but keep the same identity. */
.route-jobs .job-workspace:not([data-job-view="overview"]) .job-detail-top{
  margin-bottom:20px;
}

@media(max-width:720px){
  /* Inside a job the company bar is a quiet strip, so whose job it is and the tabs sit high on the screen. */
  .route-jobs.job-open .mobile-masthead{
    min-height:56px;
    padding-top:calc(6px + env(safe-area-inset-top));
    padding-bottom:6px;
  }
  .route-jobs.job-open .mobile-masthead .brand-symbol{width:24px;height:24px}
  .route-jobs.job-open .mobile-masthead .brand-copy>strong{font-size:.9375rem;line-height:1.25}
  .route-jobs.job-open .mobile-masthead .brand-copy>small{display:none}
  .route-jobs.job-open .main{padding-top:0}
  .route-jobs .job-workspace{width:100%}
  .route-jobs .job-detail-top{
    grid-template-columns:minmax(0,1fr);
    gap:0;
    margin-bottom:4px;
  }
  /* The back link keeps its 44px tap target; the negative margin only removes empty space around it. */
  .route-jobs .job-detail-top .job-back{
    margin:0 0 -8px;
    min-height:44px;
  }
  .route-jobs .job-detail-top .page-title{
    font-size:1.5rem;
    line-height:1.15;
  }
  .route-jobs .job-detail-top .sub{
    margin-top:2px;
    font-size:.9375rem;
    line-height:1.35;
  }
  .route-jobs .job-detail-top .actions{
    justify-content:flex-start;
    gap:4px 18px;
    width:100%;
    overflow:visible;
    padding:0;
  }
  .route-jobs .job-detail-top .actions .btn,
  .route-jobs .job-detail-top .actions .btn.primary{
    flex:0 0 auto;
    min-height:38px;
    padding-block:6px;
  }
  .route-jobs.job-open .job-overview-nav{margin-bottom:8px}
  .route-jobs .job-workspace[data-job-view="task"] .job-detail-top{margin-bottom:4px}
  .route-jobs .job-hero{
    gap:5px 8px;
    padding:11px 0 13px;
  }
  .route-jobs .job-hero-main{
    width:100%;
  }
  .route-jobs .job-status-pill{
    margin-left:0;
  }
  .route-jobs .job-next-action:not(.job-next-menu){
    grid-template-columns:20px minmax(0,1fr);
    gap:10px 12px;
    padding:22px 0 20px;
  }
  .route-jobs .job-next-action:not(.job-next-menu) .job-next-buttons{
    grid-column:1/-1;
    width:100%;
    margin-top:2px;
  }
  .route-jobs .job-next-action:not(.job-next-menu) .job-next-button:only-child{
    width:100%;
  }
  .route-jobs .job-workspace .job-next-menu{
    padding:22px 0 20px;
  }
  .route-jobs .job-workspace .job-next-menu .job-choice-direction h2{
    font-size:1.34rem;
  }
  .route-jobs .job-choice-primary{
    width:100%;
  }
}


/* Terminal closure lives at the end of the job, not at the beginning. */
.route-jobs .job-next-terminal{
  margin-top:38px;
  padding-bottom:4px;
  border-bottom:0;
  animation:job-close-settle 420ms var(--sp-motion-ease,ease) both;
}
.route-jobs .job-next-terminal .job-next-terminal-content{
  display:flex;
  flex-direction:column;
}
.route-jobs .job-next-terminal .job-choice-visit-tools,
.route-jobs .job-next-terminal .job-choice-utilities{
  order:1;
  margin:0;
  padding:0 0 18px;
  border-top:0;
  border-bottom:1px solid var(--jobs-line);
}
.route-jobs .job-next-terminal .job-choice-utilities::before{
  content:"Quick actions";
  flex:0 0 100%;
  display:block;
  margin:0 0 4px;
  color:#8b8f8b;
  font-size:.65rem;
  font-weight:700;
  letter-spacing:.085em;
  text-transform:uppercase;
}
.route-jobs .job-next-terminal .job-choice-more{
  order:2;
  margin:0;
  border-top:0;
  border-bottom:1px solid var(--jobs-line);
}
.route-jobs .job-next-terminal .job-choice-more>summary{
  position:relative;
  min-height:52px;
  padding:16px 28px 16px 0;
}
.route-jobs .job-next-terminal .job-choice-more>summary::after{
  transition:transform 260ms var(--sp-motion-ease,ease),color 220ms ease;
  transform-origin:center;
}
.route-jobs .job-next-terminal .job-choice-more[open]>summary::after{
  transform:rotate(45deg);
  color:#8a7047;
}
.route-jobs .job-next-terminal .job-choice-direction{
  order:3;
  max-width:680px;
  margin-top:30px;
  padding:28px 0 0;
  border-top:0;
}
.route-jobs .job-next-terminal .job-choice-direction>span{
  color:#8a7047;
}
.route-jobs .job-next-terminal .job-choice-direction h2{
  font-size:clamp(1.55rem,2.4vw,1.9rem);
}
.route-jobs .job-next-terminal .job-choice-direction p{
  max-width:620px;
  color:#6e736f;
}
.route-jobs .job-next-terminal .job-choice-primary{
  order:4;
  width:min(100%,390px);
  padding-top:16px;
}
.route-jobs .job-next-terminal .job-choice-primary .job-choice-lead{
  min-height:54px;
  transition:
    transform var(--sp-motion-fast,150ms) var(--sp-motion-ease,ease),
    box-shadow var(--sp-motion-base,240ms) var(--sp-motion-ease,ease),
    background-color 220ms ease;
}
.route-jobs .job-next-terminal .job-choice-primary .job-choice-lead::after{
  transition:transform 240ms var(--sp-motion-ease,ease),color 220ms ease;
}
@media(hover:hover) and (pointer:fine){
  .route-jobs .job-next-terminal .job-choice-primary .job-choice-lead:hover{
    transform:translate3d(0,-2px,0);
    box-shadow:0 10px 24px rgba(20,21,21,.11);
  }
  .route-jobs .job-next-terminal .job-choice-primary .job-choice-lead:hover::after{
    transform:translate3d(4px,0,0);
  }
  .route-jobs .job-next-terminal .job-choice-tools .btn:hover{
    transform:translate3d(2px,0,0);
  }
}

/* Tiny responses make the static information feel touchable without becoming busy. */
.route-jobs .job-status-pill::before{
  transition:transform 240ms var(--sp-motion-ease,ease),box-shadow 240ms ease;
}
.route-jobs .job-hero{
  transition:border-color 240ms ease,background-color 240ms ease;
}
@media(hover:hover) and (pointer:fine){
  .route-jobs .job-hero:hover .job-status-pill::before{
    transform:scale(1.28);
    box-shadow:0 0 0 4px color-mix(in srgb,var(--brand-gold) 10%,transparent);
  }
}
.route-jobs .job-detail-top .actions .btn{
  position:relative;
  text-decoration:none!important;
}
.route-jobs .job-detail-top .actions .btn::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:5px;
  height:1px;
  background:var(--brand-gold);
  transform:scaleX(0);
  transform-origin:left center;
  transition:transform 230ms var(--sp-motion-ease,ease);
}
@media(hover:hover) and (pointer:fine){
  .route-jobs .job-detail-top .actions .btn:hover::after{
    transform:scaleX(1);
  }
}

@keyframes job-close-settle{
  from{opacity:0;transform:translate3d(0,9px,0)}
  to{opacity:1;transform:none}
}

@media(max-width:720px){
  .route-jobs .job-next-terminal{
    margin-top:28px;
  }
  .route-jobs .job-next-terminal .job-choice-direction{
    margin-top:22px;
    padding-top:22px;
  }
  .route-jobs .job-next-terminal .job-choice-primary{
    width:100%;
  }
  .route-jobs .job-next-terminal .job-choice-primary .job-choice-lead{
    width:100%;
    min-height:56px;
  }
}
