/* R1.4 — Main website smoothness + readability only. Work Form never loads this. */
/* Replace the oversized route-covering shimmer with a single deliberate, static status. */
body #emdR1164RouteMask {
  background:var(--r113-main,var(--bg,#f5f8fc))!important;
  padding:clamp(14px,2vw,28px)!important;
  overflow:hidden!important;
  min-height:0!important;
  height:max(480px,calc(100dvh - var(--r1164-top,60px)))!important;
  pointer-events:none!important;
  contain:paint!important;
}
body #emdR1164RouteMask .r1164-shell {display:block!important;max-width:none!important;}
body #emdR1164RouteMask .r1164-loading {
  display:flex;align-items:center;gap:12px;max-width:560px;
  border:1px solid var(--r113-edge,var(--line,#d7e2eb));
  background:var(--r113-surface,var(--panel,#fff));
  border-radius:12px;padding:17px 19px;
  box-shadow:0 2px 12px rgba(10,30,55,.045);
}
body #emdR1164RouteMask .r1164-loading-dot {
  display:block;flex:0 0 13px;width:13px;height:13px;border-radius:50%;
  background:var(--accent,#167ac8);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent,#167ac8) 13%,transparent);
}
body #emdR1164RouteMask .r1164-label {color:var(--text,#182d40);font-size:14px;font-weight:750;}
body #emdR1164RouteMask .r1164-sub {color:var(--muted,#658095);font-size:12px;line-height:1.5;margin-top:3px;}
body #emdR1164RouteMask .r1164-bar {max-width:560px;height:2px;margin-top:8px;background:var(--r113-edge,var(--line));opacity:1;}
body #emdR1164RouteMask .r1164-block,
body #emdR1164RouteMask .r1164-grid,
body #emdR1164RouteMask .r1164-content {display:none!important;}
/* The Ocean Blue palette previously inherited WHITE header text from R11.3
   while R1 had turned the same header WHITE — the exact screenshot failure. */
body.r107-ui[data-theme="hybrid"] #mainShell .top {
  background:#fff!important;color:#203c57!important;border-bottom:1px solid #dce6f0!important;
}
body.r107-ui[data-theme="hybrid"] #mainShell .top :is(.title,small,.profile-copy b,.profile-caret) {
  color:#203c57!important;
}
body.r107-ui[data-theme="hybrid"] #mainShell .top :is(.btn,.freshness,.profile-chip) {
  background:#f7fbff!important;border-color:#d5e3f2!important;color:#173a60!important;
}
body.r107-ui[data-theme="hybrid"] #mainShell .top :is(.btn:hover,.profile-chip:hover) {
  background:#eaf3fd!important;
}
body.r107-ui[data-theme="hybrid"] #mainShell .top .btn.warn {
  background:#fff3df!important;border-color:#e5b97c!important;color:#80511b!important;
}
body.r107-ui[data-theme="hybrid"] #mainShell #mainNav .navbtn.active {color:#fff!important;}
/* One coherent interaction rhythm; no moving cards or fade-flashing regions. */
body.r107-ui #mainShell #content :is(.r5-card,.r4-kpi,.parity-kpi,.r5-kpi,.card,.kpi){
  transition:border-color 150ms ease,background-color 150ms ease!important;
}
body.r107-ui #mainShell #content :is(.r5-card,.r4-kpi,.parity-kpi,.r5-kpi,.card,.kpi):hover {
  transform:none!important;
}
body.r107-ui #mainShell #content :is(.r5-table,.r4-table,.table,.r79-table) {
  font-variant-numeric:tabular-nums;
}
body.r107-ui #mainShell #content :is(.r5-card,.card,.r4-kpi,.r5-kpi) {box-shadow:0 2px 10px rgba(10,33,57,.045)!important;}
/* The original map/KPI data read and all element handlers remain unchanged. */
body .emd-r14-preview-banner {
  display:block;background:#fff4d8;color:#65410e;border-bottom:1px solid #f0cc79;
  padding:9px 16px;font-size:12px;font-weight:650;line-height:1.5;
}
@media(max-width:800px){body #emdR1164RouteMask{padding:12px!important}body #emdR1164RouteMask .r1164-loading{padding:14px}}
@media(prefers-reduced-motion:reduce){body.r107-ui #mainShell #content *,body #emdR1164RouteMask *{animation:none!important;transition:none!important;}}

/* R1.4.1 - Explicit sidebar hover/keyboard-focus contrast in exactly three themes.
   Root cause: old R10.9 hover CSS enforces white labels while the updated
   Classic White theme paints a pale hover background. Keep existing nav DOM,
   click handlers, work-form theme and backend untouched. */
body.r107-ui[data-theme="light"] {
 --emd-sidebar-hover-bg:#e6f1ff;
 --emd-sidebar-hover-text:#15385c;
 --emd-sidebar-selected-bg:#eaf2fc;
 --emd-sidebar-selected-text:#173b61;
}
body.r107-ui[data-theme="hybrid"] {
 --emd-sidebar-hover-bg:#275584;
 --emd-sidebar-hover-text:#ffffff;
 --emd-sidebar-selected-bg:#225184;
 --emd-sidebar-selected-text:#ffffff;
}
body.r107-ui[data-theme="dark"] {
 --emd-sidebar-hover-bg:#214969;
 --emd-sidebar-hover-text:#f5faff;
 --emd-sidebar-selected-bg:#1c4268;
 --emd-sidebar-selected-text:#f5faff;
}
body.r107-ui #mainShell #sidebar #mainNav > button.navbtn:is(:hover,:focus-visible):not(.active):not([aria-current="page"]) {
 background:var(--emd-sidebar-hover-bg)!important;
 color:var(--emd-sidebar-hover-text)!important;
 border-color:transparent!important;
}
body.r107-ui #mainShell #sidebar #mainNav > button.navbtn:is(.active,[aria-current="page"]) {
 background:var(--emd-sidebar-selected-bg)!important;
 color:var(--emd-sidebar-selected-text)!important;
}
body.r107-ui #mainShell #sidebar #mainNav > button.navbtn:is(:hover,:focus-visible,.active,[aria-current="page"]) > span {
 color:inherit!important;
 opacity:1!important;
}
body.r107-ui #mainShell #sidebar #mainNav > button.navbtn:focus-visible {
 outline:2px solid var(--accent)!important;
 outline-offset:1px!important;
}
