/* The entry gate is opt-in through JS and has an independent fail-open deadline. */
html.hris-intro-pending { background: #0b171c; }
html.hris-intro-pending body { visibility: hidden; }
html.hris-intro-open,html.hris-intro-open body { overflow: hidden; }
.hris-entry-intro { box-sizing: border-box; position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); border: 0; background: #0b171c; color: #e1eff2; overflow: hidden; opacity: 1; transition: opacity .38s ease; }
.hris-entry-intro[open] { display: grid; place-items: center; }
.hris-entry-intro::backdrop { background: #0b171c; }
.hris-entry-intro.is-leaving { opacity: 0; }
.hris-entry-art { position: relative; width: min(78vw,960px); height: min(70dvh,660px); max-width: 100%; }
.hris-entry-art img { display: block; width: 90%; height: 90%; object-fit: contain; }
.hris-entry-art .hris-brand-pieces { top: 10%; left: 5%; right: 5%; height: 76%; gap: clamp(4px,1vw,12px); }
.hris-entry-art .hris-brand-rails { inset: 10% 0; }
.hris-entry-art .hris-brand-progress { left: 20%; right: 20%; bottom: -15px; opacity: .7; }
.hris-entry-skip { position: absolute; z-index: 5; top: max(20px,env(safe-area-inset-top)); right: max(20px,env(safe-area-inset-right)); min-height: 44px; padding: 10px 20px; border: 1px solid #709da670; border-radius: 999px; background: #152e35; color: #d5eaf0; font: 600 12px/1.4 'Segoe UI',sans-serif; cursor: pointer; }
.hris-entry-skip:hover { background: #244650; }
.hris-entry-skip:focus-visible { outline: 3px solid #b5ecdd; outline-offset: 4px; }
@media (prefers-reduced-motion:reduce) { .hris-entry-intro { transition: none; } }
body[data-hris-motion].hris-motion-ready :is([data-hris-hero],[data-hris-panel],.audit-metric-card) {
    animation: none;
}
body[data-hris-motion].hris-motion-ready :is([role="dialog"],[role="alertdialog"],dialog,.audit-dialog,.app-dialog,.command-dialog,.payroll-modal,.employee-detail-modal) {
    animation: none;
}
body[data-hris-motion].hris-motion-ready :is(.audit-dialog-backdrop,.app-dialog-backdrop,.command-backdrop):not([hidden])>:is(.audit-dialog,.app-dialog,.command-dialog) {
    animation: none;
}
.hris-motion-surface { position: relative; isolation: isolate; overflow: hidden; }
.hris-word-mask { display: inline-block; overflow: clip; vertical-align: bottom; padding-block: .07em; margin-block: -.07em; }
.hris-word { display: inline-block; font: inherit; color: inherit; letter-spacing: inherit; }
.hris-char { display: inline-block; font: inherit; color: inherit; transform-origin: 50% 85%; backface-visibility: hidden; }
body.hris-public :is(.rp-job-grid,.rp-step-grid) { perspective: 1200px; }
body[data-hris-motion].hris-motion-ready .hris-motion-interactive { transition-property: background-color,border-color,color,box-shadow; }
/* A bounded, interactive foreground surface. No decorative globe. */
.hris-brand-viewer { position: relative; z-index: 1; width: 360px; max-width: 100%; padding: 20px; border: 1px solid #91b4bd50; border-radius: 22px; background: radial-gradient(ellipse at 50% 45%,#193e46,#0b171c 75%); box-shadow: 0 24px 60px #0003,inset 0 1px #ffffff12; color: #e1eff2; isolation: isolate; overflow: clip; }
.hris-brand-stage { position: relative; z-index: 2; display: grid; place-items: center; width: 100%; height: 250px; cursor: grab; touch-action: none; user-select: none; border-radius: 12px; outline-offset: 2px; transform-origin: 50% 50%; }
.hris-brand-model { display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center; min-width: 0; min-height: 0; width: 100%; height: 100%; transform-origin: 50% 50%; pointer-events: none; }
.hris-brand-zoom { display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center; min-width: 0; min-height: 0; width: 100%; height: 100%; transform-origin: center; }
.hris-brand-stage img { width: 85%; height: 85%; object-fit: contain; pointer-events: none; }
.hris-brand-pieces { position: absolute; z-index: 3; top: 20px; left: 28px; right: 28px; height: 230px; display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); grid-template-rows: repeat(6,minmax(0,1fr)); gap: 5px; pointer-events: none; perspective: 800px; }
.hris-brand-pieces i { display: block; background: #7dd7e4; opacity: 0; border: 1px solid #d9ffff60; box-shadow: inset 0 1px #ffffff50; }
.hris-brand-pieces i:nth-child(4n+1) { background: #b5e979; }
.hris-brand-pieces i:nth-child(4n+2) { background: #187eac; }
.hris-brand-pieces i:nth-child(4n+3) { background: #daf3eb; }
.hris-brand-rails { position: absolute; z-index: 1; inset: 44px 16px 64px; pointer-events: none; }
.hris-brand-rails i { position: absolute; top: 16%; left: 0; width: 100%; height: 1px; opacity: 0; background: linear-gradient(90deg,transparent,#6beaf0,#b4f46b,transparent); transform-origin: left; }
.hris-brand-rails i:nth-child(2) { top: 37%; transform-origin: right; }
.hris-brand-rails i:nth-child(3) { top: 62%; }
.hris-brand-rails i:nth-child(4) { top: 84%; transform-origin: right; }
.hris-brand-progress { position: absolute; bottom: 0; left: 20px; right: 20px; height: 2px; opacity: 0; pointer-events: none; }
.hris-brand-progress i { display: block; height: 100%; background: linear-gradient(90deg,#61c6eb,#b5ed75); transform: scaleX(0); transform-origin: left; }
.hris-brand-viewer.is-performing .hris-brand-progress { opacity: 1; }
.hris-sci-webgl,.hris-sci-vector-fallback { display: block; width: 100%; height: 100%; pointer-events: none; }
.hris-sci-vector-fallback { overflow: visible; transform-style: preserve-3d; }
.hris-brand-viewer.is-dragging .hris-brand-stage { cursor: grabbing; }
.hris-brand-tools { position: relative; z-index: 4; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hris-brand-tools span { flex: 1; color: #c0d8df; font: 500 10px/1.4 'Segoe UI',sans-serif; }
.hris-brand-viewer button { min-height: 32px; padding: 6px 10px; border: 1px solid #709da6; border-radius: 8px; background: #203e47; color: #e3f5fa; font: 650 10px/1.4 'Segoe UI',sans-serif; cursor: pointer; }
.hris-brand-viewer button:hover:not(:disabled) { background: #2d5761; }
.hris-brand-viewer button:disabled { opacity: .4; cursor: default; }
.hris-brand-viewer :is(button,.hris-brand-stage):focus-visible { outline: 3px solid #b9edf4; outline-offset: 3px; }
.hris-brand-activate { position: relative; z-index: 4; display: block; margin: -20px auto 12px; }
.hris-brand-activate[hidden] { display: none; }
.hris-brand-viewer button[hidden] { display: none; }
.hris-brand-settings { position: relative; z-index: 4; margin-top: 12px; border-top: 1px solid #7194a133; padding-top: 10px; color: #d6e9ee; font: 500 11px/1.5 'Segoe UI',sans-serif; }
.hris-brand-settings summary { cursor: pointer; padding: 4px 0; color: #c6e6ed; }
.hris-brand-controls { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 12px; padding-top: 12px; }
.hris-brand-controls label { display: grid; gap: 6px; min-width: 0; color: #d6e9ee; font: inherit; }
.hris-brand-controls select { width: 100%; min-height: 36px; border: 1px solid #709da6; border-radius: 8px; padding: 6px; background: #182f38; color: #e3f5fa; font: inherit; }
.hris-brand-controls input[type=range] { width: 100%; min-height: 36px; margin: 0; padding: 0; accent-color: #a9df80; cursor: pointer; }
.hris-brand-notice { display: block; color: #ecdbad; margin-top: 6px; }
.hris-brand-viewer:fullscreen { display: flex; flex-direction: column; justify-content: center; width: 100vw!important; height: 100dvh; max-width: none!important; margin: 0!important; padding: clamp(16px,4vw,48px); border: 0; border-radius: 0; background: #0b171c; transform: none!important; overflow: auto; }
.hris-brand-viewer:fullscreen .hris-brand-stage { flex: 1; height: min(65dvh,650px); min-height: 160px; max-height: 70dvh; overflow: clip; }
.hris-brand-viewer:fullscreen :is(.hris-brand-tools,.hris-brand-settings) { width: min(100%,620px); align-self: center; }
.hris-brand-viewer:fullscreen .hris-brand-pieces { top: 15%; left: 25%; right: 25%; height: 45%; }
.hris-brand-viewer :is(summary,select,input):focus-visible { outline: 3px solid #b9edf4; outline-offset: 3px; }
body.hris-public .rp-hero.hris-brand-host { padding-right: 0; }
body.hris-public .rp-hero.hris-brand-host>.rp-hero-content { padding-right: 400px; }
body.hris-public .rp-hero>.hris-brand-viewer { position: absolute; right: max(24px,calc((100vw - 1180px)/2)); top: 50%; transform: translateY(-50%); width: 380px; }
body.login-body .login-visual>.hris-brand-viewer { align-self: center; margin-top: 22px; width: 340px; }
body.login-body .login-card>.hris-brand-viewer { margin: 20px auto 0; width: 100%; max-width: 320px; }
body.login-body .hris-brand-stage { height: 210px; }
body[data-hris-experience] .dashboard-hero.hris-brand-host { display: grid; grid-template-columns: minmax(0,1fr) 360px; align-items: center; gap: 22px; }
.dashboard-hero.hris-brand-host>.dashboard-hero-copy { grid-column: 1; }
.dashboard-hero.hris-brand-host>.dashboard-filter { grid-column: 1; grid-row: 2; }
.dashboard-hero.hris-brand-host>.hris-brand-viewer { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width:1099px) {
    body.hris-public .rp-hero.hris-brand-host { display: flex; flex-direction: column; align-items: stretch; }
    body.hris-public .rp-hero.hris-brand-host>.rp-hero-content { padding-right: 0; padding-bottom: 24px; }
    body.hris-public .rp-hero>.hris-brand-viewer { position: relative; right: auto; top: auto; transform: none; align-self: center; margin: 0 16px 30px; }
    body[data-hris-experience] .dashboard-hero.hris-brand-host { grid-template-columns: minmax(0,1fr); }
    .dashboard-hero.hris-brand-host>.hris-brand-viewer { grid-column: 1; grid-row: auto; width: 100%; }
    .dashboard-hero .hris-brand-stage { height: 180px; }
}
@media (max-width:760px) {
    .hris-brand-viewer { width: 320px; padding: 14px; }
    .hris-brand-stage { height: 180px; }
    .hris-brand-pieces { height: 170px; }
    .hris-char { transform: none; }
}
@media (prefers-reduced-motion:reduce) { .hris-brand-pieces,.hris-brand-rails,.hris-brand-progress { display: none; } }
@media print { .hris-brand-viewer { display: none; } }
