/* Excel mode (html[data-ui="excel"], Settings ▸ Layout ▸ Workbook mode): a ribbon of the everyday actions, the name box
   and formula bar under it, every sheet as a tab along the bottom and a status bar. The detailed mode is unchanged. */
.xl-only{display:none!important}
html[data-ui="excel"] .xl-only{display:flex!important}

/* ---- Excel mode on every page: Excel's greys, flatter corners and shadows (the brand colours stay) ---- */
html[data-ui="excel"]{
  --bg:#f3f3f3;--line:#d6d6d6;--line-soft:#e8e8e8;--ink:#252525;--muted:#616161;--key-bg:#f3f3f3;
  --sh-top:0 1px 2px rgba(0,0,0,.14);--sh-card:0 2px 8px rgba(0,0,0,.08);--sh-soft:0 1px 2px rgba(0,0,0,.06);
  --f-ui:"Segoe UI","Noto Sans","BC Sans","Noto Sans Devanagari","BC Deva",Kalimati,system-ui,-apple-system,Roboto,Arial,sans-serif;
}
html.dark[data-ui="excel"]{--bg:#1b1b1b;--paper:#242424;--line:#3a3a3a;--line-soft:#2f2f2f;--ink:#e8e8e8;--muted:#a8a8a8;--key-bg:#2b2b2b}
html[data-ui="excel"] body{font-family:var(--f-ui)}
html[data-ui="excel"] ::selection{background:var(--n-200,#afc6ea)}
html[data-ui="excel"] :focus-visible{outline-color:var(--n-600,#0b3a82)}
/* side menu: Excel's grey pane, a brand-colour bar on the page you are on */
html[data-ui="excel"] aside.sb{background:#f3f3f3;border-color:#e1e1e1}
html[data-ui="excel"] .nav-link:hover{background:#e6e6e6}
html[data-ui="excel"] .nav-link-active{background:#e1e1e1!important;color:var(--n-600,#0b3a82)!important;box-shadow:inset 3px 0 0 var(--n-600,#0b3a82)}
html.dark[data-ui="excel"] aside.sb{background:#202020;border-color:#333}
html.dark[data-ui="excel"] .nav-link:hover,html.dark[data-ui="excel"] .nav-link-active{background:#2e2e2e!important}
/* buttons: the brand colour */
html[data-ui="excel"] .btn-primary,html[data-ui="excel"] .tk-btn.primary,html[data-ui="excel"] .tk-btn.accent{background:var(--n-600,#0b3a82);border-color:var(--n-600,#0b3a82);color:#fff}
html[data-ui="excel"] .btn-primary:hover,html[data-ui="excel"] .tk-btn.primary:hover,html[data-ui="excel"] .tk-btn.accent:hover{background:var(--n-700,#072a60)}
/* tables: a grey header row and thin grey lines, like a worksheet */
html[data-ui="excel"] .pl-t thead th,html[data-ui="excel"] .sh-t th,html[data-ui="excel"] .pl-sh-t th{background:#f3f3f3;color:#444;border-color:#d6d6d6}
html[data-ui="excel"] .pl-t td,html[data-ui="excel"] .sh-t td{border-color:#e1e1e1}
html.dark[data-ui="excel"] .pl-t thead th,html.dark[data-ui="excel"] .sh-t th{background:#2b2b2b;color:#ddd;border-color:#3a3a3a}

/* more room for the sheet: no app side menu, no detailed sub-toolbar, no "Next" footer */
html[data-ui="excel"] .wb-page aside.sb{display:none}
html[data-ui="excel"] .wb-page .sb-main{padding-left:0!important}
html[data-ui="excel"] .wb-exp,html[data-ui="excel"] .wb-nextstep,html[data-ui="excel"] .tb-bar,html[data-ui="excel"] .app-foot{display:none!important}

/* title bar (the workbook toolbar, restyled): app icon, quick access, the project's name, search, people, account */
.xl-inl{display:none}
html[data-ui="excel"] .xl-inl{display:inline}
html[data-ui="excel"]{--xl-tb:42px;--xl-tabs:32px;--xl-rb:76px}
html[data-ui="excel"] .wb-bar{flex-wrap:nowrap;height:var(--xl-tb);min-height:var(--xl-tb);background:#f3f3f3;border-bottom:0;box-shadow:none;color:#252525}
html[data-ui="excel"] .wb-bar [data-grp="goto"],html[data-ui="excel"] .wb-bar [data-grp="tools"],html[data-ui="excel"] .wb-bar [data-grp="print"],
html[data-ui="excel"] .wb-bar [data-grp="file"],html[data-ui="excel"] .wb-bar [data-grp="clock"],html[data-ui="excel"] .wb-bar .wb-pill,html[data-ui="excel"] .wb-bar .wb-nb,
html[data-ui="excel"] .wb-bar [data-grp="records"],html[data-ui="excel"] .wb-bar [data-grp="help"]{display:none!important}
html[data-ui="excel"] .wb-grp{background:none;border:0;padding:0}
html[data-ui="excel"] .wb-c,html[data-ui="excel"] .wb-bar select.wb-c{background:transparent;border-color:transparent;color:#252525;font-weight:600;box-shadow:none}
html[data-ui="excel"] .wb-c:hover:not(:disabled),html[data-ui="excel"] .wb-c[aria-expanded="true"]{background:#e1e1e1;box-shadow:none}
html[data-ui="excel"] .wb-proj{max-width:none;font:400 13px/1 var(--f-ui);color:#444}
html[data-ui="excel"] .wb-proj>svg:first-child{display:none}
html[data-ui="excel"] .wb-proj span.t{max-width:260px}
html[data-ui="excel"] .xl-app{color:#616161}
html[data-ui="excel"] .wb-saved{color:var(--n-600,#0b3a82)}
html[data-ui="excel"] .wb-bar .pres{box-shadow:0 0 0 2px #f3f3f3}
.xl-qa{align-items:center;gap:2px;margin-right:6px}
.xl-qa a,.xl-qa button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;border-radius:var(--r-md);background:none;color:#444;cursor:pointer}
.xl-qa a:hover,.xl-qa button:hover{background:#e1e1e1}
.xl-qa svg{width:17px;height:17px}
.xl-qa .xl-logo{color:#fff;background:var(--n-600,#0b3a82);width:28px;height:28px;margin-right:6px;border-radius:var(--r-md)}
.xl-qa .xl-logo:hover{background:var(--n-700,#072a60)}
.xl-search{flex:0 1 460px;align-items:center;gap:8px;height:30px;margin:0 auto;padding:0 12px;border:1px solid #c8c8c8;border-radius:var(--r-pill);background:#fff;color:#616161}
.xl-search svg{width:16px;height:16px;flex:none}
.xl-search input{flex:1;min-width:0;border:0;outline:0;background:none;font:13px var(--f-ui)}
html[data-ui="excel"] .wb-push{margin-left:0}
/* ribbon tabs */
.xl-tabs{position:sticky;top:var(--xl-tb);z-index:20;align-items:flex-end;gap:2px;height:var(--xl-tabs);padding:0 10px;background:#f3f3f3;font-family:var(--f-ui)}
.xl-tabs>a,.xl-tabs>button{position:relative;padding:5px 12px 7px;border:0;border-radius:var(--r-md) var(--r-md) 0 0;background:none;color:#252525;font-size:14px;text-decoration:none;cursor:pointer}
.xl-tabs>a:hover,.xl-tabs>button:hover{background:#e6e6e6}
.xl-tabs>button.on{font-weight:600}
.xl-tabs>button.on::after{content:"";position:absolute;left:12px;right:12px;bottom:2px;height:3px;border-radius:var(--r-xs);background:var(--n-600,#0b3a82)}
.xl-tabs .xl-push{flex:1}
.xl-share{display:inline-flex!important;align-items:center;gap:6px;margin-bottom:3px;padding:4px 14px!important;border-radius:var(--r-pill);background:var(--n-600,#0b3a82)!important;color:#fff!important;font-size:13px!important;font-weight:600}
.xl-share:hover{background:var(--n-700,#072a60)!important}
.xl-share svg{width:15px;height:15px}
html.dark .xl-tabs,html.dark[data-ui="excel"] .wb-bar{background:#1f1f1f;color:#e5e5e5}
html.dark .xl-tabs>a,html.dark .xl-tabs>button,html.dark[data-ui="excel"] .wb-c,html.dark .xl-qa a,html.dark .xl-qa button{color:#e5e5e5}
html.dark .xl-tabs>a:hover,html.dark .xl-tabs>button:hover,html.dark .xl-qa button:hover{background:#333}
html.dark .xl-search{background:#2b2b2b;border-color:#444;color:#aaa}
html.dark .xl-search input{color:#e5e5e5}

/* ribbon */
.xl-ribbon{position:sticky;top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px));z-index:20;align-items:stretch;gap:0;overflow-x:auto;height:var(--xl-rb,76px);margin:0 8px;padding:4px 6px 0;background:#fff;border:1px solid #e1e1e1;border-radius:var(--r-lg);box-shadow:0 1px 3px rgba(0,0,0,.08);font-family:var(--f-ui,system-ui)}
.xl-g[hidden]{display:none}
.xl-g{display:flex;flex-direction:column;align-items:center;padding:0 5px;border-right:1px solid #dadada;flex:none}
.xl-g:last-child{border-right:0}
.xl-g>small{font-size:10.5px;color:#616161;padding:2px 0 3px;white-space:nowrap}
.xl-b{display:flex;align-items:center;gap:2px;flex:1}
.xl-b>button,.xl-b>a{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:38px;height:50px;padding:2px 4px;border:1px solid transparent;border-radius:var(--r-md);background:none;color:#252525;font-size:11px;line-height:1.1;text-decoration:none;cursor:pointer;white-space:nowrap}
.xl-b>button svg,.xl-b>a svg{width:20px;height:20px;color:#2b579a}
.xl-b>button:hover:not(:disabled),.xl-b>a:hover{background:#e1e1e1;border-color:#c8c8c8}
.xl-b>button:disabled{opacity:.4;cursor:default}
.xl-b>button[data-xl="zoomIn"],.xl-b>button[data-xl="zoomOut"]{min-width:26px;font-size:16px}
.xl-zl{font:600 12px/1 var(--f-ui,system-ui);min-width:40px;text-align:center;color:#252525}
.xl-sel{display:inline-flex}
.xl-sel select{height:26px;max-width:124px;margin:0 3px;padding:0 6px;border:1px solid #c8c8c8;border-radius:var(--r-md);background:#fff;font-size:12px;color:#252525}
.xl-sel select[hidden]{display:none}

/* name box + formula bar, always in view under the ribbon */
html[data-ui="excel"] .wb-fx{position:sticky;top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px) + var(--xl-rb,76px) + 2px);margin-top:6px;z-index:19;padding:4px 6px;background:#fff;border-bottom:1px solid #d6d6d6}
html[data-ui="excel"] .wb-fx[hidden]{display:flex}
html[data-ui="excel"] .wb-fxn{flex:none;width:200px;max-width:none;padding:3px 10px;border:1px solid #c8c8c8;border-radius:var(--r-md);font:12px/1.4 var(--f-ui,system-ui);background:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-ui="excel"] .wb-fxi{font:italic 700 13px/1 Georgia,serif;color:#616161;padding:0 6px;border-left:1px solid #e0e0e0;border-right:1px solid #e0e0e0}
html[data-ui="excel"] #fxIn{flex:1;border:0;outline:0;font-size:13px;padding:3px 6px}

/* the sheet like a worksheet: white, square, thin grey gridlines */
html[data-ui="excel"] .wb-area{background:#fff}
html[data-ui="excel"] #sheetWrap .sheet{box-shadow:0 1px 3px rgba(0,0,0,.06);border:1px solid #e1e1e1;border-radius:var(--r-md)}
html[data-ui="excel"] #sheetWrap td,html[data-ui="excel"] #sheetWrap th{border-color:#d4d4d4}
html[data-ui="excel"] #sheetWrap input[data-p]:focus,html[data-ui="excel"] #sheetWrap select[data-p]:focus,html[data-ui="excel"] #sheetWrap textarea[data-p]:focus{outline:2px solid var(--n-600,#0b3a82);outline-offset:-1px;box-shadow:none}

/* sheet tabs along the bottom, like worksheet tabs; the status bar under them */
html[data-ui="excel"] .wb-tabs{bottom:0;background:#f3f3f3;border-top:1px solid #d6d6d6}
html[data-ui="excel"] .wb-tab{border-color:#d6d6d6;color:#252525;border-radius:0}
html[data-ui="excel"] .wb-tab.on{background:#fff;color:var(--n-600,#0b3a82);font-weight:700;box-shadow:inset 0 -3px 0 var(--n-600,#0b3a82);border-color:#d6d6d6}
.xl-status{position:sticky;bottom:0;z-index:20;align-items:center;gap:10px;height:24px;padding:0 10px;background:#f3f3f3;border-top:1px solid #d6d6d6;font:12px/1 var(--f-ui,system-ui);color:#252525}
.xl-status .xl-mut{color:#616161}
.xl-status .xl-sep{width:1px;height:14px;background:#d0d0d0}
.xl-status .xl-push{flex:1}
.xl-status button{border:0;background:none;font-size:15px;line-height:1;color:#444;cursor:pointer;padding:0 4px}
.xl-status b{font-weight:600;min-width:38px;text-align:center}

/* dark theme */
html.dark .xl-ribbon,html.dark .xl-status,html[data-ui="excel"].dark .wb-tabs{background:#252525;border-color:#3b3b3b;color:#e5e7eb}
html.dark .xl-g{border-color:#3b3b3b}
html.dark .xl-g>small,html.dark .xl-status .xl-mut{color:#9ca3af}
html.dark .xl-b>button,html.dark .xl-b>a,html.dark .xl-zl{color:#e5e7eb}
html.dark .xl-b>button svg,html.dark .xl-b>a svg{color:#93c5fd}
html.dark .xl-b>button:hover:not(:disabled),html.dark .xl-b>a:hover{background:#3b3b3b;border-color:#4d4d4d}
html[data-ui="excel"].dark .wb-fx,html[data-ui="excel"].dark .wb-area,html[data-ui="excel"].dark .wb-fxn{background:#161616;border-color:#3b3b3b}
html[data-ui="excel"].dark .wb-tab{color:#e5e7eb;border-color:#3b3b3b}
html[data-ui="excel"].dark .wb-tab.on{background:#161616;color:#8db4ff;box-shadow:inset 0 -3px 0 #5b8def}
@media print{.xl-only{display:none!important}}
@media (max-width:1500px){.xl-b>button span,.xl-b>a span{font-size:10.5px}.xl-b>button,.xl-b>a{min-width:34px}}
.xl-entry .xl-b>a.on{background:var(--n-50,#e7eef9);border-color:#b6cbea;color:var(--n-600,#0b3a82);font-weight:600}
.xl-entry .xl-b>a.on svg{color:var(--n-600,#0b3a82)}
html.dark .xl-entry .xl-b>a.on{background:#242424;border-color:#2f5fb3;color:#8db4ff}
@media (max-width:1400px){.xl-g{padding:0 3px}.xl-b>button,.xl-b>a{min-width:32px;padding:2px 3px}.xl-sel select{max-width:112px}}

/* ---- Excel mode on every page but the sheets: Excel's start-page side bar (layouts/_xl_side.html) in place of the
   side menu, a light title bar ---- */
.xl-global{display:none}
@media (min-width:901px){
  html[data-ui="excel"] body:not(.wb-page) aside.sb{display:none}
  html[data-ui="excel"] body:not(.wb-page) .xl-global{display:flex;position:fixed;top:0;left:0;bottom:0;z-index:29;height:auto;padding-top:62px}
  html[data-ui="excel"] body:not(.wb-page) .sb-main{padding-left:200px!important}
}
html[data-ui="excel"] body:not(.wb-page) .sb-main>header{background:#f3f3f3;backdrop-filter:none;border-color:#e1e1e1}
.xl-hlogo{align-items:center;gap:8px;color:#252525;text-decoration:none;font-size:14px}
.xl-hlogo svg{width:28px;height:28px;padding:5px;border-radius:var(--r-md);background:var(--color-brand-600,var(--n-600,#0b3a82));color:#fff}
@media (min-width:901px){html[data-ui="excel"] body:not(.wb-page) .xl-hlogo{position:fixed;left:22px;top:14px;z-index:32}}
html.dark[data-ui="excel"] body:not(.wb-page) .sb-main>header{background:#1f1f1f;border-color:#333}
html.dark .xl-hlogo{color:#e5e5e5}
.xs-h{display:block;padding:4px 22px 2px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;color:#616161;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---- Excel mode: the start page (projects/start_excel.html) ---- */
.xl-start .app-foot{display:none}
.xs-main{display:flex}
.xs{display:flex;flex:1;min-height:calc(100vh - 56px);background:#fafafa;font-family:var(--f-ui,system-ui);color:#252525}
.xs-side{flex-direction:column;width:200px;flex:none;padding:14px 0;background:#f0f0f0;border-right:1px solid #e1e1e1;overflow-y:auto}
.xs-side a,.xs-side button{display:flex;align-items:center;gap:12px;margin:1px 10px;padding:8px 12px;border:0;border-radius:var(--r-md);background:none;color:#252525;font-size:14px;text-align:left;text-decoration:none;cursor:pointer}
.xs-side a svg,.xs-side button svg{width:18px;height:18px;color:#444;flex:none}
.xs-side a:hover,.xs-side button:hover{background:#e3e3e3}
.xs-side a.on{color:var(--n-600,#0b3a82);font-weight:600;background:var(--n-50,#e7eef9);box-shadow:inset 3px 0 0 var(--n-600,#0b3a82)}
.xs-side a.on svg{color:var(--n-600,#0b3a82)}
.xs-side hr{margin:8px 20px;border:0;border-top:1px solid #d6d6d6}
.xs-fill{flex:1}
.xs-body{flex:1;min-width:0;padding:22px 48px 40px}
.xs-hi{margin:0 0 18px;font-size:26px;font-weight:600}
.xs-new>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:20px;font-weight:600;margin-bottom:14px}
.xs-new>summary::-webkit-details-marker{display:none}
.xs-chev{width:18px;height:18px;transition:transform .15s}
.xs-new:not([open]) .xs-chev{transform:rotate(-90deg)}
.xs-tiles{display:flex;flex-wrap:wrap;gap:22px 26px}
.xs-tile{display:flex;flex-direction:column;align-items:center;gap:10px;width:156px;text-decoration:none;color:#252525}
.xs-tile button{display:contents;font:inherit;color:inherit;cursor:pointer}
.xs-tile b{font-size:13.5px;font-weight:600;text-align:center}
.xs-tile b span{font-weight:400;color:#616161}
.xs-th{position:relative;display:flex;flex-direction:column;width:150px;height:114px;padding:12px 10px 0;background:#fff;border:1px solid #d6d6d6;border-radius:var(--r-lg);box-shadow:0 1px 2px rgba(0,0,0,.06);overflow:hidden;transition:box-shadow .15s,border-color .15s}
.xs-tile:hover .xs-th{border-color:var(--n-600,#0b3a82);box-shadow:0 3px 10px rgba(0,0,0,.12)}
.xs-th small{font-size:10.5px;color:var(--n-600,#0b3a82)}
.xs-th em{font-style:normal;font-size:15px;color:var(--n-600,#0b3a82);line-height:1.2}
.xs-band{position:absolute;left:0;right:0;bottom:0;height:34px;background:var(--n-600,#0b3a82);display:flex;align-items:center;justify-content:flex-end;padding-right:10px}
.xs-band svg{width:26px;height:26px;padding:4px;border-radius:50%;background:#fff;color:var(--n-600,#0b3a82)}
.xs-blank{padding:0;background:#fff linear-gradient(#e6e6e6 1px,transparent 1px) 0 0/100% 15px,#fff}
.xs-blank{background-image:linear-gradient(90deg,#e6e6e6 1px,transparent 1px),linear-gradient(#e6e6e6 1px,transparent 1px);background-size:50px 15px}
.xs-blank i{position:absolute;left:14px;top:14px;width:48px;height:16px;border:2px solid var(--n-600,#0b3a82)}
.xs-more{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin:18px 0 0;padding-top:14px;border-top:1px solid #e1e1e1;color:var(--n-600,#0b3a82);font-weight:600;font-size:14px;text-decoration:none}
.xs-more svg{width:18px;height:18px}
.xs-tabs{display:flex;align-items:center;gap:26px;margin:30px 0 8px}
.xs-tabs button{padding:6px 2px;border:0;border-bottom:3px solid transparent;background:none;font-size:16px;color:#444;cursor:pointer}
.xs-tabs button.on{border-bottom-color:var(--n-600,#0b3a82);color:#252525;font-weight:600}
.xs-find{margin-left:auto;width:240px;padding:6px 14px;border:1px solid #c8c8c8;border-radius:var(--r-pill);background:#fff;font-size:13px}
.xs-list{width:100%;border-collapse:collapse;font-size:14px}
.xs-list th{padding:10px 8px;text-align:left;font-weight:400;font-size:13.5px;color:#444;border-bottom:1px solid #e1e1e1}
.xs-list th svg{width:18px;height:18px;color:#616161}
.xs-list td{padding:10px 8px;border-bottom:1px solid #e8e8e8;vertical-align:middle}
.xs-list tr[hidden]{display:none}
.xs-list tbody tr:hover td{background:#f0f0f0}
.xs-list a{color:#252525;text-decoration:none}.xs-list a:hover b{text-decoration:underline}
.xs-list b{font-weight:400;font-size:15px}
.xs-list small{display:block;margin-top:2px;color:#616161;font-size:13px}
.xs-ic{width:46px}
.xs-file{display:inline-flex;align-items:flex-end;justify-content:center;width:30px;height:34px;padding-bottom:3px;border-radius:var(--r-sm);background:var(--n-600,#0b3a82);color:#fff;font:700 8.5px/1 var(--f-ui,system-ui);box-shadow:inset -8px 0 0 rgba(255,255,255,.18)}
.xs-file.m-1S1E{background:var(--n-500,#2b6cb0)}.xs-file.m-MU{background:#5b6b82}
.xs-sh{font-style:normal;color:#5b21b6}
.xs-pin{width:44px;text-align:center}
.xs-pin button{border:0;background:none;padding:4px;color:#616161;cursor:pointer;opacity:0;transition:opacity .1s}
.xs-pin button svg{width:17px;height:17px}
.xs-list tr:hover .xs-pin button,.xs-pin button[aria-pressed="true"],.xs-pin button:focus-visible{opacity:1}
.xs-pin button[aria-pressed="true"]{color:var(--n-600,#0b3a82)}
.xs-when{width:200px;color:#444;font-size:13.5px;white-space:nowrap}
.xs-none{color:#616161;padding:16px 8px}
@media (max-width:900px){.xs-side{display:none}.xs-body{padding:16px}.xs-when{width:auto}}
html.dark .xs{background:#161616;color:#e5e7eb}
html.dark .xs-side{background:#252525;border-color:#3b3b3b}
html.dark .xs-side a,html.dark .xs-side button,html.dark .xs-tile,html.dark .xs-list a{color:#e5e7eb}
html.dark .xs-side a:hover,html.dark .xs-side button:hover,html.dark .xs-side a.on,html.dark .xs-list tbody tr:hover td{background:#3b3b3b}
html.dark .xs-th,html.dark .xs-find{background:#252525;border-color:#3b3b3b;color:#e5e7eb}
html.dark .xs-list th,html.dark .xs-list td,html.dark .xs-more{border-color:#3b3b3b}
html.dark .xs-list small,html.dark .xs-tile b span{color:#9ca3af}
.xs-tile button .xs-th{text-align:left;align-items:flex-start}

/* ---- Excel mode, a document sheet (html[data-doc]: letters, minutes, tippani, notices, cover pages): Word's view —
   a grey canvas, a ruler, the page in the middle, no formula bar; while its text is edited the formatting toolbar is
   the Home ribbon ---- */
.xl-qa .xl-logo .xl-ic-x{display:inline-flex}
.xl-qa .xl-logo .xl-ic-w,html[data-doc] .xl-qa .xl-logo .xl-ic-x{display:none}
html[data-doc] .xl-qa .xl-logo .xl-ic-w{display:inline-flex}
html[data-doc] .xl-sheet-only,html:not([data-doc]) .xl-doc-only{display:none!important}
html[data-ui="excel"][data-doc] .wb-fx{display:none!important}
html[data-ui="excel"][data-doc] .wb-area{background:#e9e9e9}
html[data-ui="excel"][data-doc] #sheetWrap .sheet{border:0;box-shadow:0 1px 3px rgba(0,0,0,.18),0 0 0 1px rgba(0,0,0,.04)}
.xl-ruler{display:none}
html[data-ui="excel"][data-doc] .xl-ruler{display:block;position:sticky;top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px) + var(--xl-rb,76px) + 2px);z-index:18;
  width:794px;max-width:100%;height:18px;margin:8px auto 6px;background:#fff;border:1px solid #d6d6d6;
  background-image:repeating-linear-gradient(90deg,#9a9a9a 0 1px,transparent 1px 37.8px),repeating-linear-gradient(90deg,#c4c4c4 0 1px,transparent 1px 18.9px);
  background-size:100% 9px,100% 5px;background-position:0 100%,0 100%;background-repeat:no-repeat}
html[data-ui="excel"][data-doc] .xl-ruler i{position:absolute;left:0;right:0;top:0;bottom:0;margin:0 64px;background:rgba(255,255,255,.0);border-left:1px solid #bbb;border-right:1px solid #bbb}
/* editing: the Word ribbon of the editor (RTE_TOOL) under the tabs; the other tabs keep their own ribbon */
html[data-ui="excel"].xl-editing[data-xl-tab="home"] .xl-ribbon{visibility:hidden}
html[data-ui="excel"].xl-editing:not([data-xl-tab="home"]) #sheetWrap .ntw{display:none}
html[data-ui="excel"].xl-editing #sheetWrap .ntw{position:fixed;top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px));left:8px;right:8px;z-index:21;height:var(--xl-rb,76px);margin:0;border:1px solid #e1e1e1;border-radius:var(--r-sm);background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.08);overflow-x:auto;view-transition-name:xl-ribbon}
html.dark[data-ui="excel"][data-doc] .wb-area{background:#151515}
html.dark[data-ui="excel"][data-doc] .xl-ruler{background-color:#242424;border-color:#3a3a3a}

/* ---- Excel mode: from sheet to sheet (or document) the page morphs; the title bar, the ribbon tabs, the ribbon, the
   sheet-names bar and the status bar stay where they are (cross-document View Transitions; see base.html) ---- */
html[data-ui="excel"] .wb-bar{view-transition-name:xl-title}
html[data-ui="excel"] .xl-tabs{view-transition-name:xl-tabs}
html[data-ui="excel"] .xl-ribbon{view-transition-name:xl-ribbon}
html[data-ui="excel"] .wb-tabs{view-transition-name:xl-sheetbar}
html[data-ui="excel"] .xl-status{view-transition-name:xl-status}
html[data-ui="excel"] #sheetWrap{view-transition-name:xl-page}
html[data-ui="excel"] .xs-side{view-transition-name:xl-side}
html[data-ui="excel"] body:not(.wb-page) #main{view-transition-name:xl-page}
html[data-ui="excel"] body:not(.wb-page) .sb-main>header{view-transition-name:xl-title}
::view-transition-group(xl-title),::view-transition-group(xl-tabs),::view-transition-group(xl-ribbon),
::view-transition-group(xl-sheetbar),::view-transition-group(xl-status),::view-transition-group(xl-side){animation:none}
::view-transition-old(xl-title),::view-transition-old(xl-tabs),::view-transition-old(xl-ribbon),
::view-transition-old(xl-sheetbar),::view-transition-old(xl-status),::view-transition-old(xl-side){display:none}
::view-transition-new(xl-title),::view-transition-new(xl-tabs),::view-transition-new(xl-ribbon),
::view-transition-new(xl-sheetbar),::view-transition-new(xl-status),::view-transition-new(xl-side){animation:none}
::view-transition-group(xl-page){animation-duration:.26s;animation-timing-function:var(--ease)}
::view-transition-old(xl-page){animation:xlPageOut .18s var(--ease) both}
::view-transition-new(xl-page){animation:xlPageIn .26s var(--ease) both}
::view-transition-old(root),::view-transition-new(root){animation-duration:.12s}
@keyframes xlPageOut{to{opacity:0;transform:translateY(-6px) scale(.995)}}
@keyframes xlPageIn{from{opacity:0;transform:translateY(10px) scale(.995)}}
/* the Word toolbar in the ribbon of a document, before editing: shown greyed, a click starts the editor */
.xl-wordbar{cursor:pointer;padding:0 4px}
.xl-wordbar>div{opacity:.5;pointer-events:none}
.xl-wordbar:hover>div{opacity:.75}
.xl-wordbar .ntool{position:static!important;margin:0!important;border:0!important;box-shadow:none!important;background:none!important;padding:0!important}

/* ---- Excel mode: ← Back on the side bar, and the File panel of a sheet sliding in like Excel's ---- */
.xs-back{display:inline-flex!important;align-items:center;justify-content:center;flex:none;align-self:flex-start;box-sizing:border-box;width:38px!important;height:38px!important;min-width:38px;min-height:38px;aspect-ratio:1;margin:2px 0 10px 20px!important;padding:0!important;border:1.5px solid #444!important;border-radius:50%!important;background:none;color:#252525;cursor:pointer}
.xs-back[hidden]{display:none!important}
.xs-back:hover{background:#e1e1e1!important}
.xs-back svg{width:18px;height:18px;margin:0;color:#252525!important}
.xl-bs{position:fixed;inset:0;z-index:70;display:flex;background:#fafafa;transform:translateX(-100%);opacity:.6;transition:transform .26s var(--ease),opacity .2s var(--ease);overflow:hidden}
.xl-bs.on{transform:none;opacity:1;box-shadow:8px 0 40px rgba(0,0,0,.18)}
.xl-bs>.xs{flex:1;min-height:100%;overflow:hidden}
.xl-bs .xs-side{display:flex;height:100%;padding-top:16px}
.xl-bs .xs-body{overflow-y:auto;height:100%}
html[data-rm] .xl-bs{transition:none}
@media (prefers-reduced-motion:reduce){.xl-bs{transition:none}}
html.dark .xl-bs{background:#161616}
html.dark .xs-back{border-color:#ddd!important;color:#eee}
html.dark .xs-back svg{color:#eee!important}

/* ---- Excel mode: what the title bar opens shows in full — its menus above the tabs and ribbon (the bar is a layer
   above them), the side panes (Ask, Notes, Chat, Laws) below the ribbon like Excel's task panes ---- */
html[data-ui="excel"] .wb-bar{z-index:50}
html[data-ui="excel"] .wb-bar .wb-menu{z-index:51;max-height:calc(100vh - var(--xl-tb,42px) - 16px);overflow-y:auto}
html[data-ui="excel"] .as-drawer,html[data-ui="excel"] .nt-drawer:not(.nd-float){top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px) + var(--xl-rb,76px) + 6px);bottom:38px;height:auto}
html[data-ui="excel"] .pc-drawer{top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px) + var(--xl-rb,76px) + 10px)}
/* zoom on the ribbon, on every tab, at its right end (the status bar under the sheet names is gone) */
.xl-zoom{margin-left:auto;order:99;border-right:0!important}

/* ---- Excel mode, a Word sheet: the entries of the letter (signatory, the letter's settings, attendance…) in a bar
   across the top of the sheet, under the ribbon — not in a column beside the letter (entry.js: lt-panel) ---- */
html[data-ui="excel"][data-doc] #sheetWrap .sheet.lt-side{display:block}
html[data-ui="excel"][data-doc] #sheetWrap .sheet.lt-side.portrait{max-width:900px}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel{position:static;max-height:none;overflow:visible;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:8px;
  margin:0 0 14px;padding:8px;background:#fff;border:1px solid #e1e1e1;border-radius:var(--r-lg);box-shadow:0 1px 3px rgba(0,0,0,.05)}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel>*{flex:1 1 280px;max-width:560px;margin:0}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel>.lt-sig{flex:0 1 260px}
html[data-ui="excel"][data-doc] #sheetWrap .lt-main{grid-column:auto;grid-row:auto}
html.dark[data-ui="excel"][data-doc] #sheetWrap .lt-panel{background:#252525;border-color:#3b3b3b}

/* ---- Excel mode: pin / unpin the ribbon (the ⌃ at its right end) — unpinned, the tabs only; a tab drops its ribbon
   over the sheet (html.xl-rb-open) ---- */
.xl-pin{position:absolute;z-index:2;right:6px;bottom:4px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:var(--r-md);background:none;color:#616161;cursor:pointer}
.xl-pin:hover{background:#e6e6e6;color:#252525}
.xl-pin svg{width:15px;height:15px;transition:transform .15s}
.xl-pin[aria-pressed="true"]{color:var(--n-600,#0b3a82);background:var(--n-50,#e7eef9)}
.xl-pin[aria-pressed="false"] svg{transform:rotate(45deg)}
html[data-ui="excel"][data-xl-unpinned]{--xl-rb:0px}
html[data-ui="excel"][data-xl-unpinned] .xl-ribbon{position:fixed;left:8px;right:8px;top:calc(var(--xl-tb,42px) + var(--xl-tabs,32px));height:76px;z-index:45;visibility:hidden;opacity:0;transform:translateY(-6px);transition:opacity .15s,transform .15s,visibility 0s .15s;box-shadow:0 8px 24px rgba(0,0,0,.14)}
html[data-ui="excel"][data-xl-unpinned].xl-rb-open .xl-ribbon{visibility:visible;opacity:1;transform:none;transition:opacity .15s,transform .15s}
html[data-ui="excel"][data-xl-unpinned].xl-editing #sheetWrap .ntw{visibility:hidden}
html[data-ui="excel"][data-xl-unpinned].xl-editing.xl-rb-open[data-xl-tab="home"] #sheetWrap .ntw{visibility:visible;z-index:46;box-shadow:0 8px 24px rgba(0,0,0,.14)}
html[data-ui="excel"][data-xl-unpinned] .wb-fx{margin-top:4px}
.xl-ribbon{position:sticky}
html[data-ui="excel"] .xl-ribbon{padding-right:34px}   /* room for the pin button, pinned or dropped down (unpinned): it must stay clickable to pin again */

/* ---- Excel mode, a Word sheet: the entries above the letter, compact ---- */
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel{gap:6px;padding:6px;margin-bottom:10px;font-size:12px}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel>*{flex:1 1 240px;max-height:170px;overflow:auto;padding:5px 8px!important;font-size:12px}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel table td,html[data-ui="excel"][data-doc] #sheetWrap .lt-panel table th{padding:2px 6px!important;font-size:11.5px!important;line-height:1.3}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel button,html[data-ui="excel"][data-doc] #sheetWrap .lt-panel .btn{padding:1px 8px!important;font-size:11.5px!important;min-height:0}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel summary{font-size:12.5px}
html[data-ui="excel"][data-doc] #sheetWrap .lt-panel small,html[data-ui="excel"][data-doc] #sheetWrap .lt-panel i{font-size:11px}
/* letters without the panel (tippani, minutes…): the entries above the page, tighter */
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen,html[data-ui="excel"][data-doc] #sheetWrap .sheet>.lset.screen,html[data-ui="excel"][data-doc] #sheetWrap .sheet>.askbox{margin:0 0 6px!important;padding:5px 10px!important;font-size:12px}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen .tp-row{margin:2px 0;font-size:12px}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen i,html[data-ui="excel"][data-doc] #sheetWrap .sheet>.hint,html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen .hint{font-size:11px;line-height:1.35;margin:2px 0}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen *:not(table):not(tr):not(td):not(th){margin-top:0;margin-bottom:0}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen{line-height:1.35}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen .tp-row{display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px;padding:2px 0}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen br{display:none}
html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen input,html[data-ui="excel"][data-doc] #sheetWrap .sheet>.tools.screen select{height:24px;font-size:12px}

/* ---- Excel mode: the ribbon, more inviting — each group in a shade of the brand colour: the icons on soft tinted
   rounded tiles, the group's name in that shade; the Menu tab holds every place of the side menu ---- */
.xl-g{--tone:var(--n-600,#0b3a82)}
/* shades of the brand navy and blue only (not a rainbow): one shade per kind of group */
.xl-g[data-tone="blue"]{--tone:var(--n-600,#0b3a82)}.xl-g[data-tone="indigo"]{--tone:var(--n-500,#2b6cb0)}.xl-g[data-tone="teal"]{--tone:#1d4f91}
.xl-g[data-tone="purple"]{--tone:#3a6db5}.xl-g[data-tone="amber"]{--tone:var(--n-700,#072a60)}.xl-g[data-tone="orange"]{--tone:var(--n-600,#0b3a82)}
.xl-g[data-tone="green"]{--tone:var(--n-500,#2b6cb0)}.xl-g[data-tone="brown"]{--tone:#1d4f91}.xl-g[data-tone="slate"]{--tone:#5b6b82}
.xl-b>button svg,.xl-b>a svg{box-sizing:content-box;width:17px;height:17px;padding:4px;border-radius:var(--r-md);color:var(--tone)!important;
  background:color-mix(in srgb,var(--tone) 11%,#fff);transition:background .15s,transform .15s}
.xl-b>button:hover:not(:disabled) svg,.xl-b>a:hover svg{background:color-mix(in srgb,var(--tone) 20%,#fff);transform:translateY(-1px)}
.xl-b>button:hover:not(:disabled),.xl-b>a:hover{background:color-mix(in srgb,var(--tone) 6%,#fff)!important;border-color:transparent!important}
.xl-b>a.on,.xl-entry .xl-b>a.on{background:color-mix(in srgb,var(--tone) 10%,#fff)!important;border-color:color-mix(in srgb,var(--tone) 30%,#fff)!important;color:var(--tone)}
.xl-b>a.on svg{background:var(--tone);color:#fff!important}
.xl-g>small{color:color-mix(in srgb,var(--tone) 70%,#444);font-weight:600;letter-spacing:.2px}
.xl-g{border-right-color:color-mix(in srgb,var(--tone) 14%,#e6e6e6)}
.xl-b>button[data-xl="zoomIn"] svg,.xl-b>button[data-xl="zoomOut"] svg{display:none}
.xl-zoom .xl-b>button{color:var(--tone)}
.xl-ribbon{background:linear-gradient(180deg,#fff,#fbfcfe)}
.xl-tabs>button[data-xl-tab="menu"]{color:var(--n-600,#0b3a82)}
html.dark .xl-b>button svg,html.dark .xl-b>a svg{background:color-mix(in srgb,var(--tone) 22%,#252525)}
html.dark .xl-ribbon{background:#252525}

/* File ▸ Print (excel.js): the settings on the left, the printed pages on the right, as in Excel */
.xl-pr{position:fixed;inset:0;z-index:80;display:grid;grid-template-columns:340px minmax(0,1fr);background:#fff;color:#1f1f1f;font:13px var(--f-ui);opacity:0;transform:translateX(-16px);transition:opacity .2s,transform .2s}
.xl-pr.on{opacity:1;transform:none}
html.dark .xl-pr{background:#212121;color:#e6e9ef}
.xl-pr-side{overflow:auto;padding:18px 22px 22px;border-right:1px solid #e1e1e1;background:#f8f8f8}
html.dark .xl-pr-side{background:#1b1b1b;border-color:#2e2e2e}
.xl-pr-back{display:grid;place-items:center;width:34px;height:34px;border:1px solid #c8c8c8;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
.xl-pr-back:hover{background:#e8e8e8}
.xl-pr-back svg{width:18px;height:18px}
.xl-pr h1{font:300 28px var(--f-ui);margin:14px 0 14px}
.xl-pr h2{font-size:15px;font-weight:600;margin:18px 0 8px}
.xl-pr-top{display:flex;gap:10px}
.xl-pr-go,.xl-pr-pdf{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100px;height:96px;border:1px solid #c8c8c8;border-radius:var(--r-xs);background:#fff;color:inherit;cursor:pointer;text-decoration:none;font-size:13px}
.xl-pr-go svg,.xl-pr-pdf svg{width:30px;height:30px}
.xl-pr-go:hover,.xl-pr-pdf:hover{background:#e7f2ec;border-color:#217346}
html.dark .xl-pr-go,html.dark .xl-pr-pdf{background:#262626;border-color:#3c3c3c}
.xl-pr-sel{display:flex;align-items:stretch;margin:0 0 6px;border:1px solid #c8c8c8;border-radius:var(--r-xs);background:#fff;min-height:48px}
html.dark .xl-pr-sel{background:#262626;border-color:#3c3c3c}
.xl-pr-sel:hover{border-color:#217346}
.xl-pr-sel .i{display:grid;place-items:center;width:44px;flex:none;border-right:1px solid #ececec;color:#444}
html.dark .xl-pr-sel .i{border-color:#333333;color:#c9d1e0}
.xl-pr-sel .i svg{width:22px;height:22px}
.xl-pr-sel select{flex:1;min-width:0;border:0;background:transparent;color:inherit;font:inherit;padding:0 8px;cursor:pointer;white-space:normal}
.xl-pr-pages{display:flex;align-items:center;gap:6px;margin:4px 0 8px}
.xl-pr-pages input{width:64px;border:1px solid #c8c8c8;border-radius:var(--r-xs);padding:3px 6px;font:inherit;background:#fff;color:inherit}
.xl-pr-pages small{color:#777}
.xl-pr-scope{display:flex;align-items:center;gap:4px;margin:10px 0 4px}
.xl-pr-scope span{margin-right:4px;color:#555}
.xl-pr-scope button{border:1px solid #c8c8c8;background:#fff;color:inherit;border-radius:var(--r-xs);padding:3px 10px;cursor:pointer;font:inherit}
.xl-pr-scope button[aria-pressed="true"]{background:#217346;color:#fff;border-color:#217346}
.xl-pr-link{display:block;text-align:right;color:#217346;margin-top:6px}
.xl-pr-msg{min-height:1.2em;color:#a15c00;font-size:12px}
.xl-pr-main{position:relative;display:flex;flex-direction:column;background:#e9ebee;min-width:0}
html.dark .xl-pr-main{background:#161616}
.xl-pr-main iframe{flex:1;width:100%;border:0;background:#e9ebee}
.xl-pr-foot{display:flex;align-items:center;justify-content:center;gap:8px;height:34px;border-top:1px solid #d6d6d6;color:#555;font-size:12.5px;background:#f3f3f3}
@media (max-width:820px){.xl-pr{grid-template-columns:1fr;grid-template-rows:auto 1fr}.xl-pr-side{border-right:0;border-bottom:1px solid #e1e1e1;max-height:55vh}}

/* UX-054 — dark Excel mode: the sheet tabs, the ribbon, the status bar, the start page and the backstage on the dark
   tokens of Excel mode (--bg #1b1b1b, --paper #242424, --line #3a3a3a, --ink, --muted), not the grey-blue of another palette */
html.dark[data-ui="excel"] .xl-ribbon,html.dark[data-ui="excel"] .xl-status,html.dark[data-ui="excel"] .wb-tabs,
html.dark[data-ui="excel"] .xs-side,html.dark[data-ui="excel"] .xs-th,html.dark[data-ui="excel"] .xs-find{background:var(--paper);border-color:var(--line);color:var(--ink)}
html.dark[data-ui="excel"] .xs,html.dark[data-ui="excel"] .xl-bs,html.dark[data-ui="excel"] .xl-tabs{background:var(--bg);color:var(--ink)}
html.dark[data-ui="excel"] .xl-g,html.dark[data-ui="excel"] .xs-list th,html.dark[data-ui="excel"] .xs-list td,html.dark[data-ui="excel"] .xs-more{border-color:var(--line)}
html.dark[data-ui="excel"] .xl-g>small,html.dark[data-ui="excel"] .xl-status .xl-mut,html.dark[data-ui="excel"] .xs-list small,html.dark[data-ui="excel"] .xs-tile b span{color:var(--muted)}
html.dark[data-ui="excel"] .xs-side a:hover,html.dark[data-ui="excel"] .xs-side button:hover,html.dark[data-ui="excel"] .xs-side a.on,html.dark[data-ui="excel"] .xs-list tbody tr:hover td{background:#2e2e2e}
html.dark[data-ui="excel"] .wb-tab{background:transparent;color:var(--ink);border-color:var(--line)}
html.dark[data-ui="excel"] .wb-tab:hover{background:#2e2e2e}
html.dark[data-ui="excel"] .wb-tab.on{background:var(--bg);color:#9cc2ff;box-shadow:inset 0 -3px 0 #9cc2ff;border-color:var(--line)}
html.dark[data-ui="excel"] .wb-fx,html.dark[data-ui="excel"] .wb-fxn,html.dark[data-ui="excel"] .xl-sel select{background:var(--paper);border-color:#555;color:var(--ink)}
html.dark[data-ui="excel"] .wb-area{background:var(--bg)}
html.dark[data-ui="excel"] .xl-b>button svg,html.dark[data-ui="excel"] .xl-b>a svg{background:color-mix(in srgb,var(--tone) 22%,#242424)}
