/* First layer wins important declarations over legacy raised controls.
   Keep measurement/canvas tool geometry and PDF templates unchanged. */
@layer mustinSurface {
html body.baudoku-ui .topbar :is(button,a.button,a),
html body.baudoku-ui .office :is(button,a.button){
  background:#fff!important;color:#17283c!important;border:1px solid #c9d4df!important;
  box-shadow:none!important;border-radius:10px!important;transform:none!important;
  text-decoration:none;min-height:46px;padding:11px 17px;line-height:1.35;
  font-weight:650;transition:background-color .15s,border-color .15s;
}
html body.baudoku-ui .office :is(button.button-primary,a.button-primary){
  background:#c8102e!important;color:#fff!important;border-color:#c8102e!important;
}
html body.baudoku-ui .topbar .brand{border:0!important;padding:0!important;background:transparent!important;}
html body.baudoku-ui .topbar nav a:hover,
html body.baudoku-ui .office :is(button,a.button):hover{border-color:#17283c!important;}
html body.baudoku-ui .office .button-primary:hover{background:#a90e28!important;color:#fff!important;}
html body.baudoku-ui .office button:disabled{opacity:.55;cursor:wait;}
html body.baudoku-ui :is(.topbar,.office) :focus-visible{outline:3px solid #2575ad!important;outline-offset:3px;}
}
body.office-shell{background:#f2f5f8;color:#17283c;}
body.office-shell .page{max-width:1240px;padding:28px 24px 48px;margin:auto;}
body.office-shell .topbar{border-bottom:1px solid #dae2ea;box-shadow:none;}
.office .office-intro,.office .office-meta{color:#52647b;line-height:1.6;}
.office .office-intro{max-width:760px;margin:0 0 24px;}
.office .office-meta{font-size:14px;margin-top:auto;}
.office .office-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px;}
.office .office-person h2 a{color:inherit;text-decoration:none;}
.office .office-person{border-top:3px solid #17283c;}
.office .office-card{box-shadow:none;margin-bottom:0;}
.office>section.office-card{margin-bottom:24px;}
.office .office-grid{align-items:stretch;gap:20px;}
.office .office-card p{line-height:1.6;}
.office .office-notice{border-left:4px solid #178064;padding:16px 20px;background:#eef7f3;border-radius:8px;margin-bottom:24px;}
.office .office-notice p{margin-bottom:0;}
.office .connection-card{display:flex;flex-direction:column;gap:12px;}
.office .connection-card h3{font-size:21px;margin:0;}
.office .connection-card p{margin:0;}
.office .connection-status{align-self:flex-start;border-radius:7px;padding:7px 11px;font-size:14px;font-weight:700;background:#edf1f5;color:#415269;}
.office .status-ok{background:#e8f5ef;color:#116346;}
.office .status-error{background:#fdecef;color:#a20e29;}
.office :is(.status-limited,.status-stale){background:#fff3dd;color:#79500c;}
.office #connections{scroll-margin-top:20px;}
.office .office-tabs a{box-shadow:none;}
.office .office-tabs a[aria-current]{background:#17283c;color:#fff;border-color:#17283c;}
.office #id_projects{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;}
.office #id_projects label{padding:12px;background:#f4f7fa;border-radius:8px;margin:0;font-weight:500;}
.office #id_projects input{width:20px;height:20px;vertical-align:middle;margin-right:8px;}
@media(max-width:600px){body.office-shell .page{padding:20px 14px 32px}.office .office-actions a{width:100%;text-align:center}.office .office-grid{gap:14px}.office #id_projects{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){body.baudoku-ui :is(.topbar,.office) *{transition:none!important;}}

.office .office-sections{display:flex;gap:8px;flex-wrap:wrap;padding:0 0 22px;margin-bottom:24px;border-bottom:1px solid #dce3eb;}
.office .office-sections a{display:flex;align-items:center;min-height:44px;padding:10px 13px;border-radius:8px;color:#334d65;text-decoration:none;background:#e8eef3;font-size:14px;font-weight:600;}
.office .office-sections a[aria-current]{background:#17283c;color:#fff;}
.office .office-sections a:hover{background:#dce5ed;color:#17283c;}
.office .office-open{color:#b2102c;font-weight:700;}
.office .office-tile{border-top:3px solid #17283c;}
@media(max-width:600px){.office .office-sections{gap:6px}.office .office-sections a{flex:1 1 45%;font-size:13px}}
@layer mustinSurface {
html body.baudoku-ui header.topbar{height:auto!important;min-height:76px;gap:18px;}
html body.baudoku-ui header.topbar a.brand{flex:0 0 auto!important;min-width:210px!important;min-height:0!important;border:0!important;box-shadow:none!important;}
@media(max-width:1600px){
html body.baudoku-ui header.topbar{display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;padding:14px 24px!important;position:static!important;}
html body.baudoku-ui .topbar .mobile-menu-button{display:inline-flex!important;align-items:center;justify-content:center;}
html body.baudoku-ui .topbar #main-navigation{display:none!important;grid-column:1/-1;width:100%;}
html body.baudoku-ui .topbar #main-navigation.is-open{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;}
html body.baudoku-ui .topbar #main-navigation>a,html body.baudoku-ui .topbar #main-navigation form{min-width:0!important;margin:0;}
html body.baudoku-ui .topbar #main-navigation a,html body.baudoku-ui .topbar #main-navigation button{display:flex!important;justify-content:center;align-items:center;font-size:14px!important;white-space:normal!important;width:100%;}
html body.baudoku-ui .topbar #main-navigation a:after{content:none!important;}
}
@media(max-width:600px){html body.baudoku-ui header.topbar{padding:12px 14px!important;gap:10px;}html body.baudoku-ui header.topbar a.brand{min-width:0!important;}html body.baudoku-ui .topbar #main-navigation.is-open{grid-template-columns:1fr 1fr;}}
}

.office input[type=checkbox]{width:20px;min-height:20px;height:20px;flex:0 0 20px;accent-color:#17283c;}
.office .office-toggle{display:flex;flex-direction:row;gap:12px;align-items:center;min-height:46px;}
.office .office-tabs{align-items:stretch;}
.office .office-tabs a{display:flex;align-items:center;justify-content:center;}

/* The current module stays recognizable both in the open menu and below it. */
.nav-location{display:flex;align-items:center;gap:10px;padding:8px max(24px,calc((100vw - 1200px)/2));background:#e8eef4;border-bottom:1px solid #d3dde8;color:#17283c;font-size:14px;line-height:1.4}
.nav-location span{color:#52647b}
.nav-location strong{font-weight:750}
@media(max-width:600px){.nav-location{padding:8px 14px;gap:7px;font-size:13px;flex-wrap:wrap}}
@layer mustinSurface {
html body.baudoku-ui .topbar #main-navigation a[aria-current="page"]{background:#17283c!important;color:#fff!important;border-color:#17283c!important;box-shadow:inset 0 0 0 2px #7694b3!important;transform:none!important;font-weight:800!important;}
html body.baudoku-ui .topbar #main-navigation a[aria-current="page"]::after{content:'✓'!important;position:static!important;color:#fff!important;margin-left:8px;font-size:13px!important;}
}

.project-picker-tools{padding:14px;background:#f4f7fa;border-radius:10px;margin:12px 0}.project-picker-tools[hidden],.project-picker-empty[hidden],.office #id_projects>div[hidden]{display:none!important}.project-picker-count{color:#52647b;font-size:14px}.project-picker-empty{padding:14px;background:#fff3dd;border-radius:8px}.office .connection-help{margin-bottom:0}.office .connection-help p{margin:14px 0}.office .connection-help a{display:inline-flex;margin:8px 0}.office .connection-help summary{font-weight:600}
