/* Requested site-wide corner mark. Empty flex space preserves existing header/nav flow. */
body > .header.wrap::before,.shell > aside::before{content:"";display:block;width:105px;height:40px;flex:0 0 105px}
body > .header.wrap > .brand,.shell > aside > .brand{position:absolute;left:6px;top:6px;margin:0}
body > .header.wrap > .brand:focus-visible,.shell > aside > .brand:focus-visible{outline-offset:2px}
@media(max-width:760px){body > .header.wrap::before{width:83px;height:32px;flex-basis:83px}}
@media(max-width:600px){.shell > aside::before{width:83px;height:32px;flex-basis:83px}}

/* Use the accepted workspace corner placement after chat starts as well. */
body.vi1-layout.vi1-chat-started .topbar{padding-left:6px}
body.vi1-layout.vi1-chat-started .topbar > .workspace-heading{position:relative;top:-16px;gap:6px}
body.vi1-layout .topbar .brand:focus-visible{outline-offset:2px}
@media(min-width:801px){
 body.vi1-layout.vi1-chat-started #vi1-sidebar-toggle{position:fixed;z-index:67;left:calc(var(--vi1-sidebar-width) - 38px);top:6px}
 body.vi1-layout.vi1-chat-started:not(.vi1-sidebar-open) .vi1-sidebar{padding-top:44px}
}
@media(max-width:800px){
 body.vi1-layout.vi1-sidebar-open.vi1-chat-started .topbar > .workspace-heading{padding-left:0;z-index:66}
 body.vi1-layout.vi1-sidebar-open.vi1-chat-started #vi1-sidebar-toggle{position:fixed;z-index:67;left:calc(min(276px,80vw) - 38px);top:6px}
}
@media(max-width:650px){body.vi1-layout.vi1-chat-started .topbar > .workspace-heading{top:-9px}}

/* Reuse the same flat map projection and opaque source mask for existing page birds. */
.vi1-map-birdmark{display:block;position:relative;isolation:isolate;overflow:visible;background:transparent}
.vi1-map-birdmark::before{content:"";position:absolute;width:172.50153497013932%;height:66.6276234392191%;left:-36.381636523000715%;top:37.18061227846516%;background:url('./assets/polar-world-map.svg') 0 0/100% 100% no-repeat;pointer-events:none;z-index:0}
.vi1-map-birdmark > img{display:block;position:relative;z-index:1;width:100%;height:100%;max-width:none;margin:0;object-fit:contain;mix-blend-mode:normal;-webkit-mask:url('./assets/bird-original-silhouette.svg') center/100% 100% no-repeat;mask:url('./assets/bird-original-silhouette.svg') center/100% 100% no-repeat}
.vi1-vault-birdmark{width:96px;height:96px;margin:0 auto 15px}

/* Owner request: one white sidebar corner row, using the existing mark and control.
   Its flow placeholder retains the header/hero height; mobile keeps it outside the inert drawer. */
body.vi1-layout{--vi1-corner-logo-width:105px;--vi1-corner-logo-height:40px}
body.vi1-layout .topbar::before{content:"";display:block;flex:0 0 var(--vi1-corner-logo-width);width:var(--vi1-corner-logo-width);height:var(--vi1-corner-logo-height)}
body.vi1-layout:not(.vi1-chat-started) .topbar>.workspace-heading,
body.vi1-layout.vi1-chat-started .topbar>.workspace-heading{position:fixed;left:6px;top:6px;display:grid;grid-template-columns:max-content 24px;grid-template-rows:var(--vi1-corner-logo-height) 24px;width:max-content;height:calc(var(--vi1-corner-logo-height) + 24px);min-width:0;gap:0;justify-content:start;padding:0;background:#fff;z-index:67}
body.vi1-layout .topbar>.workspace-heading>.brand{order:-1;grid-column:1;grid-row:1;align-self:start}
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-toggle{position:static;inset:auto;z-index:auto;margin:0;flex:none}
body.vi1-layout .vi1-sidebar-title{display:none}
@media(min-width:801px){
 body.vi1-layout:not(.vi1-sidebar-open):not(.vi1-chat-started) .vi1-sidebar,
 body.vi1-layout:not(.vi1-sidebar-open).vi1-chat-started .vi1-sidebar{padding-top:calc(var(--vi1-corner-logo-height) + 32px)}
}
@media(max-width:760px){body.vi1-layout{--vi1-corner-logo-width:83px;--vi1-corner-logo-height:32px}}

/* Compact corner actions retain the original New chat proxy and drawer control. */
body.vi1-layout .topbar>.workspace-heading>.brand img{width:60px;height:40px}
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-new,
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-toggle{display:inline-grid;place-items:center;flex:none;width:24px;height:24px;min-height:24px;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none;color:#647995;cursor:pointer}
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-new{grid-column:1;grid-row:2;justify-self:center}
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-toggle{grid-column:2;grid-row:2}
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-new:disabled{color:#929aaa;cursor:not-allowed}
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-new svg{width:19px;height:19px}
body.vi1-layout .topbar>.workspace-heading :is(#vi1-sidebar-new,#vi1-sidebar-toggle):not(:disabled):hover{background:transparent;color:#375f97}
body.vi1-layout .topbar>.workspace-heading :is(#vi1-sidebar-new,#vi1-sidebar-toggle):focus-visible{outline:2px solid #6587cb;outline-offset:1px}
@media(max-width:760px){body.vi1-layout .topbar>.workspace-heading>.brand img{width:48px;height:32px}}

/* Six-pixel gap between the plus and the sidebar control at both logo sizes. */
body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-toggle{margin-left:-12px}
@media(max-width:760px){body.vi1-layout .topbar>.workspace-heading #vi1-sidebar-toggle{margin-left:-6px}}

/* Quiet Vault link tucked into the top-right safe corner. */
body.vi1-layout .topbar>.vault-link{position:fixed;top:max(4px,env(safe-area-inset-top));right:max(6px,env(safe-area-inset-right));z-index:66;display:inline-flex;align-items:flex-start;justify-content:flex-end;min-width:32px;min-height:24px;padding:2px 0 0;margin:0;font-size:10px;line-height:1.2;font-weight:400;color:#8b9bb1;text-decoration:none}
body.vi1-layout .topbar>.vault-link:hover{color:#54749d}
body.vi1-layout .topbar>.vault-link:focus-visible{color:#54749d;outline:2px solid #6587cb;outline-offset:1px;border-radius:3px}

/* The full written brand uses the same small raised one as the logo. */
.vi1-full-name{white-space:nowrap}
.vi1-brand-one{font-size:.6em;line-height:0;vertical-align:super;margin-left:.03em}

/* Match the approved compact VI¹ mark on every existing page header and footer.
   Existing header placeholders retain navigation and page-content geometry. */
body > .header.wrap > .brand img,.shell > aside > .brand img,footer .footer-top .brand img{display:block;width:60px;height:40px;object-fit:contain}
@media(max-width:760px){body > .header.wrap > .brand img{width:48px;height:32px}}
@media(max-width:600px){.shell > aside > .brand img{width:48px;height:32px}}
