/* Shared header appearance only: program tools and event handlers stay local. */
body>header.form-unified-header{--fh-paper:#fff;--fh-ink:#343c43;--fh-muted:#77818a;--fh-line:#dfe4e8;box-sizing:border-box;min-height:52px;height:52px;border-bottom:1px solid var(--fh-line);background:var(--fh-paper);color:var(--fh-ink);box-shadow:none;align-items:center;font-family:Pretendard,sans-serif}
html[data-theme=dark] body>header.form-unified-header{--fh-paper:#202020;--fh-ink:#eee;--fh-muted:#aaa;--fh-line:#4f4f4f}
/* Match the analysis action row without changing editor layout or touch targets. */
body>header.form-unified-header{
 --fh-control-size:12px;--fh-control-height:30px;--fh-control-inset:7px;
 --fh-control-bg:#fff;--fh-control-ink:#30363b;--fh-control-line:#ddd;
 --fh-mode-active:#303030;--fh-mode-on-active:#fff;
}
html[data-theme=dark] body>header.form-unified-header{
 --fh-control-bg:#292929;--fh-control-ink:#e8e8e8;--fh-control-line:#454545;
 --fh-mode-active:#e5e5e5;--fh-mode-on-active:#151515;
}
body>header.form-unified-header :is(.system-brand,.brand.context-brand){box-sizing:border-box;display:grid!important;grid-template-columns:max-content max-content 1.5px minmax(0,1fr);align-items:center;column-gap:6px!important;width:260px;min-width:260px;height:52px;margin:0!important;padding:0 15px;letter-spacing:0;white-space:nowrap}
body>header.form-unified-header :is(.system-brand,.brand.context-brand) img,body>header.form-unified-header .workspace-brand img{display:block;width:auto!important;height:24px!important;aspect-ratio:627/762;object-fit:contain}
body>header.form-unified-header :is(.system-family,.brand-family),body>header.form-unified-header .workspace-brand span{font:500 13px/20px Pretendard,sans-serif!important;letter-spacing:0!important;color:var(--fh-ink)!important;text-decoration:none}
body>header.form-unified-header :is(.system-service,.brand-name){display:block;font:650 13.67px/20px Pretendard,sans-serif!important;color:var(--fh-ink)!important;margin:0!important;text-align:center;letter-spacing:0!important}
body>header.form-unified-header :is(.system-divider,.brand-divider){display:block!important;width:1.5px;height:12px;margin:0;background:var(--fh-line)}
body>header.form-unified-header .brand-service{display:flex;align-items:center;justify-content:center;text-decoration:none}
body>header.form-unified-header :is(.actions,.top-right,.header-actions){align-items:center;gap:4px}
body>header.form-unified-header .stage-top{display:flex;align-items:center;gap:4px;min-width:0}
body>header.form-unified-header .form-header-credit-balance{margin-inline-start:5px;color:inherit;font:700 var(--fh-control-size)/1 Pretendard,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
body.access-gate{margin:0}
body.access-gate>header.form-unified-header{justify-content:space-between;padding-inline-start:0}
body.access-gate>header.form-unified-header .header-actions{display:flex}
body>header.form-unified-header :is(button,.workspace-menu>summary,.cad-tool-menu>summary,.mw-home-link){box-sizing:border-box;align-items:center;justify-content:center;min-height:var(--fh-control-height);height:var(--fh-control-height);padding:0 var(--fh-control-inset);border:1px solid var(--fh-control-line);border-radius:2px;font:400 var(--fh-control-size)/1.35 Pretendard,sans-serif;letter-spacing:0;white-space:nowrap}
body>header.form-unified-header :is(.header-actions,.mw-header-right)>.stage-top>.form-account-button{
 display:inline-flex;align-items:center;justify-content:center;min-height:var(--fh-control-height);height:var(--fh-control-height);
 margin:0;padding:0 var(--fh-control-inset)!important;border:1px solid var(--fh-control-line)!important;border-radius:2px!important;
 background:var(--fh-control-bg)!important;color:var(--fh-control-ink)!important;box-shadow:none;
 font:400 var(--fh-control-size)/1.35 Pretendard,sans-serif!important;
}
body>header.form-unified-header :is(.wo-theme-switch,.theme-switch){
 --ui-field:var(--fh-control-bg);--ui-ink:var(--fh-control-ink);--ui-line:var(--fh-control-line);
 display:flex;align-items:center;gap:0;padding:0;margin:0;height:var(--fh-control-height);border:0;border-radius:2px;background:transparent
}
body>header.form-unified-header :is(.wo-theme-switch,.theme-switch) button{min-width:32px;min-height:var(--fh-control-height)!important;height:var(--fh-control-height)!important;padding:0 var(--fh-control-inset)!important;border:1px solid var(--fh-control-line)!important;border-radius:2px!important;background:var(--fh-control-bg)!important;color:var(--fh-control-ink)!important;font:400 var(--fh-control-size)/1.35 Pretendard,sans-serif!important}
body>header.form-unified-header :is(.wo-theme-switch,.theme-switch) button+button{margin-left:-1px}
:root body>header.form-unified-header :is(.wo-theme-switch,.theme-switch) button:is([aria-pressed=true],.active){
 --ui-field:var(--fh-mode-active);--ui-active:var(--fh-mode-active);--ui-ink:var(--fh-mode-on-active);--ui-line:var(--fh-mode-active);
 position:relative;z-index:1;background:var(--fh-mode-active)!important;color:var(--fh-mode-on-active)!important;border-color:var(--fh-mode-active)!important
}
body>header.form-unified-header .cad-workspace-tabs button{height:52px;border:0;border-bottom:2px solid transparent;background:transparent;border-radius:0;font-size:12px;font-weight:600}
body>header.form-unified-header .cad-workspace-tabs button[aria-selected=true]{border-bottom-color:var(--fh-ink)}
body>header.form-unified-header :is(button,summary,a):focus-visible{outline:2px solid var(--fh-ink);outline-offset:2px}
body.workspace-system.form-tool-workspace>header.form-unified-header,body.workspace-system.folder-system>header.form-unified-header{padding-left:0}
@media(min-width:901px){body.workspace-system.form-tool-workspace.is-model>header.form-unified-header .system-brand{width:260px;min-width:0;margin-left:0!important}}
@media(max-width:900px){body>header.form-unified-header{height:auto;min-height:52px;flex-wrap:wrap;row-gap:6px;padding-block:6px}body>header.form-unified-header :is(.system-brand,.brand.context-brand){height:40px}body>header.form-unified-header .top-right{flex-wrap:wrap;margin-left:auto}body>header.form-unified-header .cad-workspace-tabs{flex-wrap:wrap}body>header.form-unified-header .cad-workspace-tabs button{height:30px}}
@media(max-width:600px){body>header.form-unified-header :is(.system-brand,.brand.context-brand){width:260px;min-width:0;max-width:100%}body>header.form-unified-header .brand-family{display:block!important}body>header.form-unified-header .top-right .safe{display:none}}

body>header.form-unified-header [hidden]{display:none!important}
body>header.form-unified-header :is(button,.workspace-menu>summary){background:var(--fh-paper);color:var(--fh-ink)}
body>header.form-unified-header :is(.system-brand,.brand.context-brand) img{filter:none!important;opacity:1}
html[data-theme=dark] body>header.form-unified-header :is(.system-brand,.brand.context-brand) img{filter:brightness(0) invert(1)!important}
body>header.form-unified-header .cad-workspace-tabs button{color:var(--fh-muted)}
body>header.form-unified-header .cad-workspace-tabs button[aria-selected=true]{color:var(--fh-ink)}
body>header.form-unified-header :is(.system-family,.brand-family){display:block!important}
body>header.form-unified-header :is(.system-brand,.brand.context-brand){grid-template-columns:max-content max-content 1.5px minmax(0,1fr)!important}
@media(max-width:900px){
 body>header.form-unified-header{display:flex!important;width:100%;max-width:100vw;min-width:0;height:auto!important;flex-wrap:wrap!important;overflow:visible;padding:6px 8px!important;gap:6px}
 body>header.form-unified-header :is(.system-brand,.brand.context-brand){flex:0 0 260px;min-width:0;width:260px;height:34px;padding:0 7px}
 body>header.form-unified-header :is(.actions,.top-right,.header-actions,.header-work-actions,.header-center){min-width:0;max-width:100%;flex-wrap:wrap;margin-left:auto}
 body>header.form-unified-header .cad-workspace-tabs{min-width:0;max-width:100%;padding:0;flex-wrap:wrap}
 body>header.form-unified-header .header-rule{display:none}
 body>header.form-unified-header #saveStatus{display:none}
}

/* Shared family | service signature across program workspaces. */
body>header.form-unified-header .mw-brand{display:flex;align-items:center;gap:6px}
body>header.form-unified-header .mw-brand>a{display:flex;align-items:center;gap:6px;text-decoration:none;color:inherit}
body>header.form-unified-header .mw-brand img{height:24px;width:auto}
body>header.form-unified-header .mw-brand-divider{display:block;width:1.5px;height:12px;background:var(--fh-line)}
body>header.form-unified-header .mw-brand-service{font-size:13px;font-weight:650}

body.workspace-system>header.form-unified-header :is(.system-brand,.brand.context-brand){grid-template-columns:max-content max-content 1.5px minmax(0,1fr)!important}

body.workspace-system>header.form-unified-header :is(.system-brand,.brand.context-brand) :is(.system-divider,.brand-divider){display:block!important}
