/* Marina: one dashboard composition and one shared composer vocabulary.
   Load after approved Home/conversation styles and the hosted adapter.
   Runtime owns recipients, drafts, send/retry/reply, permissions and real counts. */
.home-dashboard{container-type:inline-size;max-width:var(--office-page-width,1040px);width:100%;margin-inline:auto;min-width:0;min-height:0;display:flex;flex-direction:column;gap:12px;flex:none;overflow:visible}
.home-dashboard .home-dashboard-content{min-width:0;min-height:0;flex:none;overflow:visible;padding:0;scrollbar-gutter:auto;display:flex;flex-direction:column;gap:12px}
.home-dashboard-content>*{flex:none;min-width:0}
.home-dashboard-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin:0;font:500 .875rem/1.45 var(--sans);color:var(--muted)}
.home-dashboard-heading :is(h1,p){font:inherit;color:inherit;margin:0;overflow-wrap:anywhere}
.home-dashboard .home-dashboard-grid{display:grid;grid-template-columns:minmax(200px,.85fr) minmax(0,1.4fr);gap:20px;align-items:stretch;min-width:0}
.home-dashboard-inbox{display:grid;grid-template-rows:minmax(36px,auto) minmax(0,1fr);gap:8px;min-width:0;min-height:0}
.home-dashboard-inbox-head,.home-dashboard .home-focus-priorities-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;margin:0}
.home-dashboard-inbox-head>h2,.home-dashboard .home-focus-priorities-head>h2{margin:0;font:600 .9375rem/1.4 var(--sans);color:var(--ink)}
.home-dashboard-inbox-link{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:278px;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);text-align:center;text-decoration:none}
.home-dashboard-inbox-link:hover{background:var(--surface-2);border-color:var(--accent)}
.home-dashboard-pose{display:block;width:112px;height:140px;max-width:100%;object-fit:contain;object-position:center;margin:0;border:0;border-radius:0;background:none}
.home-dashboard-inbox[data-state="waiting"] .home-dashboard-pose{width:86px;height:104px}
.home-dashboard-inbox-title{font:600 1.25rem/1.3 var(--sans);margin:0;overflow-wrap:anywhere}
.home-dashboard-inbox-state{font:400 .9375rem/1.5 var(--sans);color:var(--muted);margin:0;overflow-wrap:anywhere}
.home-dashboard-inbox-count{display:grid;place-items:center;min-width:36px;min-height:36px;padding:4px 8px;border:1px solid var(--accent);border-radius:9px;background:var(--accent);color:var(--accent-ink);font:600 1.125rem/1.25 var(--sans);font-variant-numeric:tabular-nums}
.home-dashboard-inbox-open{display:inline-flex;align-items:center;min-height:36px;font:500 .875rem/1.4 var(--sans);color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.home-dashboard .home-focus-priorities{display:grid;grid-template-rows:minmax(36px,auto) minmax(0,1fr);align-content:stretch;gap:8px}
.home-dashboard .home-focus-priorities-head{min-height:36px}
.home-dashboard .home-focus-priority-list{overflow:visible}
.home-dashboard .home-focus-priority-link{min-height:76px;padding:12px;grid-template-columns:20px minmax(0,1fr) 12px;column-gap:9px}
.home-dashboard .home-focus-priority-link::after{grid-column:3;grid-row:1/4}
.home-dashboard .home-focus-priority-link>.home-focus-progress{grid-column:2;grid-row:3;grid-template-columns:minmax(45px,90px) minmax(0,1fr);align-items:center;gap:8px;margin-top:4px}
.home-dashboard .home-focus-progress.is-unmeasured{display:block}
.home-dashboard .home-focus-priority-link[data-state="done"] :is(.home-focus-priority-title,.home-focus-priority-summary){grid-column:2}
.home-dashboard .home-focus-priority.is-done{grid-template-columns:minmax(0,1fr);gap:0}
.home-dashboard .home-focus-next{justify-self:start;margin:0 12px 10px 41px;min-height:36px;padding:6px 9px}
.home-dashboard .daily-start-choice{flex:none;margin:0;font:.8125rem/1.4 var(--sans);color:var(--muted)}

/* Permanent shell console, owner reference pass 12051/12053.
   The shell and the viewport determine geometry. Page/context selectors do not.
   Load last. Runtime retains all targets, drafts, retries, permissions and state. */
.shell.office-console-shell:is(.office-console-shell,.conversation-shell.guide-hidden.context-minimized){
 --office-rail-width:248px;--office-page-width:100%;--office-page-inset:24px;
 --office-console-height:clamp(216px,14rem,328px);
 --office-context-height:clamp(24px,1.6rem,48px);
 --office-toolbar-height:clamp(44px,3rem,88px);
 --office-status-height:clamp(20px,1.35rem,40px);
 --office-dock-top:8px;--office-dock-bottom:max(16px,env(safe-area-inset-bottom));
 display:grid;grid-template-columns:var(--office-rail-width) minmax(0,1fr);
 grid-template-rows:minmax(0,1fr);height:100dvh;min-height:0;max-height:100dvh;
 width:100%;min-width:0;overflow:hidden;position:relative;
}
.shell.office-console-shell>.rail{grid-column:1;grid-row:1;height:100%;min-height:0;max-height:100%;overflow:auto;overscroll-behavior:contain}
.shell.office-console-shell>main.main{
 grid-column:2;grid-row:1;display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:minmax(0,1fr) auto;gap:0;align-content:stretch;
 height:100%;min-height:0;width:100%;min-width:0;max-width:none;margin:0;padding:0;
 overflow:hidden;position:relative;
}
.office-console-shell .office-reading-pane{
 grid-column:1;grid-row:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;
 padding:16px var(--office-page-inset) 12px;scroll-padding-block:12px;
 display:flex;flex-direction:column;gap:12px;scrollbar-gutter:auto;
}
.office-reading-pane>*{min-width:0;flex:none}
.office-reading-pane>.notice{margin:0;max-height:none;overflow:visible}
.office-reading-pane>.home-dashboard{width:100%;max-width:var(--office-page-width);margin-inline:auto;flex:none;min-height:0;overflow:visible}
.office-reading-pane .home-dashboard-content{min-height:0;overflow:visible;padding:0;flex:none}
.office-reading-pane .home-dashboard .home-dashboard-grid{min-height:0}
.office-reading-pane>.remote-sync-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;width:100%;min-width:0;max-width:var(--office-page-width);margin-inline:auto;padding:0;border:0}
/* An optional context rail is a reading overlay. It never claims a column or
   covers the dock. The runtime's existing open/minimize control remains real. */
.shell.office-console-shell>.staffmor-context{
 position:absolute;inset:0 0 calc(var(--office-console-height) + var(--office-dock-top) + var(--office-dock-bottom)) auto;
 grid-column:2;grid-row:1;box-sizing:border-box;align-self:stretch;
 width:min(300px,100%);height:calc(100% - var(--office-console-height) - var(--office-dock-top) - var(--office-dock-bottom));
 max-height:calc(100% - var(--office-console-height) - var(--office-dock-top) - var(--office-dock-bottom));
 margin:0;min-height:0;overflow:auto;z-index:10;background:var(--surface);
 border-left:1px solid var(--line);box-shadow:-8px 0 28px #0000000a;
}
.shell.office-console-shell.context-minimized>.staffmor-context{display:none}
.shell.office-console-shell>.context-scrim{bottom:calc(var(--office-console-height) + var(--office-dock-top) + var(--office-dock-bottom))}
.office-reading-pane :is(.channel.conversation,.remote-conversation){
 display:flex;flex-direction:column;gap:0;width:100%;height:100%;min-height:0;
 max-width:none;margin:0;overflow:hidden;flex:1;
}
.office-reading-pane :is(.conversation-head,.remote-page-head){flex:none;min-width:0;max-height:35%;overflow:auto}
.office-reading-pane :is(.conversation-head,.remote-conversation>.remote-page-head){padding:8px 0 12px}
.office-reading-pane :is(.feed,.remote-feed){flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 0;scrollbar-gutter:auto}
.office-reading-pane .agent-conversations{flex:none;margin-inline:0}
.office-reading-pane .tutorial-slot:empty{display:none}
.office-reading-pane :is(.answer-inbox,.remote-priority-editor){width:100%;max-width:var(--office-page-width);margin-inline:auto}
.office-console-shell .office-console-dock{
 grid-column:1;grid-row:2;min-width:0;min-height:0;padding:var(--office-dock-top) var(--office-page-inset) var(--office-dock-bottom);
 margin:0;display:flex;align-items:stretch;justify-content:center;background:var(--ground,var(--surface-2));
 position:relative;z-index:12;
}
.office-console-shell .office-console-dock>form.office-composer{
 box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:var(--office-context-height) minmax(0,1fr) var(--office-toolbar-height) var(--office-status-height);
 gap:8px;align-content:stretch;position:relative;
 width:100%;max-width:var(--office-page-width);height:var(--office-console-height);
 min-width:0;min-height:0;max-height:none;flex:none;margin:0;padding:16px 18px;
 border:1px solid color-mix(in srgb,var(--ink) 17%,var(--line));border-radius:24px;
 background:color-mix(in srgb,var(--surface) 94%,var(--surface-2));color:var(--ink);
 box-shadow:0 2px 5px #00000005,inset 0 1px 0 color-mix(in srgb,var(--ink) 3%,transparent);
 overflow:visible;transition:border-color .15s,box-shadow .15s;
}
.office-console-shell .office-console-dock>form.office-composer:focus-within{
 border-color:color-mix(in srgb,var(--accent) 70%,var(--ink));
 box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent),0 2px 8px #00000008;
}
.office-console-dock .office-composer>.office-composer-context{
 grid-row:1;grid-column:1;position:relative;display:flex;align-items:center;gap:8px;
 min-width:0;min-height:0;height:100%;margin:0;padding:0;
 overflow:auto;white-space:nowrap;overscroll-behavior:contain;
 font:500 .8125rem/1.4 var(--sans);color:var(--muted);
}
.office-composer-context :is(p,span,.context){min-width:0;margin:0;padding:0;border:0;border-radius:0;background:none;font:inherit;color:inherit;overflow-wrap:normal;white-space:nowrap}
.office-composer-context .btn{flex:none;min-height:24px;padding:2px 8px;font:inherit}
.office-console-dock .office-composer>.field:has(.office-composer-input){grid-row:2;grid-column:1;display:block;min-width:0;min-height:0;height:100%;margin:0;padding:0}
.office-console-shell .office-console-dock form.office-composer textarea.office-composer-input{
 grid-column:1;grid-row:2;box-sizing:border-box;display:block;width:100%;height:100%;min-height:0;max-height:none;
 padding:3px 0;margin:0;border:0;border-radius:0;background:transparent;color:var(--ink);
 font:400 1.125rem/1.55 var(--sans);letter-spacing:.002em;
 resize:none;outline:0;box-shadow:none;overflow:auto;overscroll-behavior:contain;
}
.office-console-dock .office-composer-input::placeholder{color:var(--muted);opacity:1}
.office-console-dock .office-composer>.office-composer-toolbar{
 grid-column:1;grid-row:3;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;
 height:100%;min-width:0;min-height:0;gap:10px;margin:0;padding:0;overflow:visible;
}
.office-console-dock .office-composer-address{
 display:flex;align-items:center;flex-wrap:nowrap;gap:8px;flex:1;min-width:0;min-height:0;
 max-height:100%;overflow:auto;overscroll-behavior:contain;white-space:nowrap;
 font:500 .875rem/1.4 var(--sans);color:var(--ink);
}
.office-console-dock .office-composer-address :is(p,label,span){margin:0;min-width:0;font:inherit;white-space:nowrap;overflow-wrap:normal;color:inherit}
.office-console-dock .office-composer-address label{display:flex;align-items:center;flex:none;gap:6px;max-width:250px}
.office-console-dock .office-composer-address :is(select,button){width:auto;min-width:0;max-width:100%;min-height:36px;flex:none;font:400 .875rem/1.4 var(--sans)}
.office-console-dock .office-composer-address label>span{flex:none}
.office-console-dock .office-composer-address label>select{flex:1 1 auto}
.office-console-dock .office-composer-address select{padding:6px 24px 6px 8px;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;color:var(--ink)}
.office-console-dock .office-composer-secondary{position:relative;display:flex;align-items:center;gap:6px;flex:none;min-width:0;min-height:0;font:.8125rem/1.4 var(--sans)}
.office-console-dock .office-composer-secondary:empty{display:none}
.office-console-dock .office-composer-secondary>details{position:relative;min-width:0}
.office-console-dock .office-composer-secondary>details>summary{
 display:flex;align-items:center;justify-content:center;min-height:36px;max-width:9rem;padding:6px 10px;
 border:1px solid transparent;border-radius:8px;font:500 .8125rem/1.4 var(--sans);color:var(--muted);cursor:pointer;list-style:none;
}
.office-console-dock .office-composer-secondary>details>summary::-webkit-details-marker{display:none}
.office-console-dock .office-composer-secondary>details>summary:hover{color:var(--ink);background:var(--surface-2)}
.office-console-dock .office-composer-secondary>details[open]>:not(summary){
 position:absolute;right:0;bottom:calc(100% + 8px);z-index:20;min-width:160px;max-width:min(320px,75vw);
 max-height:40dvh;overflow:auto;margin:0;padding:12px;background:var(--surface);color:var(--ink);
 border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 32px #00000020;
}
.office-console-dock .office-composer-toolbar .office-composer-actions{
 display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:8px;
 min-width:0;min-height:0;width:auto;margin:0 0 0 auto;padding:0;flex:none;
}
.office-console-dock .office-composer-actions>.btn{min-height:36px;padding:6px 10px;font:500 .875rem/1.4 var(--sans);white-space:nowrap}
.office-console-shell .office-console-dock form.office-composer :is(.office-composer-send,.office-console-send){
 box-sizing:border-box;display:grid;place-items:center;flex:none;min-width:44px;min-height:44px;width:44px;height:44px;max-width:44px;
 padding:0;margin:0;border:1px solid color-mix(in srgb,var(--accent) 70%,var(--ink));border-radius:14px;
 background:var(--accent);color:var(--accent-ink);box-shadow:0 1px 2px #0000000a;
 cursor:pointer;letter-spacing:0;font:600 1rem/1 var(--sans);
}
.office-console-dock :is(.office-composer-send,.office-console-send):hover:not(:disabled){background:color-mix(in srgb,var(--accent) 86%,var(--ink));transform:none}
.office-console-dock :is(.office-composer-send,.office-console-send):disabled{opacity:.45;cursor:default}
.office-console-dock .office-send-glyph{display:block;width:22px;height:22px;background:currentColor;mask:url('./office-send.svg') center/contain no-repeat}
.office-console-dock :is(.office-composer-send,.office-console-send)>svg{width:22px;height:22px;flex:none}
.office-console-dock .office-composer>.office-composer-status{
 grid-column:1;grid-row:4;display:flex;align-items:center;gap:8px;min-width:0;min-height:0;height:100%;
 margin:0;padding:0;overflow:auto;overscroll-behavior:contain;white-space:nowrap;font:.75rem/1.4 var(--sans);color:var(--muted);
}
.office-composer-status :is(p,small,.hint,.draft-status,.home-focus-receipt,.console-receipt){display:inline-flex;align-items:center;gap:8px;flex:none;min-width:0;margin:0;padding:0;font:inherit;white-space:nowrap;color:inherit}
.office-composer-status :is(button,a){min-height:20px;padding:0 5px;font:inherit;flex:none}
.office-console-dock .office-composer[aria-busy='true'] .office-composer-input{cursor:progress}
.office-console-dock .office-composer[aria-busy='true'] .office-composer-send{opacity:.65}
.office-console-dock :is(button,a,select,summary):focus-visible{outline:3px solid var(--focus,var(--accent));outline-offset:3px}
/* Suggestions overlay the reading pane. They never allocate a form row. */
.office-console-dock #mention-suggest{position:absolute;bottom:calc(100% + 10px);left:0;right:0;max-height:30dvh;overflow:auto;z-index:22;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0002}
.office-console-dock .office-composer-context:has(#mention-suggest:not(:empty)){overflow:visible}
.daily-rail.compact-rail .chat-row .chat-initial{white-space:nowrap;overflow-wrap:normal;word-break:normal;line-height:1;font-size:clamp(10px,.625rem,13px)}
.daily-rail.compact-rail .chat-row[draggable='true']>.chat-label{cursor:grab}
.daily-rail.compact-rail .chat-row.is-dragging>.chat-label{cursor:grabbing}
@media(max-width:820px){
 .shell.office-console-shell:is(.office-console-shell,.conversation-shell.guide-hidden.context-minimized){--office-page-inset:14px;--office-dock-top:8px;--office-dock-bottom:max(12px,env(safe-area-inset-bottom));grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
 .shell.office-console-shell>.rail{grid-column:1;grid-row:1;position:relative;height:auto;max-height:none;overflow:visible;z-index:30}
 .shell.office-console-shell>main.main{grid-column:1;grid-row:2}
 .office-console-shell .office-reading-pane{padding-top:12px}
 .office-console-shell .office-console-dock>form.office-composer{padding-inline:14px;border-radius:22px}
 .office-console-dock .office-composer-address :is(select,button){min-height:44px}
 .office-console-dock .office-composer-secondary>details>summary{min-height:44px;padding-inline:8px;max-width:7rem}
 .office-console-dock .office-composer-toolbar{gap:6px}
 .office-console-dock .office-composer-address{gap:6px}
 .shell.office-console-shell>.staffmor-context{grid-column:1;grid-row:2;width:min(360px,100%);inset:0 0 calc(var(--office-console-height) + var(--office-dock-top) + var(--office-dock-bottom)) auto;z-index:35}
 .shell.office-console-shell .remote-nav-wrap.open{position:absolute;inset:100% 0 auto;max-height:calc(100dvh - 80px);overflow:auto;overscroll-behavior:contain;padding:12px;background:var(--rail-bg);border-bottom:1px solid var(--rail-line);box-shadow:0 8px 24px #0002;z-index:31}
}
@media(max-height:560px){
 .shell.office-console-shell:is(.office-console-shell,.conversation-shell.guide-hidden.context-minimized){--office-console-height:clamp(196px,14rem,328px);--office-dock-top:6px;--office-dock-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.office-console-dock form.office-composer{transition:none}}

/* Deliberate dashboard reflow follows its actual available reading width. */
@container(max-width:36rem){
 .home-dashboard .home-dashboard-grid{grid-template-columns:minmax(0,1fr);gap:14px}
 .home-dashboard .home-dashboard-content{min-height:0;flex:none;overflow:visible}
 .home-dashboard-inbox-link{min-height:150px;padding:14px;display:grid;grid-template-columns:76px minmax(0,1fr);gap:5px 12px;text-align:left;justify-items:start;align-content:center}
 .home-dashboard-pose{grid-column:1;grid-row:1/5;width:76px;height:104px}
 .home-dashboard-inbox[data-state="waiting"] .home-dashboard-pose{width:64px;height:80px}
 .home-dashboard-inbox-link>:not(.home-dashboard-pose){grid-column:2;min-width:0}
 .home-dashboard-inbox-count{grid-row:auto;min-height:32px;min-width:32px}
 .home-dashboard-inbox-open{min-height:44px}
 .home-dashboard .home-focus-next{min-height:44px}
}

/* A selected/reordered hosted row owns one continuous selection surface,
   including its separate real options control. Legacy anchor hover colors must
   not split that row into a cream name region and cyan options region. */
:root[data-company-appearance] .remote-shell .nav .rail-reorder-row>a:is([aria-current="page"],:hover){background:transparent;color:inherit}
:root[data-company-appearance] .remote-shell .nav .rail-reorder-row:hover:not(:has(>[aria-current="page"])){background:var(--rail-hover);color:var(--rail-ink)}

/* Mobile Edit is a 44px target. Both dashboard headings reserve that same
   row, so its target cannot lower only the priorities card. */
@media(max-width:820px){
 .home-dashboard-inbox,.home-dashboard .home-focus-priorities{grid-template-rows:minmax(44px,auto) minmax(0,1fr)}
 .home-dashboard-inbox-head,.home-dashboard .home-focus-priorities-head{min-height:44px}
}
.office-console-shell .office-reading-pane{box-shadow:inset 0 -1px 0 var(--line)}

/* Legacy minimized/guide variants must not reserve a different rail width.
   The shell selector above deliberately outranks that old grid allocation. */
@media(max-width:480px){
 .office-console-dock .office-composer-secondary>details>summary{box-sizing:border-box;width:44px;height:44px;min-width:44px;max-width:44px;padding:0;font-size:0}
 .office-console-dock .office-composer-secondary>details>summary::after{content:'⋯';font:600 22px/1 var(--sans)}
 .office-console-dock .office-composer-address{white-space:normal}
 .office-console-dock .office-composer-address :is(p,label,span){white-space:normal;overflow-wrap:anywhere}
}

/* In a small/enlarged window, read the whole header and discussion by scrolling
   the reading pane, rather than squeezing their text into a tiny clipped row. */
@media(max-width:820px){
 .office-reading-pane :is(.channel.conversation,.remote-conversation){height:auto;min-height:260px;flex:none}
 .office-reading-pane :is(.conversation-head,.remote-page-head){max-height:none;overflow:visible}
 .office-reading-pane :is(.feed,.remote-feed){flex:none;height:min(45dvh,320px);min-height:140px;overflow:auto}
}
