@media(min-width:1400px){
  .shell{width:min(1320px,calc(100% - 48px))}
  .hero-card{grid-template-columns:320px 1fr;padding:48px 72px}
  .messages{max-height:560px}
  .message{max-width:75%}
  .connector-grid,.settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:1024px){
  .tabs{overflow:visible;flex-wrap:wrap}
  .tab{flex:1 1 auto;min-width:90px}
  .topbar{padding:20px 0 28px}
}
@media print{
  .tabs,.top-actions,.composer,.ambient{display:none!important}
  .shell{width:100%;padding:0}
  body{background:#fff;color:#000}
}

/* --- Duo unfolded / intermediate tier (761-1023px) ---
   Fills the gap between the phone layout (max-width:760px) and the desktop
   tier (min-width:1024px): the unfolded foldable width and large Split View
   panes. Pure width-based, so fold/unfold adapts live with no reload.
   Two-pane structure is kept, scaled down from the desktop tier; the tab bar
   wraps instead of scrolling, exactly as it does from 1024px up. */
@media(min-width:761px) and (max-width:1023px){
  .shell{width:calc(100% - 40px);padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
  .tabs{overflow:visible;flex-wrap:wrap}
  .tab{flex:1 1 auto;min-width:90px}
  .hero-card{grid-template-columns:240px 1fr;padding:34px 40px}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .messages{max-height:520px}
  .message{max-width:78%}
}

/* --- Duo desk mode (stage 2): glanceable briefing panel beside the chat ---
   From 761px up (the stage-1 unfolded tier and everything above it), the
   Today view becomes a two-column desk layout: the existing briefing
   surface — masthead, briefing cards (weather, today's calendar agenda,
   focus, open loops), the systems line, and the "While you were away"
   catch-up card that carries Orbit's check-ins — sits in a glanceable,
   independently scrolling column next to the conversation panel instead
   of stacked above it. Nothing is re-rendered or re-fetched:
   renderBriefing() and the catch-up card already target #today-briefing,
   so desk mode is pure placement of the existing DOM. Pure width-based
   CSS, like stage 1, so fold/unfold adapts live with no reload and no
   device detection. Below 761px nothing changes: the phone tier stacks
   exactly as before.
   The query is deliberately unbounded above: the Duo's exact unfolded
   CSS width is unverified and may land at or above 1024px, so capping
   desk mode at 1023px could keep it from ever appearing on the device
   it is for. On true desktop widths the same placement is an
   enhancement, not a regression: briefing and check-ins stay glanceable
   beside the chat instead of scrolling away above it, and no content,
   control, or chat behavior is removed or reordered. */
@media(min-width:761px){
  #today.view.active{display:grid;grid-template-columns:minmax(300px,400px) minmax(0,1fr);grid-template-areas:"hero hero" "desk chat";column-gap:18px;align-items:start}
  #today>.hero-card{grid-area:hero}
  #today>#today-briefing{grid-area:desk;max-height:calc(100dvh - 150px);overflow-y:auto;padding-right:6px}
  #today>.conversation-panel{grid-area:chat}
  #today-briefing .briefing-masthead h2{font-size:30px}
  #today-briefing .briefing-grid{grid-template-columns:1fr}
}
@media print{
  #today.view.active{display:block}
  #today>#today-briefing{max-height:none;overflow:visible;padding-right:0}
}
