/* v258: original logo and a strict black / orange / white screen palette.
   First named layer wins over all legacy important declarations. */
@layer heuer-brand, heuer-dark-accessibility;
@layer heuer-brand {
 @media screen {
  html[data-theme="dark"] {--green:#ff8500;--green-dark:#ff8500;--danger:#ff8500;--company-accent:#ff8500;--company-accent-ink:#000;--company-tint:#000;--app-bg:#000;--app-text:#fff;--app-muted:#fff;--app-line:#fff;--app-control:#000;--white:#000;--soft:#000;--ink:#fff;--muted:#fff;--line:#fff;color-scheme:dark}
  html[data-theme="dark"] body :is(div,section,article,aside,header,footer,nav,main,dialog,form,fieldset,details,summary,button,input,select,textarea,label,li,table,td,th) {background-color:#000!important;background-image:none!important;color:#fff!important;border-color:#fff!important;box-shadow:none!important}
  html[data-theme="dark"] body :is(span,p,a,strong,small,b,h1,h2,h3,h4,h5,h6,legend,output,time) {color:inherit!important;background-color:transparent!important;box-shadow:none!important}
  html[data-theme="dark"] body :is(button[aria-pressed="true"],button[aria-selected="true"],button.active,.primary-button,.today-add,.guided-next,#homeEnter,#createBackup,.choice input:checked + span,.segmented input:checked + span,.guided-progress .current,.guided-progress .done) {background:#ff8500!important;color:#000!important;border-color:#ff8500!important}
  html[data-theme="dark"] body :is(button[aria-pressed="true"],button[aria-selected="true"],button.active,.primary-button,.today-add,.guided-next,#homeEnter,#createBackup) :is(span,strong,small,svg) {background:transparent!important;color:#000!important;-webkit-text-fill-color:#000!important;stroke:currentColor!important}
  html[data-theme="dark"] body :is(.brand-logo,.startup-brand,.welcome-logo,.company-logo-choices img) {filter:none!important;background:#fff!important;mix-blend-mode:normal!important;opacity:1!important;border-radius:8px!important;padding:5px!important}
  html[data-theme="dark"] body :is(.calendar-work-half,.calendar-overtime-half,.month-calendar-day.has-entry,.category-calendar-day.has-entry,.category-calendar-day.has-overtime,.calendar-day.has-overtime,.category-calendar-day.has-work,.category-calendar-day.has-vacation,.category-calendar-day.has-sick,.entry-type-overtime,.type-overtime,.entry-type-sick,.type-sick,.entry-type-vacation,.type-vacation) {background:#000!important;color:#fff!important;border-color:#ff8500!important;box-shadow:inset 0 -3px #ff8500!important}
  html[data-theme="dark"] body :is(button,input,select,textarea):disabled {background:#000!important;color:#fff!important;border-color:#fff!important;opacity:.55!important}
  html[data-theme="dark"] body :is(input[type="checkbox"],input[type="radio"],progress) {accent-color:#ff8500!important}
  html[data-theme="dark"] body :focus-visible {outline:3px solid #ff8500!important;outline-offset:3px!important}
  html[data-theme="dark"] body .choice input + span::after {background:#fff!important;color:#000!important}
  html[data-theme="dark"] body #menuScrim {background:rgba(0,0,0,.75)!important}
  html[data-theme="dark"] body canvas {background:#fff!important;color:#000!important}
 }
}
/* Dark surfaces cover modern screens and dialogs without changing PDF output. */
html[data-theme="dark"]{color-scheme:dark;--app-bg:#000000;--app-text:#ffffff;--app-muted:#ffffff;--app-line:#ffffff;--app-control:#000000;--modern-ink:#ffffff;--modern-muted:#ffffff;--company-tint:#000000;--ink:#ffffff;--muted:#ffffff;--line:#ffffff}
html[data-theme="dark"] body{background:#000000!important;color:#ffffff!important}
html[data-theme="dark"] body :is(header,nav,dialog,.app-menu-content,.language-buttons,.modern-card,.panel,.company-picker,.today-dashboard,.guided-header,.guided-footer,.modern-bottom-nav,.modern-home-card,.home-card,.home-grid,.entry-panel,.monthly-panel,.entries-panel,.report-editor,.report-history,.wage-panel,.summary-card,details,summary,.position-row,.catalog-item,.report-section-body,.entry-section-body,.receipt-row,.receipt-card,.documentation-card){background:#000000!important;border-color:#ffffff!important;color:#ffffff!important;box-shadow:none!important}
html[data-theme="dark"] body :is(h1,h2,h3,h4,p,label,legend,strong,small,summary,span,a){color:inherit!important}
html[data-theme="dark"] body :is(button,input,select,textarea,.segmented span,.choice span){background:#000000!important;color:#ffffff!important;border-color:#ffffff!important}
html[data-theme="dark"] body :is(button[aria-pressed="true"],.primary-button,.today-add,.guided-next){background:var(--company-accent,#000000)!important;color:#ffffff!important;border-color:var(--company-accent,#000000)!important}
html[data-theme="dark"] body :is(input,textarea)::placeholder{color:#ffffff!important;opacity:1}
html[data-theme="dark"] body :focus-visible{outline:3px solid #ff8500!important;outline-offset:3px}
html[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.72)}
html[data-theme="dark"] body canvas{background:white}

/* v257: Important declarations in this named layer take precedence over
   legacy unlayered !important rules, including ID-specific light surfaces.
   Screen-only: PDF/print canvases keep their original white paper. */
@layer heuer-dark-accessibility {
 @media screen {
  html[data-theme="dark"] {
   color-scheme:dark;--green-dark:#ff8500;--danger:#ff8500;
   --white:#000000;--soft:#000000;--company-tint:#000000;
  }
  html[data-theme="dark"] body {background:#000000!important;color:#ffffff!important}
  html[data-theme="dark"] body :is(main,header,nav,footer,section,article,aside,dialog,form,fieldset,details,summary,figure,table,thead,tbody,tr,td,th) {
   background-color:#000000!important;background-image:none!important;color:#ffffff!important;border-color:#ffffff!important;
  }
  html[data-theme="dark"] body :is(main,form,fieldset,section.intro,.home-intro) {background-color:transparent!important}
  html[data-theme="dark"] body :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,label,legend,a,li,dt,dd,figcaption,output,time) {color:inherit!important}
  html[data-theme="dark"] body :is(.modern-card,.panel,.today-dashboard,.home-today,.home-actions,.home-grid,.entry-panel,.monthly-panel,.entries-panel,.report-editor,.report-history,.wage-panel,.summary-card,.entry-row,.entry-section,.report-section,.report-section-body,.entry-section-body,.position-row,.catalog-item,.receipt-row,.receipt-card,.documentation-card,.company-picker,.app-menu-content,.theme-options,.language-buttons,.guided-heading,.guided-header,.guided-footer,.guided-status-row,.guided-counter,.guided-remaining,.guided-save-status,.week-share-panel,.backup-zip,.backup-option,.backup-option-body,.receipt-tabs,.receipt-pdf-actions,.wage-confirm-hours,.wage-review,.wage-history-card,.report-history-card,.help-person,.help-topics,.empty-icon,.type-badge,.date-pill,.hours-day-records,.category-calendar,.category-calendar-day,.calendar-day,.calendar-grid,.calendar-legend,.wage-sign-stage,.onboarding-card,.welcome-card,#backupMessage,#backupStartStatus,#photoUploadProgress,#receiptPdfReady,#receiptOptional,#multiSitesList label) {
   background:#000000!important;color:#ffffff!important;border-color:#ffffff!important;box-shadow:none!important;
  }
  html[data-theme="dark"] body :is(button,input,select,textarea,option,optgroup,.choice span,.segmented span,.backup-download-link,.help-contact-actions a,.receipt-actions label) {
   background:#000000!important;color:#ffffff!important;border-color:#ffffff!important;color-scheme:dark!important;
  }
  html[data-theme="dark"] body :is(button[aria-pressed="true"],button[aria-selected="true"],button.active,.primary-button,.today-add,.guided-next,#homeEnter,#createBackup,.choice input:checked + span,.segmented input:checked + span) {
   background:#ff8500!important;color:#000000!important;border-color:#ff8500!important;
  }
  html[data-theme="dark"] body :is(button,input,select,textarea):disabled {opacity:1!important;background:#000000!important;color:#ffffff!important;border-color:#ffffff!important}
  html[data-theme="dark"] body :is(.muted,.entry-date,.entry-main span,.dialog-copy,.backup-hint,.report-card-meta,#receiptWeekRange,#homeSubtitle,#homeTodayDetail,.hours-day-records p) {color:#ffffff!important}
  html[data-theme="dark"] body :is(.delete-button,[data-delete-report],.wage-delete,[role="alert"]) {color:#ff8500!important}
  html[data-theme="dark"] body :is(input,textarea)::placeholder {color:#ffffff!important;opacity:1!important}
  html[data-theme="dark"] body :is(input[type="checkbox"],input[type="radio"],progress) {accent-color:#ff8500!important}
  html[data-theme="dark"] body input::file-selector-button {background:#000000!important;color:#ffffff!important;border:1px solid #ffffff!important}
  html[data-theme="dark"] body :focus-visible {outline:3px solid #ff8500!important;outline-offset:3px!important}
  html[data-theme="dark"] body .guided-progress span {background:#ffffff!important;color:transparent!important}
  html[data-theme="dark"] body .guided-progress :is(.current,.done) {background:#ff8500!important}
  html[data-theme="dark"] body :is(.category-calendar-day,.calendar-day).has-overtime {background:linear-gradient(#ff8500 50%,#ff8500 50%)!important;color:#ffffff!important}
  html[data-theme="dark"] body .category-calendar-day:is(.has-work,.work) {background:#ff8500!important}
  html[data-theme="dark"] body .category-calendar-day:is(.has-vacation,.vacation) {background:#ff8500!important}
  html[data-theme="dark"] body .category-calendar-day:is(.has-sick,.sick) {background:#ff8500!important}
  html[data-theme="dark"] body details>summary::after {background-color:#ffffff!important;color:#000000!important;border-color:#ffffff!important}
  html[data-theme="dark"] body .choice input + span::after {background:#ffffff!important;color:#000000!important}
  html[data-theme="dark"] body :is(.welcome-logo,.brand-logo) {background:#ffffff!important;border-radius:8px;padding:5px}
  html[data-theme="dark"] dialog::backdrop {background:rgba(0,0,0,.72)!important}
  html[data-theme="dark"] body canvas {background:#ffffff!important;color:#000000!important}
 }
}
@layer heuer-dark-accessibility {
 @media screen {
  html[data-theme="dark"] body :is(.catalog-position,.catalog-search,.compact-position,.draft-notice,.dual-time-control,.entry-day,.entry-symbol,.entry-type-badge,.finished-position,.guided-review,.hours-entry-review,.help-links,.help-video-card,.install-header,.install-platforms,.modern-install-menu,.month-calendar-section,.month-end-icon,.month-end-reminder,.monthly-content,.monthly-grid,.monthly-toggle-icon,.office-contact,.optional-report-fields,.position-extras,.quick-day-grid,.quick-week-copy,.report-card,.report-card-week,.report-delivery-actions,.report-final-review,.report-share-panel,.report-staff-field,.report-subcontractors,.roof-type-panel,.rubric-group,.section-number,.step-number,.stored-photos,.stored-photos-heading,.today-symbol,.wage-history-empty,.wage-manual-time,.wage-source,.wage-summary-icon,.week-badge,.category-entry) {
   background:#000000!important;color:#ffffff!important;border-color:#ffffff!important;
  }
  html[data-theme="dark"] body :is(h1,h2,h3,h4,p,span,label,input,textarea,select,button,strong,small) {-webkit-text-fill-color:currentColor!important}
  html[data-theme="dark"] body :is(.calendar-work-half,.month-calendar-day.has-entry,.category-calendar-day.has-entry) {background:#ff8500!important;color:#000000!important}
  html[data-theme="dark"] body :is(.calendar-overtime-half,.month-calendar-day.overtime-only,.entry-type-overtime,.type-overtime) {background:#ff8500!important;color:#000000!important;border-color:#ff8500!important}
  html[data-theme="dark"] body :is(.entry-type-sick,.type-sick) {background:#ff8500!important;color:#000000!important}
  html[data-theme="dark"] body :is(.entry-type-vacation,.type-vacation) {background:#ff8500!important;color:#000000!important}
  html[data-theme="dark"] body .guided-progress span {-webkit-text-fill-color:transparent!important}
 }
}

/* v259: secondary parent-company signature, original uploaded brand asset. */
@layer heuer-brand {
 @media screen {
  html[data-theme] body #homeApp .heuer-group-affiliation {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;order:0;margin:0 auto 14px;padding:8px 16px;width:min(100%,340px);background:#000!important;color:#fff!important;border:0!important;border-radius:16px;box-shadow:none!important;}
  html[data-theme] body #homeApp .heuer-group-affiliation p {margin:0!important;font-size:13px!important;line-height:1.5!important;text-align:center;color:#fff!important;-webkit-text-fill-color:#fff!important;}
  html[data-theme] body #homeApp .heuer-group-logo {display:block;width:160px!important;max-width:100%!important;height:76px!important;object-fit:cover;object-position:50% 56%;filter:none!important;background:#000!important;padding:0!important;border:0!important;border-radius:0!important;opacity:1!important;}
 }
}

/* Group identity remains visible in every main app area. */
html[data-theme] body .app-header{padding-bottom:48px!important;min-height:124px!important;}
html[data-theme] body .app-header .app-group-brand{position:absolute;bottom:5px;left:16px;right:16px;display:flex;align-items:center;justify-content:center;gap:10px;background:#000!important;color:#fff!important;border-radius:6px;height:34px;}
html[data-theme] body .app-header .app-group-brand img{width:62px;height:30px;object-fit:cover;object-position:50% 56%;filter:none!important;}
html[data-theme] body .app-header .app-group-brand span{color:#fff!important;-webkit-text-fill-color:#fff!important;font-size:11px!important;line-height:1.2;}
html[data-theme] body .app-header #quickTutorialButton{top:42px!important;}
/* Secondary Group mark without a surrounding card or outline. */
html[data-theme] body #homeApp .heuer-group-affiliation{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;}
html[data-theme] body #homeApp .heuer-group-affiliation p{color:inherit!important;-webkit-text-fill-color:currentColor!important;}
html[data-theme] body #homeApp .heuer-group-logo{width:130px!important;height:62px!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;}
html[data-theme] body .app-header .app-group-brand{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;}
html[data-theme="light"] body .app-header .app-group-brand span{color:#111!important;-webkit-text-fill-color:#111!important;}
html[data-theme="light"] body #homeApp .heuer-group-affiliation{color:#111!important;}

/* Align the secondary brand with the main header logo. */
html[data-theme] body .app-header .app-group-brand{left:20px!important;right:16px!important;justify-content:flex-start!important;gap:9px!important;}
html[data-theme] body .app-header .app-group-brand img{flex:0 0 62px;border:0!important;outline:0!important;box-shadow:none!important;}
html[data-theme] body .app-header .app-group-brand span{min-width:0;font-size:10px!important;}

/* Two brands across the top, controls beneath the Group mark. */
html[data-theme] body .app-header{min-height:160px!important;padding:10px 20px 72px!important;align-items:flex-start!important;}
html[data-theme] body .app-header .brand-logo{width:min(145px,40vw)!important;height:64px!important;}
html[data-theme] body .app-header .app-group-brand{left:auto!important;right:20px!important;top:12px!important;bottom:auto!important;width:130px!important;height:auto!important;flex-direction:column!important;align-items:flex-end!important;gap:3px!important;}
html[data-theme] body .app-header .app-group-brand img{width:100px!important;height:46px!important;flex:0 0 auto!important;}
html[data-theme] body .app-header .app-group-brand span{font-size:8px!important;text-align:right!important;}
html[data-theme] body .app-header .app-menu{top:100px!important;right:118px!important;}
html[data-theme] body .app-header #quickTutorialButton{top:100px!important;right:66px!important;transform:none!important;}
html[data-theme] body .app-header .language-menu{top:100px!important;right:20px!important;}

/* Match the visible marks rather than their image boxes. */
html[data-theme] body .app-header .app-group-brand{top:22px!important;width:130px!important;}
html[data-theme] body .app-header .app-group-brand img{width:min(104px,29vw)!important;height:40px!important;object-fit:cover!important;object-position:50% 56%!important;}

/* Equal header controls, aligned below the Group logo. */
html[data-theme] body .app-header :is(.app-menu,.language-menu,#quickTutorialButton){top:100px!important;}
html[data-theme] body .app-header .app-menu{right:124px!important;}
html[data-theme] body .app-header #quickTutorialButton{right:72px!important;}
html[data-theme] body .app-header :is(.app-menu>summary,.language-menu>summary,#quickTutorialButton){
 box-sizing:border-box!important;width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important;
 display:grid!important;place-items:center!important;padding:0!important;margin:0!important;border-radius:12px!important;box-shadow:none!important;
}
html[data-theme] body .app-header :is(.app-menu>summary,.language-menu>summary,#quickTutorialButton) svg{
 display:block!important;width:23px!important;height:23px!important;margin:0!important;stroke-width:1.8;
}

.app-header .hhd-group-caption{position:absolute;left:20px;top:76px;font-size:10px;line-height:1.2;color:inherit;}
#homeApp > .hhd-group-caption{display:block;text-align:center;font-size:12px;margin:-16px 0 22px;color:inherit;}

#siteDocumentation #siteDocNew{width:100%;margin:12px 0;background:#1b694d!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#1b694d!important;}
#siteDocumentation #siteDocEditor[hidden],#siteDocumentation #siteDocResume[hidden]{display:none!important;}
#siteDocumentation #siteDocEditor{margin:14px 0 20px;}
#siteDocumentation #siteDocProject{display:block;width:100%;margin:6px 0 14px;}
#siteDocumentation .site-doc-group h4{margin:18px 0 8px;}
#siteDocumentation .site-doc-group article p{overflow-wrap:anywhere;margin:8px 0 12px;}

#siteDocumentation .site-doc-group{margin:10px 0;border:1px solid currentColor;border-radius:12px;padding:10px 12px;}
#siteDocumentation .site-doc-group summary{cursor:pointer;padding:6px 0;overflow-wrap:anywhere;}
#siteDocumentation .site-doc-group summary small{margin-inline-start:10px;opacity:.8;}

/* Keep the count and chevron aligned across all project rows. */
#siteDocumentation .site-doc-group > summary{
 display:grid!important;grid-template-columns:minmax(0,1fr) max-content 36px;
 align-items:center;column-gap:10px;list-style:none;text-align:start;
}
#siteDocumentation .site-doc-group > summary > strong{min-width:0;overflow-wrap:anywhere;}
#siteDocumentation .site-doc-group > summary > small{margin:0;white-space:nowrap;text-align:end;font-variant-numeric:tabular-nums;}
#siteDocumentation .site-doc-group > summary::after{
 position:static!important;grid-column:3;justify-self:end;margin:0!important;
 width:36px!important;height:36px!important;box-sizing:border-box!important;
}
#officeMailDialog{width:min(92vw,480px);padding:20px;overflow-wrap:anywhere;}
#officeMailDialog form{display:flex;justify-content:flex-end;}
#officeMailDialog .office-mail-files{display:grid;gap:8px;margin:14px 0;}
#officeMailDialog .office-mail-files button{white-space:normal;overflow-wrap:anywhere;}
#officeMailDialog .office-mail-link{display:block;text-align:center;padding:12px;text-decoration:none;}
