/* One estate shell (Owner, 18 Oct 2026). Values taken from the Search Desk rail the Owner approved (web/shell.js with
   edge.css), reconciled to handover/GEOMETRY-CONTRACT.md: 52 px thin rail, 248 px sidebar, 44 px rows, rounded everywhere, words and lines, no cards. */
:root{--es-font:-apple-system,system-ui,"SF Pro Display","SF Pro Text","Segoe UI",sans-serif;--es-ink:#041019;--es-ink2:#3d5566;--es-bg:#fff;
  --es-line:#c8e9f5;--es-line2:rgba(0,143,199,.4);--es-acc:#008fc7;--es-soft:#bdeeff;--es-field:#f4fcff;--es-foot:#effaff;--es-hover:#e6f7fd;--es-scrim:rgba(0,56,79,.45)}
:root:is([data-look="dark"],[data-look="electric"],[data-theme="dark"],[data-theme="rail"],[data-theme="electric"]){--es-ink:#eafdff;--es-ink2:#9cc3d6;--es-bg:#0b1d2a;
  --es-line:#1d4257;--es-line2:rgba(99,222,255,.35);--es-acc:#63deff;--es-soft:#123a52;--es-field:#0f2737;--es-foot:#0d2230;--es-hover:#143246;--es-scrim:rgba(0,10,18,.55)}

#es-rail{position:fixed;inset:0 auto 0 0;z-index:70;width:var(--g-rail,52px);box-sizing:border-box;display:flex;flex-direction:column;gap:3px;padding:12px 4px;
  background:var(--es-bg);color:var(--es-ink);border-right:1px solid var(--es-line);font:400 17px/1.52 var(--es-font);
  box-shadow:none;transition:width .22s;overflow:hidden}
#es-rail *{box-sizing:border-box}
#es-rail .ji{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
#es-rail .es-id{display:flex;align-items:center;justify-content:center;min-height:46px}
#es-rail .es-ib{display:grid;place-items:center;width:var(--g-ctl,40px);height:var(--g-ctl,40px);flex:none;border-radius:50%;border:1px solid transparent;background:transparent;color:var(--es-ink);cursor:pointer;padding:0}
#es-rail .es-expand{background:var(--es-soft)}
#es-rail .es-collapse,#es-rail .es-org,#es-rail .es-smart-head,#es-rail .es-row.es-tree,#es-rail .es-space,#es-rail .es-foot{display:none}
#es-rail .es-nav{display:flex;flex-direction:column;gap:2px;margin-top:10px;padding:2px 0 6px;overflow-y:auto;overflow-x:hidden;flex:1;min-height:0;scrollbar-width:none}
#es-rail .es-smart{margin:4px 0 8px;padding-bottom:8px;border-bottom:1px solid var(--es-line2)}
#es-rail .es-row{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:44px;padding:10px 0;border:1px solid transparent;border-radius:8px;
  background:transparent;color:var(--es-ink);text-decoration:none;font:600 16.5px/1.52 var(--es-font);cursor:pointer;white-space:nowrap}
#es-rail .es-row span{display:none;overflow:hidden;text-overflow:ellipsis;flex:1;text-align:left}
#es-rail .es-row:hover{background:var(--es-hover)}
#es-rail .es-row[aria-current]{border-color:var(--es-line2);font-weight:640}
#es-rail :focus-visible{outline:2px solid var(--es-acc);outline-offset:1px}

html.es-open #es-rail{width:min(var(--g-side,248px),calc(100vw - 32px));padding:14px 16px;box-shadow:none}
html.es-open #es-rail .es-id{justify-content:flex-start}
html.es-open #es-rail .es-expand{display:none}
html.es-open #es-rail .es-collapse{display:grid}
html.es-open #es-rail .es-org{display:flex;align-items:center;gap:10px;min-height:48px;margin:12px 0 4px;padding:6px 16px 6px 10px;border:1px solid var(--es-line2);border-radius:999px;
  color:var(--es-ink);text-decoration:none;font:600 16px/1.52 var(--es-font)}
html.es-open #es-rail .es-smart-head{display:flex;align-items:center;min-height:44px;margin:2px 8px 4px;font:700 12px/1.52 var(--es-font);letter-spacing:.06em;text-transform:uppercase}
html.es-open #es-rail .es-row{justify-content:flex-start;padding:8px 9px 8px 10px}
html.es-open #es-rail .es-row span{display:block}
html.es-open #es-rail .es-row.es-tree{display:flex;font-weight:450}
html.es-open #es-rail .es-chev{margin-left:auto}
html.es-open #es-rail .es-space{display:block;margin:8px 10px 4px;font:700 13px/1.52 var(--es-font);letter-spacing:.08em;text-transform:uppercase}
html.es-open #es-rail .es-foot{display:flex;gap:8px;padding:12px 0 0;margin:0 -16px -14px;padding:10px 16px 14px;background:var(--es-foot);border-top:1px solid var(--es-line)}
#es-rail .es-ctl{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--es-acc);background:var(--es-field);color:var(--es-ink);cursor:pointer;padding:0}
#es-rail .es-ctl .ji{width:16px;height:16px;stroke-width:1.8}
#es-rail .es-ctl[aria-pressed="true"]{background:var(--es-soft)}
#es-scrim{position:fixed;inset:0;z-index:69;background:transparent}
#es-scrim[hidden]{display:none}

/* The one control set, top right of every page: 40 px rounded, word and icon, the J logo on Open JudeAI. */
.es-ctls{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none}
.es-c{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--es-line);background:var(--es-field);
  color:var(--es-ink);font:600 14px/1 var(--es-font);text-decoration:none;cursor:pointer;white-space:nowrap;box-sizing:border-box}
.es-c:hover{border-color:var(--es-acc)}
.es-c .ji{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.es-c img{width:26px;height:26px;border-radius:8px;margin-left:-8px}
.es-c[aria-pressed="true"]{background:var(--es-soft);border-color:var(--es-acc)}
.es-hidden{display:none!important}
.es-menu{display:none}
body.es-pv main :is(td,p,li,dd,.body,.pv,.sj,.who){-webkit-text-security:disc}

/* Room for the rail: each page family keeps its own grid, the retained hidden rail track and mounted rail share the contract 52 px band. */
@media (min-width:901px){
  html.es-on[data-es-kind="page"] body,html.es-on[data-es-kind="mail"] body{padding-left:var(--g-rail,52px);box-sizing:border-box}
  html.es-on[data-es-kind="eshell"]{--e-rail-w:var(--g-rail,52px)}
  html.es-on .e-shell{width:100%}
  html.es-on .e-shell>.e-rail{visibility:hidden}
  html.es-on .ws{margin-left:0;width:100%}
  html.es-on .ws>nav.rail{visibility:hidden}
}
@media (max-width:900px){
  #es-rail{transform:translateX(-105%);transition:transform .2s;width:min(var(--g-side,248px),calc(100vw - 32px));padding:14px 16px}
  html.es-open #es-rail{transform:none}
  html.es-open #es-scrim{background:var(--es-scrim)}
  .es-menu{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--es-line);background:var(--es-field);color:var(--es-ink);flex:none;padding:0;cursor:pointer}
  .es-menu .ji{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
  .es-c span{display:none}.es-c{width:40px;padding:0;justify-content:center}.es-c img{margin:0}
  html.es-on .ws>nav.rail,html.es-on .e-shell>.e-rail{display:none}
  html.es-on .ws{grid-template-columns:minmax(0,1fr);grid-template-rows:1fr}
  html.es-on .e-shell{grid-template-columns:minmax(0,1fr)!important}
}
@media (max-width:520px){.es-c-help,.es-c-privacy{display:none}.es-ctls{gap:6px}}
/* A page with its own phone menu (Mail's folders) keeps it; the places are one tap away in its sidebar. */
@media (max-width:900px){html[data-es-kind="mail"] .es-menu{display:none}}

/* The kit pages (Search Desk and the admin sections) draw the same set from shell.js: same words, same shape, no box around it. */
#estate-quick-tools.es-ctls{border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;padding:0;gap:8px}
#estate-quick-tools .estate-quick-tool.es-c{min-width:0;min-height:40px;height:40px;padding:0 14px;gap:8px;border:1px solid var(--es-line);border-radius:999px;background:var(--es-field);color:var(--es-ink);font:600 14px/1 var(--es-font)}
#estate-quick-tools .estate-quick-tool.es-c:hover{background:var(--es-field);border-color:var(--es-acc)}
#estate-quick-tools .estate-quick-tool.es-c[aria-pressed="true"]{background:var(--es-soft);border-color:var(--es-acc)}
@media (max-width:620px){#estate-quick-tools .estate-quick-tool.es-c{width:40px;padding:0;justify-content:center}#estate-quick-tools .es-c img{margin:0}}

/* A no-sidebar service must not retain its hidden rail track on phones/tablets. */
@media (max-width:900px){html.es-on[data-es-kind="eshell"] .e-shell.no-side{grid-template-columns:minmax(0,1fr)!important}}

/* The Apps header is in normal flow; its former floating-header clearance is obsolete. */
@media(max-width:900px){html.es-on .ws>.work.pt-main{padding-top:0!important}html.es-on .work.pt-apps .pa-wrap{padding-top:24px!important}}

/* Proportion lock, every page (Owner, 19 Oct 2026: "i can see its squashed which means you didnt apply the estate wide
   proportion locks that i asked for for all things"). A control never shrinks below its own size: in a crowded bar it folds
   to its 40 px round icon (the size of every shell control), and only page titles give up space (with an ellipsis). */
.appbar{container-type:inline-size;container-name:appbar}
.appbar>a,.appbar>button,.appbar>label,.appbar .r>*,.appbar .es-ctls,.appbar .es-ctls>*,.appbar .es-menu,.appbar .ib,.appbar .pill,
.ribbon button,.ribbon a,.ribbon label,#rcmds button,.rbtns button,.cmds .cmd{flex-shrink:0;white-space:nowrap}
.appbar .crumb-page,.appbar .pg,.appbar .pgn,.appbar .crumb>span,.appbar .t,.appbar #crumb{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.appbar .search{flex:0 1 360px!important;min-width:220px!important;max-width:560px}
@container appbar (max-width: 1320px){
  .appbar .search{flex:0 0 40px!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px;padding:0!important;justify-content:center;border-radius:999px;font-size:0}
  .appbar .search span,.appbar .search kbd,.appbar .search>input{display:none!important}
  .appbar .search svg{width:18px;height:18px;flex:0 0 18px}
  .appbar .search.ch-search-open{position:absolute;z-index:40;left:72px;right:12px;width:auto!important;min-width:0!important;max-width:none!important;padding:0 12px!important;justify-content:flex-start;border-radius:14px;font-size:inherit;background:var(--pane);box-shadow:0 14px 32px -20px rgba(0,0,0,.65)}
  .appbar .search.ch-search-open>input{display:block!important;min-width:0}
}
.appbar svg,.ribbon svg,#rcmds svg{flex-shrink:0}

/* Live flow render correction, 19 Oct 2026: fold crowded shared header controls
   without shrinking their targets; keep Finance home facts/actions inside their column. */
@container appbar (max-width:1320px){
  .appbar .es-ctls .es-c{width:40px;min-width:40px;padding:0;justify-content:center}
  .appbar .es-ctls .es-c span{display:none}
  .appbar .es-ctls .es-c img{margin:0}
}
#s-home #bcard .split{flex-wrap:wrap;row-gap:8px}
#s-home #bcard .split>div{max-width:100%;overflow-wrap:anywhere}
#s-home:has(#bcard) .verbs{flex-wrap:wrap;row-gap:12px}
@media(max-width:520px){
  #s-home #bcard .split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
  #s-home #bcard .split>div+div::before{content:none}
  #s-home:has(#bcard) .verbs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
  #s-home:has(#bcard) .verbs button{min-height:44px;justify-content:flex-start;white-space:normal;overflow-wrap:anywhere}
  #s-home:has(#bcard) .verbs button+button::before{content:none}
}

/* The Bank bar's auxiliary rule-date text must fold before its controls leave the viewport. */
.appbar .crumb{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis}
@container appbar (max-width:1000px){.e-top.appbar>.ex{display:none}}

/* Hidden legacy rails must not leave the main work in their 52px tablet grid column. */
@media(max-width:900px){html.es-on .ws{grid-template-columns:minmax(0,1fr)!important}}

/* Bound native directory controls to their wrapping form at narrow widths. */
#directory-search label{min-width:0;max-width:100%}
#directory-search input,#directory-search select{min-width:0;width:100%;box-sizing:border-box}

/* Estate geometry contract (Owner, 19 Oct 2026: "mathematically perfect and aligned and ratios perfect in all scenarios").
   Every number from handover/GEOMETRY-CONTRACT.md, taken from the approved Bank and shell sheets. One source for every host. */
:root{--g-unit:4px;--g-gutter:24px;--g-gap:8px;--g-group:16px;--g-section:24px;--g-top:60px;--g-rail:52px;--g-side:248px;--g-row:46px;--g-strip:28px;
  --g-ctl:40px;--g-ctl-pad:14px;--g-tap:44px;--g-icon:18px;--g-icon-rail:20px;--g-r:10px;--g-r-lg:16px;--g-r-pill:999px;
  --g-t1:46px;--g-t2:38px;--g-t3:28px;--g-t4:17px;--g-t5:14px;--g-t6:13px;--g-t7:12px;--g-t8:11px}
@media(max-width:600px){:root{--g-gutter:16px}}
/* Frame bands: one height for the bar on every page, controls centred on its middle line. */
header.appbar,.e-top.appbar,.ch-top,.pc-header,.topbar{min-height:var(--g-top)!important;height:var(--g-top)!important;box-sizing:border-box;display:flex;align-items:center}
.appbar>*,.e-top>*{align-self:center}
/* Boxed controls: 40 px tall, 14 px sides, contract radius; icon-only ones 40 × 40 round. */
.appbar .es-c,.appbar .search,.appbar .ib,.appbar .pill,.es-menu,#es-rail .es-ctl,.ribbon button,.ribbon a.btn,#rcmds button,.rbtns button,.cmds .cmd,
.e-top .appear,.e-top .who,button.cs-ib,button.jp-ib,button.pp-toggle,#pc-sidebar-toggle,#pc-rename,.pc-row-more,.pc-project-add{min-height:var(--g-ctl)!important;height:var(--g-ctl)!important;box-sizing:border-box}
button.cs-ib,button.jp-ib,button.pp-toggle,#pc-sidebar-toggle,#pc-rename,.pc-row-more,.pc-project-add,.e-top .appear{min-width:var(--g-ctl)!important;width:var(--g-ctl)!important;padding:0!important;display:inline-grid!important;place-items:center}
.appbar .es-c,.appbar .search,#estate-quick-tools .estate-quick-tool.es-c{padding-left:var(--g-ctl-pad)!important;padding-right:var(--g-ctl-pad)!important}
.appbar svg,.es-c .ji,.es-menu .ji,button.cs-ib svg,button.jp-ib svg,.e-top .appear svg,.e-top .appear i{width:var(--g-icon)!important;height:var(--g-icon)!important}
#es-rail .ji{width:var(--g-icon-rail);height:var(--g-icon-rail)}
/* Fields: 40 px, 12 px sides, square-cell radius. */
main input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),main select,.e-canvas input:not([type=checkbox]):not([type=radio]):not([type=range]),.e-canvas select,
form input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),form select{min-height:var(--g-ctl);height:var(--g-ctl);padding-left:12px;padding-right:12px;border-radius:var(--g-r);box-sizing:border-box;font-size:15px}
main textarea,form textarea{padding:10px 12px;border-radius:var(--g-r);box-sizing:border-box;font-size:15px}
/* Rows and the foot strip. */
main table tr,.e-canvas table tr,table.grid tr,.rows>li{min-height:var(--g-row)}
.status,#page-status,.foot-strip{min-height:var(--g-strip);height:var(--g-strip);box-sizing:border-box;display:flex;align-items:center}
/* Phone: every tap target 44 px, word controls included, without adding a box. */
@media(max-width:600px){main button,main a.btn,main [role=button],.verbs button,.ribbon button{min-height:var(--g-tap)}}
/* Radii: only the contract values. */
.es-c,.pill,.appbar .search{border-radius:var(--g-r-pill)!important}
.es-menu,#es-rail .es-ctl,#es-rail .es-ib,button.cs-ib,button.jp-ib,button.pp-toggle,.e-top .appear{border-radius:50%!important}
/* The bar is one 60 px row at every width (ws.css varies it 44/48/52/60 and lets it wrap to two rows on phones). */
.ws .appbar,.appbar,.e-top{flex-wrap:nowrap!important;padding-top:0!important;padding-bottom:0!important}
@media(max-width:600px){.appbar,.e-top{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding-left:var(--g-gutter)!important;padding-right:var(--g-gutter)!important}.appbar::-webkit-scrollbar{display:none}}
/* Type from the scale only: ws.css 13.5 px headings and crumb become 14 / 20. */
.appbar .crumb b,.pane .ph,h2.bh,h3.bh,.ph2,.bh,main h2:not([class]),main h3:not([class]){font-size:var(--g-t5)!important;line-height:20px!important}
/* Jude panel words and icons at the control size. */
button.eco-status,button.cw-goal-add,.cw-mode,.pp-pane button,.pt-c{min-height:var(--g-ctl)!important;height:var(--g-ctl)!important;box-sizing:border-box}
/* The wordmark and the bar's own controls never shrink; on a phone the bar scrolls sideways inside itself instead. */
.appbar>a.crumb,.appbar .crumb:has(img.wm),.e-top .word-home,.appbar img.wm{flex:0 0 auto!important;min-width:0}
.appbar img.wm{width:auto!important;max-width:170px!important;height:16px!important}

/* Phone rail controls retain their 44px touch target inside the 248px open frame. */
@media(max-width:600px){#es-rail :is(.es-ib,.es-ctl){width:var(--g-tap,44px)!important;height:var(--g-tap,44px)!important;min-height:var(--g-tap,44px)!important;flex:none}}

/* 320 px header (Raguel S3-PRD-A03, 20 Oct 2026): the control set and crumb fit a 320 px viewport. */
@media(max-width:360px){.appbar{padding:0 8px!important;gap:4px!important}.appbar .es-ctls{gap:4px!important}.appbar .es-ctls .es-c{width:36px!important;min-width:36px!important;height:36px!important}.appbar .crumb .wm{max-width:96px!important}.appbar .search{min-width:0!important;width:36px!important;max-width:36px!important;padding:0!important;justify-content:center!important}.appbar .search span{display:none!important}.appbar .r{gap:0!important}}

/* Geometry contract (W10 repeat 2, geometry, 20 Oct 2026): the compact search icon is not clipped (the control padding rule no longer pads the 40 px icon button); the wordmark link meets the 24 px target (WCAG 2.2 2.5.8); the model status line wraps instead of being cut at phone widths. */
@container appbar (max-width: 1320px){.appbar .search:not(.ch-search-open){padding-left:0!important;padding-right:0!important}}
.appbar>a.crumb,.appbar .crumb:has(img.wm){min-height:24px;display:inline-flex;align-items:center}
@media (max-width:400px){button.eco-status{white-space:normal!important;height:auto!important;min-height:var(--g-ctl)!important;text-overflow:clip!important;overflow:visible!important}}

/* Estate design family, flat, on every shell page (Owner, 20 Oct 2026: "fix everything"; R-INC-01). No shadows, text glows or
   blur; the Jude panel has no gradient; breadcrumb links are at least 24 px tall. Focus rings stay. */
html body *:not(:focus-visible), html body *::before, html body *::after { box-shadow: none !important; text-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
aside#jp, #jp.jp { background-image: none !important; }
a.crumb, .appbar .crumb a { min-height: 24px; display: inline-flex; align-items: center; }
main input[type=checkbox], main input[type=radio] { min-width: 24px; min-height: 24px; }   /* WCAG 2.5.8 target size (R-AUD-14) */
