html:has(.deskOverview) { background-color:var(--studio-backdrop); scrollbar-gutter:auto; }
.main:has(> .deskOverview) { max-width:none; }
.deskWorkSection > .projectgrid { grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr)); }
.deskWorkSection,.deskProjectsSection,.deskOverview > *,#deskQueue { min-width:0; }
.deskOverview .deliveryClock { max-width:none; }
.deskOverview .deliveryFoot > div,.deskOverview .metric,.deskActivity li { min-width:0; }
.deskOverview .deliveryFoot > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:.12rem .7rem; max-width:100%; }
.deskOverview .deliveryFoot h2 { font-size:clamp(1.4rem,3.6cqw,1.9rem); line-height:1.12; overflow-wrap:anywhere; }
.deskOverview .deliveryFoot p { margin:0; }
.deskOverview .deliveryFoot > div { display:grid; grid-template-columns:minmax(0,auto) auto; align-items:baseline; justify-content:start; }
.deliveryIdentity { display:flex; align-items:baseline; flex-wrap:wrap; gap:.2rem .65rem; min-width:0; }
.deliveryPhase { padding:.16em .55em; border:1px solid #44392133; border-radius:100px; font:650 clamp(1rem,1.7cqw,1.3rem)/1.2 DM,sans-serif; }
.deliveryClient { grid-column:1; grid-row:2; font-size:var(--type-small); color:#443921; overflow-wrap:anywhere; }
.deliveryIdentity ~ p { grid-column:2; grid-row:1; }
@container (max-width:38rem) {
  .deskOverview .deliveryFoot > div { grid-template-columns:minmax(0,1fr); }
  .deliveryIdentity ~ p { grid-column:1; grid-row:auto; }
}
.deskOverview h2,.deskOverview .activityIdentity,.deskOverview .metric span { overflow-wrap:anywhere; }

/* The frame follows the left column. Only its list scrolls. */
.deskActivity .activityFrame {
  display:flex; flex-direction:column; min-width:0; min-height:0;
  border:1px solid var(--edge); border-radius:20px; background:var(--pane);
  box-shadow:var(--shine); overflow:hidden;
}
.activityFrame .notificationList {
  flex:1; min-height:0; align-content:start; grid-auto-rows:max-content;
  margin:0; padding:.65rem; overflow-x:hidden; overflow-y:auto;
}
.deskActivity .activityFrame .notificationList:has(li:nth-child(4)) { grid-auto-rows:max-content; }
.deskActivity .activityFrame .activityItem { background:var(--floating-pane); }
.deskActivity .activityFrame .activityCard { height:auto; }
.activityFrame .notificationList > li { position:relative; }
.deskActivity .activityFrame button.activityCard { padding-inline-end:2.9rem; }
.activityFrame button[data-act="noticeRead"] {
  position:absolute; right:.52rem; top:50%; transform:translateY(-50%);
  width:max(24px,1.7rem); height:max(24px,1.7rem); padding:0; display:grid; place-items:center;
  border:1px solid var(--edge); border-radius:50%; color:var(--muted); background:var(--pane);
}
.activityFrame button[data-act="noticeRead"]:is(:hover,:focus-visible) { color:var(--ink); background:var(--floating-pane); border-color:currentColor; }
.deskActivity .activityFrame .activityEmpty {
  flex:1; align-self:stretch; border:0; border-radius:0; background:transparent;
  box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
}
@media (min-width:991px) {
  .deskActivity .activityFrame { align-self:stretch; contain:size; }
  .deskActivity .activityFrame .notificationList { align-self:stretch; }
  .deskActivity .activityFrame .activityEmpty { min-height:0; }
}

@media (min-width:991px) and (min-height:640px) {
  .maincol:has(.deskOverview) { display:flex; flex-direction:column; height:100dvh; }
  .maincol:has(.deskOverview) > .top { flex:none; }
  .main:has(> .deskOverview) {
    --desk-gap:clamp(10px,1.4vh,25px);
    --desk-pad:clamp(12px,1.45vh,27px);
    width:100%; margin:0; min-height:0; flex:1; display:grid;
    grid-template-rows:minmax(min-content,1fr) auto auto; gap:var(--desk-gap);
    padding:var(--desk-pad) clamp(16px,1.8vw,56px);
  }
  /* Staff desks give the queue the space left by the overview and project gallery. */
  .main:has(> .deskOverview:not(.portalOverview)) {
    display:flex; flex-direction:column;
  }
  .deskOverview:not(.portalOverview),.deskProjectsSection { flex:none; }
  .deskWorkSection:has(> #deskQueue),#deskQueue {
    display:flex; flex-direction:column; min-height:0;
  }
  .deskWorkSection:has(> #deskQueue) { flex:none; }
  .deskWorkSection:has(#deskQueue tbody tr:nth-child(2)) {
    flex:0 1 auto; min-height:9rem;
  }
  .deskWorkSection:has(> #deskQueue) > .secthead { flex:none; }
  .deskOverview { row-gap:var(--desk-gap); min-height:0; grid-template-rows:auto minmax(min-content,1fr); }
  .deskOverview:not(.portalOverview) { column-gap:var(--desk-gap); row-gap:var(--desk-gap); }
  .deskOverview .pagehead { margin:0; padding:0; align-items:center; }
  .deskOverview .pagehead h1 { font-size:clamp(30px,3.7vh,62px); }
  .deskOverview .pagehead .eyebrow { margin-bottom:3px; }
  .deskOverview:not(.portalOverview) > .homegrid { grid-template-rows:minmax(min-content,1fr) auto; }
  .deskOverview .homegrid { gap:var(--desk-gap); min-height:0; }
  .deskOverview .deliveryHero { min-height:min-content; padding:var(--desk-pad) clamp(14px,1.5vw,38px); gap:.3rem; }
  .deskOverview .deliveryClock strong { font-size:clamp(35px,min(9cqw,6.2vh),108px); }
  .deskOverview .deliveryFoot { padding-top:clamp(4px,.7vh,14px); }
  .deskOverview .desk h2,.deskOverview .deskActivity h2,.deskWorkSection h2,.deskProjectsSection h2 { font-size:clamp(19px,2.1vh,32px); }
  .deskOverview .deskMetrics { margin-top:6px; gap:var(--desk-gap); }
  .deskOverview .desk .metric { min-height:0; padding:clamp(9px,1.1vh,21px) clamp(10px,.9vw,26px); grid-template-columns:auto 1fr auto; align-items:center; gap:3px .55rem; }
  .deskOverview .metric .metricicon { grid-column:1; grid-row:1; }
  .deskOverview .desk .metric b { grid-column:2; grid-row:1; margin:0; font-size:clamp(26px,3.4vh,55px); }
  .deskOverview .desk .metric > svg { grid-column:3; }
  .deskOverview .desk .metric span:not(.metricicon) { grid-column:1/-1; }
  .deskActivity { min-height:0; }
  .deskWorkSection .secthead,.deskProjectsSection .secthead { margin:0 0 clamp(3px,.55vh,10px); }
  .deskWorkSection .queueWrap { max-height:none; min-height:0; overflow:auto; }
  .deskWorkSection .queueWrap td { padding-block:clamp(4px,.65vh,14px); }
  .deskWorkSection .queueWrap th button { padding-block:clamp(5px,.65vh,14px); }
  .deskWorkSection .empty,.deskProjectsSection .empty { padding:var(--desk-pad); }
  .portalOverview { display:grid; grid-template-columns:1fr; }
  .portalOverview .deskMetrics { align-content:stretch; }
  .deskWorkSection > .projectgrid { max-height:24dvh; overflow:auto; }
  .deskWorkSection .issueOpen { display:flex; align-items:center; }
  .deskWorkSection .issueOpen .projectphoto { width:28%; height:clamp(42px,7vh,100px); flex:none; }
  .deskWorkSection .issueCard .projecttext,.deskWorkSection .issueCard .issueDates { padding:clamp(6px,.8vh,14px); }
  .deskWorkSection .issueCard .issueDates { margin:0; }
}
@media (min-width:991px) and (max-height:920px) {
  .deskOverview:not(.portalOverview) { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); }
}
@media (max-width:990px) {
  .main:has(> .deskOverview) { padding-block:16px; }
  .deskWorkSection .queueWrap { max-height:45dvh; }
  .deskOverview,.deskOverview .homegrid { gap:14px; }
  .deskOverview:not(.portalOverview) .deliveryHero { min-height:0; padding:1rem; gap:.85rem; }
  .deskOverview:not(.portalOverview) .metric { min-height:0; }
  .deskActivity .activityFrame .activityCard { padding-block:.55rem; }
  .deskWorkSection .secthead,.deskProjectsSection .secthead { margin:18px 0 8px; }
}

@media (min-width:991px) and (min-height:640px) {
  .deskOverview .homegrid { align-items:stretch; align-content:stretch; }
  .portalOverview .homegrid { align-self:stretch; grid-template-rows:minmax(0,1fr); margin-bottom:0; }
  .deskWorkSection .projectgrid .issueCard { min-width:0; }
}
@media (min-width:991px) and (max-height:920px) and (min-height:640px) {
  .deskOverview .deliveryHero:not(.noDelivery) { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); grid-template-rows:auto 1fr; align-content:center; gap:.35rem .75rem; }
  .deskOverview .deliveryKicker { grid-column:1/-1; }
  .deskOverview .deliveryClock,.deskOverview .deliveryFoot { align-self:center; }
  .deskOverview .deliveryFoot { border:0; border-left:1px solid #0003; padding:0 0 0 .65rem; gap:.3rem; flex-direction:column; align-items:flex-start; }
  .deskOverview .deliveryFoot .button { padding:4px 8px; }
  .deskOverview .deliveryFoot h2 { font-size:1.3rem; }
  .deskOverview .deliveryFoot p { margin:0; font-size:var(--type-caption); }
  .deskOverview .deliveryClock strong { font-size:clamp(27px,6cqw,45px); }
  .deskOverview .deliveryClock { gap:4px; }
  .deskOverview .deliveryClock small { font-size:var(--type-compact); }
  .deskOverview .deliveryHero { justify-content:initial; padding-block:6px; }
}
@media (min-width:991px) and (min-height:921px) {
  .deskOverview .deliveryClock strong { font-size:clamp(48px,min(12cqw,8.5vh),145px); }
  .deskOverview .desk .metric { min-height:clamp(92px,10vh,170px); align-content:center; }
  .deskOverview:not(.portalOverview) .desk .metric { min-height:clamp(4.7rem,7dvh,6.25rem); }
  .deskOverview:not(.portalOverview) .deliveryClock strong { font-size:clamp(48px,min(10cqw,7.5dvh),108px); }
  .deskWorkSection .queueWrap td { padding-block:clamp(7px,.75dvh,12px); }
}

/* Four permanent desktop slots keep the preview sizes independent of the unread count. */
@media (min-width:1500px) {
  .deskActivity .activityFrame {
    --activity-gap:.375rem;
    --activity-padding:.5rem;
    --activity-spacing:calc(3 * var(--activity-gap) + 2 * var(--activity-padding));
    min-height:calc(4 * clamp(4.25rem,6.7dvh,6.5rem) + var(--activity-spacing) + 2px);
  }
  .deskActivity .activityFrame .notificationList {
    box-sizing:border-box; width:100%; min-height:0;
    grid-template-columns:minmax(0,1fr); grid-template-rows:repeat(4,minmax(0,1fr));
    gap:var(--activity-gap); padding:var(--activity-padding);
  }
  .deskActivity .activityFrame .activityCard {
    height:100%; min-height:0; padding:.28rem .65rem;
    grid-template-columns:2rem minmax(0,1fr) auto;
    grid-template-areas:"avatar sender category" "avatar subject subject" "avatar project received";
    align-items:center; align-content:center; gap:.12rem .5rem;
  }
  .activityFrame .activityAvatar { grid-area:avatar; align-self:center; }
  .activityFrame .activityIdentity { grid-area:sender; min-width:0; flex-wrap:nowrap; }
  .activityFrame .noticeRole { flex:none; }
  .activityFrame .activitySubject { grid-area:subject; }
  .activityFrame .activityProject { grid-area:project; min-width:0; }
  .activityFrame .activityIdentity b,.activityFrame .activityProject span,.activityFrame .activitySubject {
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .activityFrame .activityStamp { display:contents; }
  .activityFrame .noticeCategory { grid-area:category; justify-self:end; padding:.05rem .45rem; }
  .activityFrame .activityReceived { grid-area:received; justify-self:end; white-space:nowrap; }
}

/* Browser chrome reduces the workspace height even on a full-HD monitor. */
@media (min-width:1500px) and (max-height:1040px) {
  .main:has(> .deskOverview) { --desk-gap:clamp(6px,.85dvh,10px); --desk-pad:clamp(8px,1dvh,11px); }
  .deskOverview .desk .metric { min-height:0; }
  .deskActivity .activityFrame {
    --activity-padding:.375rem;
  }
  .deskWorkSection .queueWrap td,.deskWorkSection .queueWrap th button { padding-block:.35rem; }
  .deskProjectsSection .directoryOpen { padding:.75rem 1rem; gap:.4rem 1rem; }
  .deskProjectsSection .directoryIdentity { min-height:0; padding-block:.25rem; }
  .deskProjectsSection .directorySchedule { gap:.4rem; }
  .deskProjectsSection .directorySchedule small { margin-bottom:0; }
  .deskProjectsSection .directoryDelivery { padding:.5rem 1rem; }
}
@media (min-width:1500px) and (max-height:1040px) {
  @container (min-width:350px) and (max-width:444.99px) {
    .deskProjectsSection .directoryOpen:not(.withCover) {
      grid-template-columns:minmax(0,1fr) auto;
      grid-template-areas:"identity status" "schedule schedule";
      align-items:start;
    }
    .deskProjectsSection .directoryOpen:not(.withCover) .directoryTop { grid-area:status; }
    .deskProjectsSection .directoryOpen:not(.withCover) .directoryIdentity { grid-area:identity; padding:0; }
    .deskProjectsSection .directoryOpen:not(.withCover) .directorySchedule { grid-area:schedule; padding-top:.4rem; }
  }
}

.deliveryDetails { display:grid; min-width:0; }
.deliveryDetails > .deliveryFoot { grid-area:1/1; min-width:0; }
/* Both descriptions size this row, so longer titles and empty states cannot shift the desk. */
.deliveryDetails > [inert] { visibility:hidden; pointer-events:none; }
.deliveryCaption, .deliveryControls { display:inline-flex; align-items:center; gap:.5rem; }
.deliveryCaption { min-width:0; }
.deliveryCaption svg { flex:none; }
.deliveryKicker:has(.deliveryControls) { display:grid; grid-template-columns:minmax(0,1fr) auto; }
.deliveryControls { justify-self:end; max-width:100%; flex-wrap:wrap; justify-content:flex-end; }
.main:has(> .portalOverview) { display:flex; flex-direction:column; gap:clamp(1rem,2.1vh,1.75rem); }
.maincol:has(.portalOverview) { height:auto; min-height:100dvh; }
.deskOverview.portalOverview { display:grid; grid-template: auto auto / minmax(0,1fr); gap:1rem; }
.portalOverview > .homegrid { display:block; margin:0; }
.portalOverview .pagehead { flex-wrap:wrap; gap:.8rem; margin:0; }
.portalLinks { display:flex; flex-wrap:wrap; gap:.5rem; }
.portalLinks .button { border-radius:100px; }
.portalOverview .deliveryHero { min-height:0; gap:1.1rem; padding:clamp(1rem,2vw,2.25rem); }
.portalOverview ~ .deskWorkSection > .projectgrid { max-height:none; overflow:visible; grid-template-columns:repeat(auto-fill,minmax(min(100%,19rem),1fr)); }
@media(min-width:760px) {
  .portalOverview ~ .deskWorkSection > .projectgrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .portalOverview ~ .deskWorkSection .issueCard { display:flex; flex-direction:column; }
  .portalOverview ~ .deskWorkSection .issueOpen { flex:1; display:grid; grid-template-columns:clamp(6rem,8.5vw,10rem) minmax(0,1fr); gap:.85rem; align-items:center; padding:.75rem; }
  .portalOverview ~ .deskWorkSection .issueOpen .projectphoto { width:100%; height:6rem; border-radius:.65rem; overflow:hidden; }
  .portalOverview ~ .deskWorkSection .issueOpen .projecttext { min-width:0; padding:0; }
  .portalOverview ~ .deskWorkSection .issueDates { margin:0; padding:.6rem .9rem; border-radius:0; }
}
@media(min-width:1200px) {
  .portalOverview ~ .deskWorkSection > .projectgrid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(min-width:900px) {
  .portalOverview .deliveryHero:not(.noDelivery) { display:grid; grid-template: auto auto / minmax(0,1.3fr) minmax(0,1fr); gap:.8rem clamp(1.25rem,4vw,4rem); }
  .portalOverview .deliveryKicker { grid-column:1/-1; }
  .portalOverview .deliveryFoot { align-self:stretch; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:.8rem; padding:0 0 0 clamp(1.25rem,3vw,3rem); border:0; border-inline-start:1px solid #44392136; }
  .portalOverview .deliveryFoot > div { display:flex; flex-direction:column; gap:.4rem; }
  .portalOverview .deliveryClock { align-self:center; }
  .portalOverview .deliveryClock strong { font-size:clamp(3rem,5.7vw,6.1rem); }
}
.deskTimerSwitch {
  --ink:#30291e; --pill-tint:rgb(255 255 255 / .49); --pill-light:rgb(255 255 255 / .4);
  --pill-edge:rgb(60 48 39 / .24); --pill-rim:rgb(255 255 255 / .85);
  display:inline-flex; flex:none; padding:2px; border:1px solid #44392145; border-radius:99px;
  background-color:rgb(255 255 255 / .12); color:var(--ink);
}
.deskTimerSwitch button {
  border-radius:99px; padding:.36rem .65rem; font:650 var(--type-small)/1.15 DM,sans-serif;
  color:inherit; white-space:nowrap; touch-action:manipulation;
}
.deskTimerSwitch button[aria-pressed=false]:hover { background:#44392115; }
.deskTimerSwitch button:focus-visible { outline:2px solid currentColor; outline-offset:-2px; }
.deliveryPopout:disabled { opacity:.55; }
.iphoneTimerSummary strong { font-size:1.2rem; }
.iphoneTimerSummary p { margin:.2rem 0; color:var(--muted); }
.iphoneTimerSetup { margin:1rem 0; }
.iphoneTimerSetup summary { cursor:pointer; font-weight:650; }
.iphoneTimerSetup li { margin-block:.4rem; }
@container (max-width:36rem) {
  .deliveryKicker:has(.deliveryControls) { grid-template-columns:minmax(0,1fr); row-gap:.55rem; }
}
@container (max-width:22rem) {
  .deliveryControls { gap:.35rem; }
  .deskTimerSwitch button { padding-inline:.45rem; }
  .deliveryControls .popoutSuffix { display:none; }
}
.deskOverview .deliveryPopout {
  display:inline-flex; align-items:center; justify-content:center; gap:.35rem;
  flex:none; margin-inline-start:auto; min-height:1.75rem; min-width:1.75rem;
  padding:.25rem .6rem; border:1px solid #44392161; border-radius:999px;
  background:transparent; color:#30291e; font:600 var(--type-small)/1.1 DM,sans-serif;
  letter-spacing:normal; text-transform:none; cursor:pointer; white-space:nowrap;
}
.deskOverview .deliveryPopout svg { width:1rem; height:1rem; flex:none; }
.deskOverview .deliveryControls .deliveryPopout { margin-inline-start:0; }
.deskOverview .deliveryPopout:is(:hover,[data-open]) { background:#44392114; border-color:currentColor; }
.deskOverview .deliveryPopout:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
@container (max-width:19rem) {
  .deskTimerSwitch .timerChoiceSuffix { display:none; }
  .deskOverview .deliveryPopout { padding-inline:.35rem; }
  .deskOverview [data-act="toggleDeliveryPopout"] .popoutLabel {
    position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden;
  }
}
