/* Mail workspace ergonomics; sender HTML is styled only inside the reader layer. */
.ev-list-display-controls{display:flex;align-items:center;gap:2px;flex:none}
html body.ev-workspace .ev-toolbar-control{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:8px;border:0;border-radius:9px;background:transparent;color:var(--ev-muted);font-family:inherit;font-size:16px;font-weight:600;line-height:1.2;cursor:pointer;list-style:none}
html body.ev-workspace .ev-toolbar-control:hover,html body.ev-workspace .ev-toolbar-control[aria-pressed=true]{background:var(--ev-soft);color:var(--ev-brand)}
.ev-toolbar-control::-webkit-details-marker{display:none}
.ev-view-options{position:relative;flex:none}
html body.ev-workspace .ev-view-panel{position:fixed;top:48px;left:12px;z-index:1050;box-sizing:border-box;width:252px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:16px;border:1px solid var(--ev-border);border-radius:12px;background:var(--ev-surface);color:var(--ev-text);box-shadow:0 8px 28px #0002;text-align:left}
.ev-view-panel>label{display:block;margin:0 0 8px;font-size:13px;font-weight:650}
html body.ev-workspace .ev-view-panel select{box-sizing:border-box;width:100%;min-height:44px;margin:0 0 12px;padding:8px}
.ev-view-panel .ev-thread-toggle{display:flex;align-items:center;gap:10px;min-height:44px;font-weight:500;cursor:pointer}
.ev-thread-toggle input{width:18px;height:18px;accent-color:var(--ev-brand)}
html body.ev-workspace .ev-view-panel>button{box-sizing:border-box;width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--ev-control);border-radius:8px;background:var(--ev-raised);color:var(--ev-text);font-size:13px;cursor:pointer}
.ev-view-panel p{margin:12px 0 0;color:var(--ev-muted);font-size:12px;line-height:1.5;white-space:normal}
.ev-search-scope{display:flex;align-items:center;gap:8px;min-width:0;padding:0 20px 8px;color:var(--ev-muted);font-size:12px;flex:none}
.ev-search-scope label{margin:0;white-space:nowrap}
html body.ev-workspace .ev-search-scope select{min-width:0;max-width:100%;min-height:36px;height:36px;flex:1;padding:4px 8px;font-size:12px;border:1px solid var(--ev-border);border-radius:8px}
#ev-list-splitter{display:none}

/* The native resizer changes inline widths, while the old grid ignores them.
 * The visible separator updates the grid variable with pointer and keyboard input. */
@media(min-width:769px){
 html body.ev-workspace.ev-mail-layout #messagelist-header>.back-sidebar-button{display:none!important}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout{display:grid;grid-template-columns:72px var(--ev-list-width,370px) 12px minmax(0,1fr);grid-template-rows:226px minmax(0,1fr) 148px;box-sizing:border-box;gap:0 8px;padding:12px 12px 12px 0;height:100vh;height:100dvh}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-menu{grid-column:1;grid-row:1/4;position:relative;min-width:0!important;max-width:none!important;width:100%!important;display:flex!important;flex-direction:column}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-list{grid-column:2;grid-row:1/4;position:relative;min-width:0!important;max-width:none!important;width:100%!important;flex:none!important;border:1px solid var(--ev-border);border-radius:var(--ev-radius);overflow:hidden;box-shadow:var(--ev-shadow)}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-content{grid-column:4;grid-row:1/4;min-width:0!important;max-width:none!important;width:100%!important;flex:none!important;border:1px solid var(--ev-border);border-radius:var(--ev-radius);overflow:hidden;box-shadow:var(--ev-shadow)}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-sidebar{grid-column:2;grid-row:1/4;position:relative;min-width:0!important;max-width:none!important;width:100%!important;flex:none!important;border:1px solid var(--ev-border);border-radius:var(--ev-radius);overflow:hidden}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #ev-list-splitter{display:flex;grid-column:3;grid-row:1/4;position:relative;align-items:center;justify-content:center;align-self:stretch;min-width:12px;border:0;border-radius:8px;cursor:col-resize;touch-action:none;color:var(--ev-control);outline-offset:1px}
 #ev-list-splitter:before{content:"";width:3px;height:48px;background:currentColor;border-radius:3px;opacity:.7}
 #ev-list-splitter:hover,#ev-list-splitter:focus-visible{color:var(--ev-brand);background:var(--ev-soft);outline:2px solid var(--ev-brand)}
 /* Keep the first actions visible in a narrow preview; overflow only inside the toolbar. */
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-content>.header .toolbar{position:static!important;inset:auto!important;transform:none!important;display:flex!important;flex:1 1 auto;min-width:0;width:100%!important;max-width:100%;margin:0!important;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-content>.header .toolbar>li{flex:none}
 html:not(.iframe) body.ev-workspace.ev-mail-layout .column-resizer{display:none!important}
 html body.ev-workspace.ev-resizing-list{cursor:col-resize!important;user-select:none!important}
 .ev-resizing-list iframe{pointer-events:none}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-reading-focus #layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:12px}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-reading-focus #layout-menu,html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-reading-focus #layout-sidebar,html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-reading-focus #layout-list,html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-reading-focus #ev-list-splitter{display:none!important}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-reading-focus #layout-content{grid-column:1;grid-row:1;display:flex!important}
 /* Native double-click opens a standalone show page: reclaim all empty grid columns. */
 html:not(.iframe) body.ev-workspace.ev-standalone-reader #layout{display:grid;grid-template-columns:72px minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:12px 12px 12px 0;gap:12px;height:100vh;height:100dvh;box-sizing:border-box}
 html:not(.iframe) body.ev-workspace.ev-standalone-reader #layout-menu{grid-column:1;grid-row:1;min-width:0!important;width:100%!important;position:relative}
 html:not(.iframe) body.ev-workspace.ev-standalone-reader #layout-content{grid-column:2;grid-row:1;min-width:0!important;width:100%!important;border-radius:var(--ev-radius)}
 html:not(.iframe) body.ev-workspace.ev-standalone-reader #layout-sidebar{display:none!important}
}
@media(min-width:1201px){
 html:not(.iframe) body.ev-workspace.ev-mail-layout:not(.ev-folders-collapsed):not(.ev-reading-focus) #layout{grid-template-columns:232px var(--ev-list-width,370px) 12px minmax(0,1fr)}
 html:not(.iframe) body.ev-workspace.ev-mail-layout #layout-sidebar{grid-column:1;grid-row:2;border:0;border-radius:0}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #layout-sidebar{display:none!important}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #layout-menu .ev-brand,html:not(.iframe) body.ev-workspace.ev-standalone-reader #layout-menu .ev-brand{padding:6px!important;height:72px!important;min-height:72px}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #layout-menu .ev-brand-copy,html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed .ev-account,html:not(.iframe) body.ev-workspace.ev-standalone-reader #layout-menu .ev-brand-copy,html:not(.iframe) body.ev-workspace.ev-standalone-reader .ev-account{display:none!important}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #taskmenu,html:not(.iframe) body.ev-workspace.ev-standalone-reader #taskmenu{padding:0 6px}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #taskmenu>a,html:not(.iframe) body.ev-workspace.ev-standalone-reader #taskmenu>a{width:100%!important;display:flex!important;flex-direction:column;align-items:center;gap:6px;padding:10px 4px!important;min-height:60px;font-size:10px;text-align:center}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #taskmenu>a:before,html:not(.iframe) body.ev-workspace.ev-standalone-reader #taskmenu>a:before{float:none;display:block;margin:0}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #taskmenu>a .inner,html:not(.iframe) body.ev-workspace.ev-standalone-reader #taskmenu>a .inner{font-size:10px}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #taskmenu .special-buttons,html:not(.iframe) body.ev-workspace.ev-standalone-reader #taskmenu .special-buttons{left:0;right:0;width:100%;height:auto;display:flex;flex-direction:column;gap:2px;padding:8px 4px}
 html:not(.iframe) body.ev-workspace.ev-mail-layout.ev-folders-collapsed #taskmenu .special-buttons>a,html:not(.iframe) body.ev-workspace.ev-standalone-reader #taskmenu .special-buttons>a{width:100%;min-height:44px;margin:0;padding:6px 2px;font-size:10px}
}

/* Density controls affect list typography and spacing independently of reading zoom. */
html body.ev-workspace[data-ev-density=comfortable] #messagelist td{padding-top:14px;padding-bottom:14px}
html body.ev-workspace[data-ev-density=compact] #messagelist{border-spacing:0 2px}
html body.ev-workspace[data-ev-density=compact] #messagelist td{padding-top:8px;padding-bottom:8px;font-size:12px}
html body.ev-workspace[data-ev-density=compact] #messagelist td.subject .fromto,html body.ev-workspace[data-ev-density=compact] #messagelist td.subject .subject{font-size:12px;line-height:19px}
html body.ev-workspace[data-ev-density=compact] #messagelist td.subject .ev-sender-avatar{top:10px;width:30px;height:30px}
html body.ev-workspace[data-ev-density=large] #messagelist td{padding-top:18px;padding-bottom:18px;font-size:16px}
html body.ev-workspace[data-ev-density=large] #messagelist td.subject .fromto,html body.ev-workspace[data-ev-density=large] #messagelist td.subject .subject{font-size:16px;line-height:25px}
html body.ev-workspace[data-ev-density=large] #messagelist td.subject .date,html body.ev-workspace[data-ev-density=large] #messagelist .size{font-size:13px}
html body.ev-workspace[data-ev-density=large] #messagelist td.subject .ev-sender-avatar{top:22px}
@media(max-width:768px){
 html body.ev-workspace .ev-folder-toggle{display:none}
 html body.ev-workspace .ev-section-heading{padding:8px 16px 6px}
 .ev-section-heading .ev-eyebrow,.ev-section-heading .ev-live-dot{display:none}
 html body.ev-workspace .ev-section-heading h2{font-size:21px;margin:0}
 html body.ev-workspace #messagelist-header{min-height:48px;height:auto;padding:2px 6px;padding-top:max(2px,env(safe-area-inset-top));overflow:visible}
 html body.ev-workspace #messagelist-header .toolbar a,html body.ev-workspace #messagelist-header>a.refresh{min-width:44px;min-height:44px;padding:11px}
 html body.ev-workspace #messagelist-header .toolbar .threads{display:none}
 html body.ev-workspace #layout-list>.searchbar{margin:6px 12px;min-height:44px;height:44px}
 .ev-search-scope{padding:0 12px 6px;gap:6px}
 html body.ev-workspace .ev-search-scope select{font-size:16px!important;min-height:44px;height:44px}
 .ev-filter-tabs{padding:0 12px 6px}
 .ev-filter-tabs button{min-height:44px}
 html body.ev-workspace .ev-reader-expand{display:none}
 html body.ev-workspace.ev-mail-layout.ev-mobile-reading #layout-menu,html body.ev-workspace.ev-mail-layout.ev-mobile-reading #layout-sidebar,html body.ev-workspace.ev-mail-layout.ev-mobile-reading #layout-list{display:none!important}
 html body.ev-workspace.ev-mobile-reading #ev-mobile-nav,html body.ev-workspace.ev-standalone-reader #ev-mobile-nav{display:none!important}
 html body.ev-workspace.ev-mobile-reading #layout,html body.ev-workspace.ev-standalone-reader #layout{height:100vh;height:100dvh;padding-bottom:0}
 html body.ev-workspace.ev-mail-layout.ev-mobile-reading #layout-content{display:flex!important;min-width:0;width:100%;border:0;border-radius:0}
 html body.ev-workspace.ev-mail-layout #layout-content>.header{padding-top:env(safe-area-inset-top);min-height:48px;height:auto}
 html body.ev-workspace.ev-mail-layout #layout-content>.iframe-wrapper{min-height:0;flex:1;overflow:hidden}
 html body.ev-workspace[data-ev-density=compact] #messagelist td{padding-top:9px;padding-bottom:9px}
 html body.ev-workspace[data-ev-density=compact] #messagelist td.subject .fromto,html body.ev-workspace[data-ev-density=compact] #messagelist td.subject .subject{font-size:13px;line-height:20px}
 html body.ev-workspace #messagelist td.flags{min-width:44px}
}
@media print{.ev-list-display-controls,.ev-search-scope,#ev-list-splitter,.ev-reader-expand{display:none!important}}
