/* Email classifier: overrides only, on top of Sam Workflow's own sheets (site-*.css, copied verbatim from pd-live
   origin/main 9073b821). Every colour is a site token (var(--wf-*) or the app.css aliases); no new hex values.
   SPEC section 1. Reduced motion: site-app.css already stops every animation and transition; the flyer hides here. */

/* ---------- views: boot | signin | app ---------- */
body.ec { background: var(--wf-home-bg); color: var(--ink); font: var(--wf-fs-body)/1.5 var(--sans); letter-spacing: var(--wf-tracking); }
body.ec[data-view="boot"] #app, body.ec[data-view="boot"] #login { visibility: hidden; }
body.ec[data-view="signin"] { display: block; background: var(--lg-bg); }
.ec-shell { display: contents; }
.ec .lg { font: 16px/1.5 var(--wf-font-sans); letter-spacing: normal; color: var(--lg-ink); background: var(--lg-bg); }
#lg-msg { margin: -8px 0 0; }
#lg-msg:not([hidden]) + .lg-primary { margin-top: 22px; }

/* ---------- full width: the only gutters are the site's 20 px page padding ---------- */
body.ec main.page, body.ec main.page:has(#mc) { max-width: none; padding: 22px 20px 48px; }
.ec .mc { max-width: none; }

/* ---------- sidebar: the site's own text glyphs (site-app.css draws them with .nav > a::before), no counts ---------- */
.topbar .nav > a[data-filter="all"]::before { content: "\2709"; }
.topbar .nav > a[data-filter="filed"]::before { content: "\2713"; }
.topbar .nav > a[data-filter="unsorted"]::before { content: "\25C8"; }
.topbar .nav > a[data-filter="drafts"]::before { content: "\2261"; }
.topbar .nav > a[data-open="settings"]::before { content: "\2699"; }

/* ---------- 1 the status bar: the site's floating banner; one line, crossfading (both lines move together, no gap) ---------- */
.ec-status .mcpulse { cursor: default; }
.ec-status .mcbtext { min-width: 0; }
.ec-status .answer { display: grid; min-width: 0; }
.ec-status .answer > span { grid-area: 1 / 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: opacity .32s cubic-bezier(.2, .8, .2, 1), transform .32s cubic-bezier(.2, .8, .2, 1); }
.ec-status .answer > span:not([aria-hidden="true"]) { opacity: 1; transform: none; animation: fade .32s cubic-bezier(.2, .8, .2, 1); }
.ec-status .answer > span[aria-hidden="true"] { opacity: 0; transform: translateY(-3px); pointer-events: none; }
/* the words of the moment shimmer while Sam works: the site's .samw.st-working .samw-now (fb-shell.css) */
.ec-status[data-status="working"] .answer > span:not([aria-hidden="true"]) { background: linear-gradient(90deg, var(--faint), var(--ink) 50%, var(--faint));
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fade .32s cubic-bezier(.2, .8, .2, 1), arsheen 1.5s linear infinite; }
.ec-status[data-status="failed"] .answer { color: var(--bad); }
.ec-status[data-status="idle"] .mcpulse, .ec-status[data-status="quiet"] .mcpulse { background: var(--faint); }

/* ---------- 2 title ---------- */
.ec-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.ec-actions .btn.ghost { padding: 10px 16px; border-radius: 10px; }
#primary[aria-disabled="true"] { opacity: .6; cursor: progress; }
#primary:focus-visible, .ec-actions .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- 2a the mailbox picker: the site's client picker (.cpk, .cpmenu, .cpit) opened from its period box (.perbox),
   as tall as the buttons beside it; the address the only strong word ---------- */
.ec-mb { min-width: 0; }
.ec-mb[hidden], .ec-mb-menu[hidden], .ec-mbnote[hidden] { display: none; }
.ec-mb-btn { box-sizing: border-box; min-height: 40px; max-width: min(380px, 42vw); padding: 0 12px 0 14px; gap: 9px; border-radius: 10px;
  font-size: 12.5px; color: var(--ink); }
.ec-mb-btn .ec-mb-k { flex: none; color: var(--faint); font-size: 11.5px; }
.ec-mb-btn .ec-mb-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ec-mb-chev { flex: none; color: var(--muted); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.ec-mb-btn[aria-expanded="true"] { background: var(--panel2); }
.ec-mb-btn[aria-expanded="true"] .ec-mb-chev { transform: rotate(180deg); }
.ec-mb-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ec-mb-menu { min-width: 280px; }
.ec-mb-menu .cpit { min-width: 0; }
.ec-mb-menu .ec-mb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-mb-menu .cpck { margin-left: auto; text-align: right; }
.ec-mb-menu .cpit:focus-visible { outline: 0; box-shadow: inset 0 0 0 1.5px var(--ink); }
.ec-mb-sep { height: 1px; margin: 6px 6px; background: var(--border); }

/* ---------- 2b the notice: a real mailbox Sam can't read right now (the site's calm .notice.problem) ---------- */
.ec .ec-mbnote { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 22px 0 0;
  animation: fade .2s ease; }
.ec-mbnote-t { min-width: 0; flex: 1 1 260px; }
.ec-mbnote-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.ec-mbnote-acts .btn[hidden] { display: none; }
.ec-mbnote-acts .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- 3 summary: the site's checks bar, plus a warn row ---------- */
.ec .ckbar { margin: 30px 0 16px; }
.ckbar:has(.ckhd[aria-expanded="true"]) .ckch { transform: none; }
.ckc { font-family: var(--mono); }
.ckbar.idle .cksum i { background: var(--border2); }
.ckbar.ok .cksum i { background: var(--good); }
.ckbar.warn .cksum { color: var(--ink); }
.ckbar.warn .cksum i { background: var(--warn); }
#needs:not([hidden]) { animation: fade .2s ease; }
.cks.warn .ckd { background: var(--wf-warn); }
.cks.warn .ckl { color: var(--wf-warn); }
.cks .ckl { white-space: nowrap; }
.ec .cks { width: 100%; grid-template-columns: 10px minmax(0, 1fr) auto auto; }
.ec .cks .ckv { font-family: var(--sans); font-size: 12px; } /* the site's .ckv holds an amount; here it is the sender */
#firm { text-transform: uppercase; } /* the site's eyebrow is written in capitals; the firm name comes from the run */

/* ---------- 4 work row: the mailbox beside SharePoint ---------- */
.ec-work { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.ec .olm { margin-top: 0; }
.ec .olm-cols { grid-template-columns: 340px minmax(0, 1fr); }
@media (min-width: 1600px) { .ec-work { grid-template-columns: minmax(0, 1fr) 420px; } .ec .olm-cols { grid-template-columns: 380px minmax(0, 1fr); } }
@media (max-width: 1100px) { .ec-work { grid-template-columns: minmax(0, 1fr); } }
.olm-side > .olm-note { padding: 14px 26px; margin: 0; border-top: 1px solid var(--border); }
.olm-body > .olm-note { padding: 32px; margin: 0; }
/* The site's list is calc(100vh - 230px) under a short header; here the status bar, title and Summary sit above it, so
   it is shorter: the email Sam is reading (the oldest, at the bottom) stays on a laptop screen without a page scroll. */
@media (min-width: 1001px) { .ec .olm-list { max-height: max(300px, calc(100vh - 520px)); } }

/* inbox rows: the /inbox row; a chip only for Reading…, Needs a folder and Failed; waiting rows faint like the site's
   upcoming steps */
.olm-em .chip { margin-top: 9px; font-size: 10.5px; padding: 1px 8px; }
.olm-em .chip:empty { display: none; }
.olm-em time { font-variant-numeric: tabular-nums; }
.olm-em small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olm-em[data-status="waiting"] :is(.olm-from, strong) { color: var(--faint); }
.olm-em :is(.olm-from, strong) { transition: color .32s cubic-bezier(.2, .8, .2, 1); }
.olm-em.ec-new { animation: tlnew .6s cubic-bezier(.2, .8, .2, 1) both; }
/* "Reading…": the site's arsheen recipe, as plain words (no pill) */
.olm-em[data-status="reading"] .chip, .ftile[data-tile-state="reading"] .fchip { padding: 0; border-radius: 0; background: linear-gradient(90deg, var(--faint), var(--ink) 50%, var(--faint));
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: arsheen 1.5s linear infinite; }
.chip.quiet { background-color: var(--badge); color: var(--badge-ink); }
[data-theme="dark"] .chip.quiet { background-color: var(--raise); }

/* reading pane */
.olm-read .olm-meta { font-size: 11px; }
.olm-read .olm-meta #m-from { color: var(--muted); }
.ec-read-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.ec-read-actions:not(:has(> :not([hidden]))) { display: none; }

/* file tiles: the site's .ftile, one state each */
.olm-read .fgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 0; margin: 20px 0 0; border: 0; gap: 10px; }
.ec-tiles:empty { display: none; }
.ec-tiles .ftile { position: relative; overflow: hidden; cursor: default; box-shadow: 0 0 0 1px var(--border); padding: 14px 8px 12px; color: var(--muted); }
.ec-tiles .ftile .fn { max-width: 100%; color: var(--ink); }
.ec .ftile .fn { word-break: normal; overflow-wrap: anywhere; } /* break at spaces first, mid-word only when one word is too long */
.ec-tiles .ftile .fsrc { font-size: 11px; line-height: 1.4; }
.ec-tiles .ftile .chip { font-size: 10.5px; padding: 1px 8px; }
.ec-tiles .ftile .fchip:empty { display: none; }
/* the folder line opens that folder in SharePoint */
.ec-tiles .ftile button.fsrc { all: unset; box-sizing: border-box; max-width: 100%; font-size: 11px; line-height: 1.4; color: var(--muted); cursor: pointer;
  border-radius: 4px; overflow-wrap: anywhere; text-align: center; }
.ec-tiles .ftile button.fsrc:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ec-tiles .ftile button.fsrc:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ftile[data-tile-state="waiting"] { opacity: .45; }
.ftile:is([data-tile-state="reading"], [data-tile-state="downloading"]) { background: var(--panel2); }
.ftile:is([data-tile-state="reading"], [data-tile-state="downloading"])::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-size: 250% 100%; background-image: linear-gradient(100deg, transparent 30%, var(--wf-shimmer) 50%, transparent 70%); animation: ftshim 1.3s linear infinite; }
.ftile:is([data-tile-state="waiting"], [data-tile-state="downloading"], [data-tile-state="skipped"]) .fchip { background: var(--badge); color: var(--badge-ink); }
.ftile[data-tile-state="unsorted"] .fchip { background: var(--warn-soft); color: var(--warn); }
.ftile[data-tile-state="failed"] .fchip { background: var(--bad-soft); color: var(--bad); }
.ftile:is([data-tile-state="filed"], [data-tile-state="unsorted"]) .fchip { animation: fvin .35s ease; }

/* the file on its way to its folder (moved by app.js with the Web Animations API) */
.ec-flyer { position: fixed; z-index: 70; display: inline-flex; align-items: center; gap: 6px; margin: 0; pointer-events: none;
  font-size: 11px; border: 1px solid var(--border2); border-radius: 9px; background: var(--panel2); color: var(--ink);
  padding: 10px 14px; box-shadow: var(--wf-shadow-pop); white-space: nowrap; will-change: transform, opacity; }

/* ---------- SharePoint: the mailbox's own .olm frame and .olm-top header; folders that open and close ---------- */
.ec .ec-sp { margin-top: 0; padding-bottom: 8px; }
.ec-sp .olm-top { align-items: center; border-bottom: 1px solid var(--border); }
.ec-sp-tools { display: inline-flex; align-items: center; gap: 10px; }
#sp-collapse { margin: -7px -8px; padding: 3px 8px; font-size: 11.5px; }
.ec-sp-root { margin: 0; padding: 14px 26px 4px; font-size: 12px; color: var(--faint); }
.ec-sp > .olm-note { padding: 6px 26px; margin: 0; }
.ec-folders, .ec-folders ul { list-style: none; margin: 0; padding: 0; }
.ec-folders { padding: 4px 16px 6px; }
.ec-folder > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--wf-radius-nav);
  font-size: 13px; color: var(--ink); cursor: pointer; }
.ec-folder > summary::-webkit-details-marker { display: none; }
.ec-folder > summary:hover { background: var(--panel2); }
.ec-folder > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.ec-folder > summary .navn { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.ec-folder > summary svg { flex: none; color: var(--faint); transition: transform .18s ease; }
.ec-folder[open] > summary .chev { transform: rotate(90deg); }
.ec-folder .ec-folder { margin-left: 14px; }
.ec-folder .ec-folder > summary { font-size: 12.5px; color: var(--muted); }
.ec-folder ul { padding: 0 0 4px 22px; }
li.ec-file { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 8px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
li.ec-file > span:not(.chip):not(.wf-dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li.ec-file .chip { margin-left: auto; flex: none; font-size: 10.5px; padding: 1px 8px; }
li.ec-file :is(.why, .from) { font-size: 11px; color: var(--faint); }
.ec-file .wf-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--good); }
:is(.ec-folder[data-kind="unsorted"], .ec-folder.unsorted, .ec-folder[data-key^="_Unsorted"]) .wf-dot { background: var(--warn); }
:is(.ec-folder, li.ec-file).ec-new { animation: tlnew .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
li.ec-file.flash { animation: flash 1.6s ease; }
.ec-folder > summary.flash { animation: ec-landed 1.6s ease; } /* the folder warms, the file row carries the site's ring: one ring, not two nested */
@keyframes ec-landed { 0%, 60% { background: var(--panel2); } 100% { background: transparent; } }

/* ---------- drawers: the site's .csdrawer; rows restated from its restore/r-mail.css ---------- */
.cstop h2 { margin: 0; padding: 0; border: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.cstop > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.csdrawer .cfgrow { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.csdrawer .cfgrow > span:first-child { width: auto; font-size: 12px; color: var(--muted); }
.csdrawer .cfgrow b { font-size: 13px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.csdrawer .cfgrow.ec-col { grid-template-columns: minmax(0, 1fr); }
.csdrawer :is(input:not([type="file"]), select, textarea) { box-sizing: border-box; width: 100%; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--panel2); border: 1px solid var(--border2); border-radius: 9px; padding: 8px 10px; }
.csdrawer :is(input, select, textarea):focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
#draft-text { display: block; width: calc(100% - 32px); min-height: 280px; margin: 12px 16px 16px; resize: vertical; line-height: 1.6; }
.csdrawer .panel h3 { margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--muted); }
#cmp-samples { border-bottom: 0; }
#cmp-samples .ftile { box-shadow: 0 0 0 1px var(--border); }
#cmp-samples .ftile[aria-pressed="true"] { background: var(--panel2); box-shadow: 0 0 0 1.5px var(--ink); }
#cmp-samples .ftile .num, #cmp-samples .ftile small { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.ec-own { margin: 0 16px 14px; }
.ec-own-list { list-style: none; margin: 0; padding: 0 16px 10px; font-size: 12px; color: var(--muted); }
.ec-own-list:empty { display: none; }
.ec-err { margin: 0 2px 12px; font-size: 12.5px; color: var(--bad); }
.csdrawer .gatebar { position: sticky; bottom: -20px; border-radius: 12px; }
.csdrawer .gatebar .note { font-size: 12px; font-weight: 400; color: var(--faint); }

/* ---------- phone (the site's 720 and 700 px lines) ---------- */
@media (max-width: 720px) {
  body.ec main.page, body.ec main.page:has(#mc) { padding: 16px 16px 40px; }
  .ec .mctitle { flex-direction: column; align-items: stretch; margin-top: 26px; }
  /* the picker on its own row, the buttons under it: Check mail wide, New email beside it when shown */
  .ec-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .ec-actions .ec-mb { grid-column: 1 / -1; grid-row: 1; }
  .ec-actions #primary { grid-column: 1; grid-row: 2; text-align: center; }
  .ec-actions #new-email { grid-column: 2; grid-row: 2; }
  .ec-actions:not(:has(#new-email:not([hidden]))) #primary { grid-column: 1 / -1; }
  .ec-mb-btn { width: 100%; max-width: none; }
  .ec-mb-btn .ec-mb-chev { margin-left: auto; }
  .ec-mb-menu { left: 0; right: 0; min-width: 0; }
  .ec .olm-cols { grid-template-columns: minmax(0, 1fr); }
  .ec .olm-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .ec .olm-list { max-height: 300px; overflow: auto; }
  .ec .olm-read { padding: 22px 18px; }
  .ec .olm-top, .ec .olm-tabs, .ec .olm-em { padding-left: 18px; padding-right: 18px; }
  .ec .cks { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .ec .ckhd { flex-wrap: wrap; }
  .ec .cksum { order: 3; flex: 1 1 100%; margin-left: 0; text-align: left; }
  .ec-status .mcbdet { display: none; }
  /* two lines at most, and always two lines tall, so the page under the sticky bar never jumps */
  .ec-status .answer { min-height: calc(2 * 1.45em); align-content: center; }
  .ec-status .answer > span { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .ec-sp-root, .ec-sp > .olm-note { padding-left: 18px; padding-right: 18px; }
  .ec-folders { padding: 4px 10px 6px; }
}

/* ---------- reduced motion: site-app.css stops every animation and transition; the swap is instant ---------- */
@media (prefers-reduced-motion: reduce) {
  .ec-flyer { display: none; }
  .ec-status .answer > span, .ec-status[data-status="working"] .answer > span:not([aria-hidden="true"]) { transition: none; animation: none; transform: none; }
  .ec-status[data-status="working"] .answer > span:not([aria-hidden="true"]), .olm-em[data-status="reading"] .chip, .ftile[data-tile-state="reading"] .fchip {
    background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
}

/* ---------- sign-in: the site's login page loads only tokens.css and login.css, so its own focus look wins here ---------- */
.ec .lg .lg-field .input:focus-visible { outline: 0 !important; }
.ec .lg :is(.lg-show, .lg-primary):focus-visible { outline: 2px solid var(--lg-focus) !important; outline-offset: 4px !important; }

/* Open and Download on file tiles and SharePoint rows, and the preview sheet */
.ec-fact { display: flex; gap: 10px; flex: none; }
.ec-factb { all: unset; box-sizing: border-box; font-size: 11px; line-height: 1.4; color: var(--muted); cursor: pointer; border-radius: 4px; }
.ec-factb:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ec-factb:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ec-tiles .ftile .ec-fact { justify-content: center; margin-top: 1px; }
/* a real mailbox's file over the server's limit (4.4 MB): no Open or Download (a Function URL answers at most about 6 MB) */
.ec-fbig { font-size: 11px; line-height: 1.4; color: var(--faint); white-space: nowrap; }
li.ec-file { position: relative; }
/* on a row: over its right end on hover or focus (the name keeps its width), always shown on touch screens */
li.ec-file .ec-fact { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); gap: 8px; padding: 2px 6px 2px 14px; border-radius: 6px;
  background: linear-gradient(90deg, transparent, var(--panel) 12px); opacity: 0; pointer-events: none; transition: opacity .12s ease; }
li.ec-file:is(:hover, :focus-within) .ec-fact { opacity: 1; pointer-events: auto; }
@media (hover: none) { li.ec-file .ec-fact { position: static; transform: none; margin-left: auto; padding: 0; background: none; opacity: 1; pointer-events: auto; }
  li.ec-file .chip + .ec-fact { margin-left: 0; } }
.csdrawer.ec-pv { width: min(760px, calc(96vw / var(--wf-zoom, 1))); display: flex; flex-direction: column; }
.csdrawer.ec-pv .cstop h2 { overflow-wrap: anywhere; }
.ec-pv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ec-pv-frame { flex: 1; width: 100%; min-height: 60vh; border: 0; background: var(--panel2); }
.ec-pv-img { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; object-fit: contain; }
.ec-pv-note { margin: 0; padding: 22px 18px; font-size: 13px; color: var(--muted); }
.csdrawer.ec-pv.ec-pv--wide { width: min(1080px, calc(96vw / var(--wf-zoom, 1))); }
.csdrawer.ec-pv.ec-pv--doc { width: min(860px, calc(96vw / var(--wf-zoom, 1))); }

/* Excel and CSV (server/preview.mjs .xv): a spreadsheet on a white sheet in both themes, as Excel shows it: a light
   grid, column letters and row numbers that stay put while the cells scroll, the sheet tabs along the bottom. */
.xv { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
.xv-sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.xv-sheet[hidden] { display: none; }
.xv-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #fff; -webkit-overflow-scrolling: touch; }
.xv-grid { table-layout: fixed; border-collapse: separate; border-spacing: 0; font: 12.5px/1.35 Arial, "Helvetica Neue", Helvetica, sans-serif; color: #1f1f1f; background: #fff; }
.xv-grid :is(td, th) { height: 22px; padding: 2px 6px; border-right: 1px solid #e3e5e8; border-bottom: 1px solid #e3e5e8; overflow: hidden; white-space: nowrap; text-overflow: clip; vertical-align: bottom; text-align: left; }
.xv-grid td.run { overflow: visible; }
.xv-grid td.w { white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: top; }
.xv-grid .xv-ch, .xv-grid .xv-corner { position: sticky; top: 0; z-index: 2; background: #f3f4f6; color: #5f6368; font-weight: 500; font-size: 11.5px; text-align: center; border-bottom-color: #d5d8dc; }
.xv-grid .xv-rn { position: sticky; left: 0; z-index: 1; background: #f3f4f6; color: #5f6368; font-weight: 400; font-size: 11px; text-align: center; padding: 2px 4px; border-right-color: #d5d8dc; font-variant-numeric: tabular-nums; }
.xv-grid .xv-corner { left: 0; z-index: 3; border-right-color: #d5d8dc; }
.xv-grid :is(.xv-hid) { padding: 0; border-right: 0; font-size: 0; }
.xv-grid td.b { font-weight: 700; }
.xv-grid td.i { font-style: italic; }
.xv-grid td.u { text-decoration: underline; }
.xv-grid td.s { text-decoration: line-through; }
.xv-grid td.ar { text-align: right; font-variant-numeric: tabular-nums; }
.xv-grid td.ac { text-align: center; }
.xv-grid td.neg { color: #c62828; }
.xv-grid td.bt { box-shadow: inset 0 1px 0 #6b7280; }
.xv-grid td.bt2 { box-shadow: inset 0 2px 0 #374151; }
.xv-grid td.bb { border-bottom-color: #6b7280; }
.xv-grid td.bb2 { border-bottom: 2px solid #374151; }
.xv-grid td.fill { border-right-color: rgba(255, 255, 255, .18); }
.xv-grid td.hd { background: #f8f9fa; }
.xv-more { margin: 0; padding: 8px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.xv-tabs { flex: none; display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; background: var(--panel2); border-top: 1px solid var(--border); scrollbar-width: none; }
.xv-tabs::-webkit-scrollbar { display: none; }
.xv-tab { all: unset; box-sizing: border-box; flex: none; padding: 7px 14px 8px; font-size: 12px; line-height: 1.2; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.xv-tab:hover { color: var(--ink); }
.xv-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; background: var(--panel); border-bottom-color: var(--wf-good, #149059); }
.xv-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Word (server/preview.mjs .dv): a white page on a grey desk, margins and readable type, in both themes. */
.dv { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px 20px 28px; background: #e8e9eb; }
[data-theme="dark"] .dv { background: #2a2a2a; }
.dv-page { box-sizing: border-box; max-width: 720px; min-height: 100%; margin: 0 auto; padding: 56px 64px 64px; background: #fff; color: #1f1f1f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .08); font: 14px/1.6 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.dv-page :is(h1, h2, h3, h4, h5, h6) { margin: 1.2em 0 .45em; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; color: #1b2a4a; line-height: 1.25; }
.ec-pv-body .dv-page :is(h1, h2, h3, h4, h5, h6) { padding: 0; border: 0; text-transform: none; letter-spacing: normal; font-weight: 700; }
.ec-pv-body .dv-table th { text-transform: none; letter-spacing: normal; color: inherit; font-size: inherit; }
.ec-pv-body .xv-grid :is(th, td) { text-transform: none; letter-spacing: normal; }
.dv-page > :first-child { margin-top: 0; }
.dv-page h1 { font-size: 24px; }
.dv-page h2 { font-size: 19px; }
.dv-page h3 { font-size: 16px; }
.dv-page :is(h4, h5, h6) { font-size: 14px; }
.dv-page p { margin: 0 0 .7em; }
.dv-page p.dv-empty { margin: 0; line-height: 1; height: .7em; }
.dv-page .dv-sub { color: #5f6368; font-size: 15px; }
.dv-page .ac { text-align: center; }
.dv-page .ar { text-align: right; }
.dv-page .aj { text-align: justify; }
.dv-page .dv-tab { display: inline-block; width: 3em; }
.dv-page .dv-pb { display: block; margin: 18px -64px; border-top: 1px dashed #c9ccd1; }
.dv-page .dv-list { margin: 0 0 .7em; padding-left: 1.6em; }
.dv-page .dv-list .dv-list { margin: .2em 0; }
.dv-page li { margin: .15em 0; }
.dv-tablewrap { overflow-x: auto; margin: .4em 0 1em; }
.dv-table { width: 100%; border-collapse: collapse; font: 13px/1.45 Arial, "Helvetica Neue", Helvetica, sans-serif; }
.dv-table :is(td, th) { padding: 6px 9px; border: 1px solid #c9ccd1; vertical-align: top; text-align: left; }
.dv-table th { background: #f3f4f6; font-weight: 700; }
.dv-table p { margin: 0; }
.dv-table p + p { margin-top: .35em; }

/* Loading: a faint grid or a page with lines, shimmering (still under reduced motion: site-app.css). */
.ec-pv-skel { flex: 1; min-height: 60vh; overflow: hidden; }
.ec-pv-skel-grid { background: #fff; background-image: linear-gradient(#eceef1 1px, transparent 1px), linear-gradient(90deg, #eceef1 1px, transparent 1px);
  background-size: 96px 23px; background-position: 40px 23px; box-shadow: inset 40px 23px 0 #f3f4f6; }
.ec-pv-skel-doc { background: #e8e9eb; padding: 22px 20px; }
[data-theme="dark"] .ec-pv-skel-doc { background: #2a2a2a; }
.ec-pv-skel-in { display: flex; flex-direction: column; gap: 14px; }
.ec-pv-skel-grid .ec-pv-skel-in { padding: 34px 0 0 50px; gap: 12px; }
.ec-pv-skel-doc .ec-pv-skel-in { max-width: 720px; min-height: 56vh; margin: 0 auto; padding: 56px 64px; box-sizing: border-box; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ec-pv-skl { display: block; height: 11px; border-radius: 4px; background: linear-gradient(100deg, #eef0f2 30%, #f7f8f9 50%, #eef0f2 70%); background-size: 250% 100%; animation: ftshim 1.3s linear infinite; }
.ec-pv-skel-grid .ec-pv-skl { width: min(520px, 70%); }
.ec-pv-skel-grid .ec-pv-skl:nth-child(3n + 2) { width: min(380px, 52%); }
.ec-pv-skel-doc .ec-pv-skl:first-child { width: 46%; height: 18px; margin-bottom: 8px; }
.ec-pv-skel-doc .ec-pv-skl:nth-child(4n) { width: 72%; }

@media (max-width: 720px) {
  .dv { padding: 10px 8px 16px; }
  .dv-page { padding: 26px 20px 30px; font-size: 13.5px; }
  .dv-page .dv-pb { margin: 14px -20px; }
  .ec-pv-skel-doc .ec-pv-skel-in { padding: 26px 20px; }
  .xv-grid { font-size: 12px; }
}

/* The reading pane keeps the sender's line breaks (numbered lists, signatures) and wraps long words or links. */
#m-text .olm-p { white-space: pre-line; overflow-wrap: anywhere; }
