/* Shared sage surfaces. Presentation only: typography, layout, actions and status colours stay original. */
html:has(body.sc-sage-theme), body.sc-sage-theme {
  --sc-surface-sage:#e8ebe1;
  --sc-surface-light:#fafdf6;
  --sc-surface-line:#cbd0c3;
  --sc-surface-card:#f5f7f0;
  --sc-surface-quiet:#f0f3e9;
  --sc-surface-form:#fafbf7;
  --sc-surface-card-line:#d5dbce;
  --sc-surface-card-shadow:0 1px 2px rgba(38,48,25,.025),0 12px 30px rgba(38,48,25,.025);
  --paper:#e8ebe1;
  --paper-2:#fafdf6;
  background:#e8ebe1;
}
body.sc-sage-theme :is(.hero,.page-hero,.p-hero,.section,.section-dark,.p-section,.v-section,.analysis-shell,.analysis-overview-shell,.analysis-toolbox-shell,.analysis-tool-light-shell,.ticket-shell,.ticket-section,.analysis-record-section,.analysis-explanation-section,.practice-section,.team-network-section,.contact-band,#account-dashboard) {
  background:var(--sc-surface-sage)!important;
}
body.sc-sage-theme :is(.section-muted,.p-section-soft,.p-check-section,.v-soft,.portal-access-section,.home-references,.sc-ki-entry,.p-home-entry,.logos-section) {
  background:var(--sc-surface-light)!important;
}
body.sc-sage-theme :is(.topbar,.topbar.is-scrolled,.p-section-nav,.v-sections) {
  background:var(--sc-surface-light)!important;
  border-color:var(--sc-surface-line)!important;
}
body.sc-sage-theme .hero::before,
body.sc-sage-theme .page-hero::before,
body.sc-sage-theme .p-hero::before {
  background:linear-gradient(90deg,rgba(232,235,225,.99) 0%,rgba(232,235,225,.93) 45%,rgba(232,235,225,.45) 72%,rgba(232,235,225,.08) 100%)!important;
}
body.sc-sage-theme .hero::after,
body.sc-sage-theme .page-hero::after,
body.sc-sage-theme .p-hero::after {
  background:linear-gradient(0deg,#e8ebe1 0%,rgba(232,235,225,.7) 42%,transparent 100%)!important;
}
body.sc-sage-theme .v-hero-photo {
  background:linear-gradient(90deg,#e8ebe1 3%,rgba(232,235,225,.93) 36%,rgba(232,235,225,.68)),linear-gradient(0deg,#e8ebe1,transparent 65%),var(--office-photo) center/cover!important;
}
body.sc-sage-theme .compact-grid { background:transparent!important; }
/* Content cards use a warm, restrained surface instead of full white. */
body.sc-sage-theme :is(.compact-card,.service-card,.insight-card,.practice-case-card,.search-result-card,.search-empty,.analysis-card,.analysis-resource-card,.analysis-kev-card,.analysis-news-card,.analysis-live-card,.analysis-empty,.analysis-trust-card,.analysis-toolbox-result,.analysis-mini-result,.v-package,.v-job,.v-job-empty,.v-mail-frame,.v-account-overview>div,.rc-card,.crm-card,.crm-metric,.crm-empty,.sc-admin-tile,.sc-admin-empty,.sc-admin-access-card,.app-example-preview,.app-architecture,.app-hr-preview,.opendesk-demo-guide,.hr-product-feature,.hr-product-preview) {
  background:var(--sc-surface-card)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:var(--sc-surface-card-shadow)!important;
}
/* Secondary information blends more closely into the page. */
body.sc-sage-theme :is(.depth-panel,.list-panel,.workflow-step,.value-grid article,.trust-strip article,.proof-metrics,.location-trust article,.service-city-group,.team-network-card,.p-journey,.v-journey,.ticket-side,.p-license-strip,.p-review-card,.p-calculator,.contact-card,.app-architecture-integrations,.hr-product-demo-note) {
  background:var(--sc-surface-quiet)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:none!important;
}
body.sc-sage-theme .founder-card::before {
  background:var(--sc-surface-quiet)!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
/* Work areas stay light; actions and selected-state colours remain distinct. */
body.sc-sage-theme :is(.contact-form,.ticket-panel,.ticket-view-panel,.ticket-admin-panel,.search-panel,.p-check-box,.p-result,.p-report-shell,.p-assistant,.p-dialog,.v-form-card,.v-order-summary,.v-payment,.v-end-dialog,.analysis-tool-card,.analysis-tool-output,.analysis-toolbox-output,.analysis-result-placeholder,.analysis-result,.analysis-tool-light-shell .list-panel) {
  background:var(--sc-surface-form)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:var(--sc-surface-card-shadow)!important;
}
body.sc-sage-theme .p-package:not(.p-package-featured) {
  background:var(--sc-surface-card)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:var(--sc-surface-card-shadow)!important;
}
body.sc-sage-theme :is(.compact-card,.insight-card,.practice-case-card,.search-result-card):is(:hover,:focus-within) {
  background:var(--sc-surface-light)!important;
  border-color:#b7c1ab!important;
  box-shadow:0 4px 18px rgba(38,48,25,.055)!important;
}
/* A quiet transition replaces the long dividing rule above the footer. */
body.sc-sage-theme main > .contact-band:last-child {
  border-bottom-color:var(--sc-surface-sage)!important;
}
body.sc-sage-theme .footer {
  background:linear-gradient(180deg,#e8ebe1 0,#f3f6ed 96px,#fafdf6 210px)!important;
  background-origin:border-box!important;
  border-top-color:transparent!important;
  box-shadow:none!important;
}
/* The public demo and real login use the same tonal language; buttons and status colours are separate. */
body.sc-sage-theme.hr-demo :is(.surface,.document-dialog),
body.sc-sage-theme :is(.auth-card,.workspace-surface,.workspace-overview-card,.workspace-module-card,.workspace-company-create,.workspace-account-dialog,.workspace-absence-calendar,.workspace-companies-grid .tenant-list li,.settings-panel>.workflow-policy,.settings-panel>.workflow-card,.settings-panel>.settings-facts:not(.workspace-time-metrics),.workspace-time-list>.workflow-card) {
  background:var(--sc-surface-form)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:var(--sc-surface-card-shadow)!important;
}
body.sc-sage-theme.hr-demo :is(.public-credentials,.action-box,.journey,.parity-record-detail,.settings-record,.parity-lifecycle .workflow-card) {
  background:var(--sc-surface-quiet)!important;
  border-color:var(--sc-surface-card-line)!important;
}
body.sc-sage-theme.hr-demo .login-footer {
  border-top-color:transparent!important;
}
@media(max-width:1020px) {
  body.sc-sage-theme .topbar .nav { background:var(--sc-surface-light)!important; }
  body.sc-sage-theme .hero::before,
  body.sc-sage-theme .page-hero::before,
  body.sc-sage-theme .p-hero::before {
    background:linear-gradient(90deg,rgba(232,235,225,.98),rgba(232,235,225,.78) 75%,rgba(232,235,225,.35))!important;
  }
}

/* Consent surfaces share the palette; opt-in behaviour and action styles stay original. */
body.sc-sage-theme .cookie-banner {
  background:var(--sc-surface-quiet)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:0 2px 5px rgba(38,48,25,.04),0 18px 44px rgba(38,48,25,.10)!important;
}
body.sc-sage-theme .cookie-preferences {
  background:transparent!important;
  border-top-color:var(--sc-surface-card-line)!important;
}
body.sc-sage-theme .cookie-preference-card {
  background:var(--sc-surface-card)!important;
  border-color:var(--sc-surface-card-line)!important;
  box-shadow:none!important;
}
body.sc-sage-theme .cookie-toggle-card:is(:hover,:focus-within) {
  background:var(--sc-surface-form)!important;
  border-color:#b8c7a7!important;
}
body.sc-sage-theme .cookie-toggle-card:has(input:checked) {
  background:#edf2e3!important;
  border-color:#b8c7a7!important;
}

/* Keep expanded consent settings reachable within small viewports. */
@media(max-width:1060px) {
  body.sc-sage-theme .cookie-banner {
    max-height:calc(100dvh - 36px);
    overflow-y:auto;
    overscroll-behavior:contain;
  }
}
@media(max-width:680px) {
  body.sc-sage-theme .cookie-banner { max-height:calc(100dvh - 28px); }
}

/* Six homepage services form complete desktop rows without an exposed grid canvas. */
body.sc-sage-theme.home-page .service-grid { background:transparent!important; }
@media(min-width:1021px) {
  body.sc-sage-theme.home-page .service-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Personal access is a quiet full-width band rather than an inset framed card. */
body.sc-sage-theme :is(.p-hero,.v-hero)+.portal-access-section { background:var(--sc-surface-quiet)!important; }
body.sc-sage-theme :is(.p-hero,.v-hero)+.portal-access-section .portal-access-card {
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}

/* Public text fields keep a quiet sage surface, including keyboard focus.
   Native controls, action buttons and the Workplify application retain their own styles. */
body.sc-sage-theme:has(.topbar) :is(input:not([type="hidden"],[type="button"],[type="submit"],[type="reset"],[type="image"],[type="file"],[type="range"],[type="color"],[type="checkbox"],[type="radio"]),textarea,select) {
  background-color:var(--sc-surface-quiet)!important;
}
body.sc-sage-theme:has(.topbar) :is(input:not([type="hidden"],[type="button"],[type="submit"],[type="reset"],[type="image"],[type="file"],[type="range"],[type="color"],[type="checkbox"],[type="radio"]),textarea,select):is(:hover,:focus,:focus-visible) {
  background-color:var(--sc-surface-card)!important;
}
body.sc-sage-theme.home-page .hero-search {
  background:var(--sc-surface-quiet)!important;
}
body.sc-sage-theme.home-page .hero-search input {
  background-color:transparent!important;
}
body.sc-sage-theme.home-page .home-hero .hero-panel {
  background:var(--sc-surface-card)!important;
}
/* Large example selectors are content cards; their selected state stays recognisable. */
body.sc-sage-theme .app-scenario:not([aria-pressed="true"]) {
  background:var(--sc-surface-card)!important;
}
body.sc-sage-theme .app-scenario:not([aria-pressed="true"]):is(:hover,:focus-visible) {
  background:var(--sc-surface-light)!important;
}
body.sc-sage-theme .app-example-row {
  background:var(--sc-surface-quiet)!important;
  border-color:var(--sc-surface-card-line)!important;
}
/* Ticket and analysis interiors use the same surfaces as their surrounding cards. */
body.sc-sage-theme :is(.ticket-panel,.analysis-tool-card,.analysis-tool-output,.analysis-toolbox-output,.analysis-result-placeholder,.analysis-result) {
  background:var(--sc-surface-card)!important;
}
body.sc-sage-theme :is(.ticket-upload-box,.ticket-side-list li,.analysis-columns>div,.analysis-detail-grid>div,.analysis-record-row,.analysis-mini-result-card,.analysis-inline-list li,.analysis-stat-grid div) {
  background:var(--sc-surface-quiet)!important;
  border-color:var(--sc-surface-card-line)!important;
}
body.sc-sage-theme .ticket-upload-box:is(:hover,:focus-within) {
  background:var(--sc-surface-card)!important;
}
body.sc-sage-theme .analysis-table-wrap {
  background:var(--sc-surface-card)!important;
  border-color:var(--sc-surface-card-line)!important;
}
body.sc-sage-theme .analysis-table-wrap th {
  background:var(--sc-surface-quiet)!important;
}
body.sc-sage-theme .analysis-table-wrap td {
  background-color:var(--sc-surface-card)!important;
}

/* Placeholder text remains readable against the sage input background. */
body.sc-sage-theme:has(.topbar) :is(input,textarea)::placeholder {
  color:#656b5e!important;
  opacity:1;
}
