/* AFP-CES workplace collection. Screen styling only: report paper keeps its print contract. */
@media screen {
    .app-authenticated {
        --workplace-paper: #f6f3ec;
        --workplace-ivory: #fcfaf5;
        --workplace-gold: #cfab70;
        --workplace-ink: #172940;
        --workplace-line: #dfd9cd;
        --workplace-serif: Georgia, 'Times New Roman', serif;
        --theme-workspace: var(--workplace-paper);
        --theme-sidebar: var(--workplace-ivory);
        --theme-border: var(--workplace-line);
        --theme-sidebar-hover: #eeebe3;
        --theme-sidebar-active: #e8e6dd;
        --surface-editorial: #f1ece2;
        --surface-quiet: #f5f3ee;
        --border-subtle: var(--workplace-line);
        --border-default: var(--workplace-line);
        background: var(--workplace-paper);
    }
    .app-authenticated .app-topbar { box-shadow: none; border-bottom: 2px solid var(--workplace-gold); }
    .app-authenticated .app-brand-copy strong { font-family: var(--workplace-serif); font-size: 20px; font-weight: 500; letter-spacing: .04em; }
    .app-authenticated .app-brand-copy small { font-size: 10px; letter-spacing: .055em; }
    .app-authenticated .app-sidebar { box-shadow: none; }
    .app-authenticated .app-sidebar nav a { border-radius: 5px; min-height: 43px; }
    .app-authenticated .app-sidebar nav a.active { background: var(--theme-header); color: #fff; box-shadow: none; }
    .app-authenticated .app-sidebar nav a.active::before { background: var(--workplace-gold); }
    .app-authenticated .nav-label { color: #786b54; font-size: 9px; letter-spacing: .16em; }
    .app-authenticated .app-main { padding-top: 28px; }
    .app-authenticated .breadcrumbs { margin-bottom: 16px; }
    .app-authenticated .button { border-radius: 4px; font-weight: 600; }
    .app-authenticated .button-secondary { border-color: #c9c7bf; background: #fffefb; color: var(--brand-primary); }
    .app-authenticated .button-secondary:hover { border-color: var(--brand-primary); background: #f1eee6; }
    .app-authenticated .portal-eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 700; }
    .app-authenticated :is(.operational-page-header, .page-header.operational-page-header, .module-workspace-header.operational-page-header) {
        background: var(--workplace-ivory); border-color: var(--workplace-line); border-left-color: var(--workplace-gold); border-radius: 5px;
    }
    .app-authenticated .operational-page-header h1 { font-family: var(--workplace-serif); font-weight: 500; letter-spacing: -.035em; font-size: clamp(1.9rem, 2.5vw, 2.65rem); }
    .app-authenticated :is(.workflow-picker, .list-report, .data-surface, .form-section, .detail-section, .terminal-card, .record-workspace) { border-color: var(--workplace-line); box-shadow: 0 3px 16px rgb(46 39 26 / 3%); }
    .app-authenticated .operational-toolbar { background: #f7f5ef; }
    .app-authenticated .workflow-picker thead th { background: #f2f0e8; color: #596475; }

    /* The photographs always retain their complete frame, including on narrow screens. */
    .app-authenticated :is(.headquarters-hero .portal-hero-media, .module-hero-visual, .payroll-hero-media, .feature-media, .compact-media, .story-media, .workplace-banner-photo) {
        display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; max-height: none; height: auto;
        aspect-ratio: auto; background: #e7e0d3; overflow: visible; isolation: auto;
    }
    .app-authenticated :is(.headquarters-hero .portal-hero-media, .module-hero-visual, .payroll-hero-media, .feature-media, .compact-media, .story-media)::before,
    .app-authenticated :is(.headquarters-hero .portal-hero-media, .module-hero-visual, .payroll-hero-media, .feature-media, .compact-media, .story-media)::after { display: none; }
    .app-authenticated :is(.dh-picture, .workplace-banner-photo) { width: 100%; height: auto; }
    .app-authenticated :is(.dh-picture img, .workplace-banner-photo img) {
        position: static; display: block; width: 100%; height: auto; max-height: none; object-fit: contain; object-position: center; transform: none; filter: none;
    }

    /* Welcome and destination pages borrow the reference's serif type and quiet, generous framing. */
    .app-authenticated .headquarters-hero {
        display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); min-height: 0;
        border: 0; border-radius: 7px; background: var(--theme-header); box-shadow: none; margin-bottom: 30px;
    }
    .app-authenticated .headquarters-hero .portal-hero-content {
        grid-area: 1 / 1; background: none; color: #fff; padding: clamp(24px, 3vw, 44px); justify-content: center;
    }
    .app-authenticated .headquarters-hero .portal-hero-media { grid-area: 1 / 2; background: var(--theme-header); }
    .app-authenticated .headquarters-hero .portal-eyebrow { color: #e3c99f; order: -3; margin-bottom: 12px; font-size: 9px; }
    .app-authenticated .headquarters-date { color: #c5cdd6; font-size: 11px; order: -2; margin-bottom: 12px; }
    .app-authenticated .headquarters-greeting { color: #fff; font-size: 13px; margin: 0 0 16px; }
    .app-authenticated .headquarters-hero .portal-title {
        color: #fffaf0; font-family: var(--workplace-serif); font-weight: 400; font-size: clamp(2.3rem, 3.6vw, 4.1rem); line-height: 1.07; letter-spacing: -.045em;
    }
    .app-authenticated .headquarters-hero .portal-title em { color: #e3bf87; font-weight: 400; }
    .app-authenticated .headquarters-hero .portal-subtitle { color: #d4dbe3; font-size: 13px; line-height: 1.65; margin-top: 18px; }
    .app-authenticated .headquarters-hero .portal-actions { margin-top: 18px; gap: 8px; }
    .app-authenticated .headquarters-hero .button { font-size: 11px; min-height: 39px; padding: 9px 12px; }
    .app-authenticated .headquarters-hero .button-primary { background: #e3c99f; border-color: #e3c99f; color: #172940; }
    .app-authenticated .headquarters-hero .button-secondary { background: transparent; color: #fffaf0; border-color: #77869b; }
    .app-authenticated .headquarters-hero .button:hover { background: #fffaf0; color: #172940; }

    .app-authenticated .presentation-workflow { margin-bottom: 30px; }
    .app-authenticated .workflow-heading { gap: 16px; align-items: end; }
    .app-authenticated .workflow-heading h2 { font: 400 clamp(1.8rem, 2.5vw, 2.4rem)/1.12 var(--workplace-serif); letter-spacing: -.04em; color: var(--workplace-ink); }
    .app-authenticated .workflow-heading > p { max-width: 230px; font-size: 12px; }
    .app-authenticated .workflow-step { border-color: var(--workplace-line); border-radius: 5px; box-shadow: none; padding: 16px 13px; gap: 10px; min-height: 156px; background: #fffefb; }
    .app-authenticated .workflow-step:hover { border-color: #aa8851; background: #fbf5e9; box-shadow: 0 6px 16px rgb(63 50 28 / 7%); }
    .app-authenticated .workflow-step-top { border-bottom: 1px solid #ebe4d7; padding-bottom: 10px; margin-bottom: 2px; }
    .app-authenticated .workflow-number { border-radius: 50%; width: 27px; height: 27px; display: grid; place-items: center; background: #eee6d6; color: #735527; font-size: 10px; }
    .app-authenticated .workflow-step-top svg { width: 20px; height: 20px; color: var(--brand-primary); }
    .app-authenticated .workflow-step strong { font-size: 13px; line-height: 1.4; }
    .app-authenticated .workflow-step small { font-size: 11px; line-height: 1.5; color: #5d6672; }
    .app-authenticated .headquarters-shortcuts { border-block: 1px solid var(--workplace-line); padding-block: 14px; margin-block: 28px; }
    .app-authenticated .headquarters-shortcuts .portal-shortcut-tile { background: none; border: 0; box-shadow: none; padding: 12px; grid-template-columns: 32px minmax(0, 1fr) auto; }
    .app-authenticated .portal-section { margin-block: 36px; }
    .app-authenticated :is(.headquarters-section-heading, .feature-copy, .card-section-heading, .branch-context) h2 { font: 400 clamp(1.8rem, 2.8vw, 2.7rem)/1.13 var(--workplace-serif); letter-spacing: -.035em; }
    .app-authenticated .today-primary { background: var(--theme-header); border: 0; color: white; border-radius: 5px; }
    .app-authenticated .today-primary :is(strong,h3) { color: #fffaf0; }
    .app-authenticated .today-primary :is(p,.today-source) { color: #d8dfE7; }
    .app-authenticated .today-primary > strong { color: #e3c99f; font-family: var(--workplace-serif); font-weight: 400; }
    .app-authenticated .personnel-feature { border: 1px solid var(--workplace-line); border-radius: 6px; }
    .app-authenticated .personnel-feature .feature-copy { padding: 30px; background: #fffefb; }
    .app-authenticated :is(.portal-card,.operations-story-grid article) { border-radius: 5px; border-color: var(--workplace-line); box-shadow: none; }
    .app-authenticated .operations-story-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
    .app-authenticated .operations-story-grid article:first-child { grid-row: auto; }
    .app-authenticated .operations-story-grid article:first-child .story-media { aspect-ratio: auto; }
    .app-authenticated .operations-story-grid h3 { font: 400 23px/1.2 var(--workplace-serif); }
    .app-authenticated .headquarters-closing { border-top: 1px solid var(--workplace-line); padding-top: 22px; }

    .app-authenticated :is(.module-hero, .payroll-editorial-hero, .workplace-banner) {
        display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); min-height: 0; overflow: hidden;
        border: 1px solid var(--workplace-line); border-radius: 6px; background: var(--workplace-ivory); box-shadow: none;
    }
    .app-authenticated :is(.module-hero-copy, .payroll-hero-copy, .workplace-banner-copy) {
        display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
        min-height: 0; padding: clamp(24px,3.2vw,46px); background: var(--workplace-ivory);
    }
    .app-authenticated :is(.module-hero-copy, .payroll-hero-copy, .workplace-banner-copy) h1 {
        margin: 0; color: var(--workplace-ink); font-family: var(--workplace-serif); font-size: clamp(2.3rem,3.5vw,3.8rem); font-weight: 400; line-height: 1.08; letter-spacing: -.045em;
    }
    .app-authenticated :is(.module-hero-copy, .payroll-hero-copy, .workplace-banner-copy) > p:not(.portal-eyebrow) { color: #5a6470; font-size: 13px; line-height: 1.7; margin: 18px 0 0; }
    .app-authenticated :is(.module-hero-actions,.payroll-hero-actions) { margin-top: 20px; }
    .app-authenticated .module-summary { border-color: var(--workplace-line); }
    .app-authenticated .module-summary-primary { background: #eee8dc !important; }
    .app-authenticated .module-summary dd { font-family: var(--workplace-serif); font-weight: 400; }
    .app-authenticated .workplace-banner { margin-bottom: 26px; }
    .app-authenticated .workplace-banner-photo { margin: 0; }
    .app-authenticated .workplace-banner-copy .button { margin-top: 20px; font-size: 12px; }
    .app-authenticated .workplace-banner-without-photo { grid-template-columns: 1fr; }
    .app-authenticated .workplace-banner-without-photo .workplace-banner-copy { max-width: 780px; }
    .app-authenticated .workspace-intro h2, .app-authenticated .payroll-lifecycle h2 { font-family: var(--workplace-serif); font-size: 28px; font-weight: 400; letter-spacing: -.025em; }

    @media (min-width: 951px) { .app-authenticated .workflow-steps { grid-template-columns: repeat(5,minmax(0,1fr)); } }
    @media (max-width: 1100px) {
        .app-authenticated .headquarters-hero { grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); }
        .app-authenticated .headquarters-hero .portal-title { font-size: 36px; }
        .app-authenticated .headquarters-hero .portal-hero-content { padding: 26px; }
    }
    @media (min-width: 521px) and (max-width: 950px) { .app-authenticated .workflow-steps { grid-template-columns: repeat(3,minmax(0,1fr)); } }
    @media (max-width: 800px) {
        .app-authenticated :is(.headquarters-hero,.module-hero,.payroll-editorial-hero,.workplace-banner) { grid-template-columns: 1fr; }
        .app-authenticated .headquarters-hero .portal-hero-content { grid-area: auto; }
        .app-authenticated .headquarters-hero .portal-hero-media { grid-area: auto; }
        .app-authenticated .headquarters-hero .portal-title { font-size: clamp(2.4rem,7vw,3.7rem); }
        .app-authenticated .headquarters-hero .portal-hero-content { padding: 28px; }
        .app-authenticated .operations-story-grid { grid-template-columns: 1fr; }
        .app-authenticated .workplace-banner-copy h1 { font-size: 36px; }
        .app-authenticated .workflow-heading { align-items: flex-start; }
    }
    @media (max-width: 520px) {
        .app-authenticated .app-main { padding-top: 18px; }
        .app-authenticated .workflow-heading { display: block; }
        .app-authenticated .workflow-heading > p { max-width: none; margin-top: 8px; }
        .app-authenticated .workflow-steps { grid-template-columns: 1fr; }
        .app-authenticated .workflow-step { min-height: 0; }
        .app-authenticated .workflow-step-top { margin-bottom: 0; }
        .app-authenticated .portal-section { margin-block: 26px; }
        .app-authenticated .workplace-banner-copy { padding: 24px; }
    }
    @media (prefers-reduced-motion: reduce) { .app-authenticated .workflow-step { transition: none; transform: none; } }
}

/* Operational workspace: records and actions take precedence over imagery. */
.workspace-nav-toggle{display:none}
.app-authenticated .module-hero,.app-authenticated .payroll-destination-hero{display:block;min-height:0;padding:24px;margin-bottom:20px;background:var(--surface,#fff)}
.app-authenticated .module-hero-visual,.app-authenticated .payroll-hero-media,.compact-workspace .compact-media{display:none}
.app-authenticated .module-hero-copy,.app-authenticated .payroll-hero-copy{padding:0;max-width:none}
.app-authenticated .module-hero h1,.app-authenticated .payroll-destination-hero h1{font-size:clamp(26px,3vw,36px);line-height:1.2;margin:4px 0 10px}
.app-authenticated .module-hero-copy>p,.app-authenticated .payroll-hero-copy>p{max-width:75ch}
.app-authenticated .module-summary{position:static;grid-column:1/-1;margin-top:20px;padding:16px;gap:16px}
.app-authenticated .module-pathways{display:none}
.app-authenticated .payroll-lifecycle{display:none}
.compact-workspace .portal-section{margin-top:20px}
.compact-workspace .attention-section{margin-top:0}
.compact-workspace .today-primary{min-height:0;padding:24px}
.compact-workspace .today-primary>strong{font-size:40px}
.compact-workspace .record-section{margin:20px 0;padding:20px}
.payroll-person-link+small{display:block;margin-top:6px}
:where(.workspace-section,.record-section)[id]{scroll-margin-top:90px}
@media(max-width:900px){
.workspace-nav-toggle{display:inline-flex;margin-left:auto;padding:8px 12px}
.app-topbar{flex-wrap:nowrap;position:sticky;top:0;gap:8px;min-height:64px;padding:10px 12px;z-index:100}
.app-brand-copy small,.app-account .appearance-trigger span,.account-name{display:none}
.app-account{margin:0;width:auto}
.app-frame{display:block}
.app-sidebar{display:none!important;position:static;max-height:calc(100dvh - 70px);overflow:auto;width:100%;padding:14px}
.app-sidebar.navigation-open{display:block!important}
.app-sidebar nav{display:block}
.app-sidebar .nav-group{display:block;margin-bottom:12px}
.app-sidebar .nav-group a{display:flex}
.app-main{margin-left:0;width:100%;padding:16px}
.app-authenticated .module-hero,.app-authenticated .payroll-destination-hero{padding:18px}
.app-authenticated .module-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}

.operations-workspace .action-drawer{padding:18px;margin:16px 0;background:#fff;border:1px solid #d6dee8;border-radius:10px}.operations-workspace summary{cursor:pointer;font-weight:600}.operations-workspace table{width:100%;border-collapse:collapse}.operations-workspace th,.operations-workspace td{padding:12px;text-align:left;border-bottom:1px solid #d6dee8}.operations-workspace th small{display:block}.operations-workspace .form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-top:18px}.operations-workspace label{display:flex;flex-direction:column;gap:6px}.operations-workspace .table-wrap{overflow:auto}.operations-workspace .tab-nav{display:flex;gap:16px;flex-wrap:wrap;margin:18px 0}

/* Native disclosure keeps staff guidance keyboard accessible without JavaScript. */
.dashboard-staff-guide { margin: 0 0 24px; }
.dashboard-staff-guide > summary { display: inline-flex; align-items: center; gap: 20px; cursor: pointer; list-style: none; }
.dashboard-staff-guide > summary::-webkit-details-marker { display: none; }
.dashboard-staff-guide > summary:focus-visible { outline: 3px solid #a87d32; outline-offset: 4px; }
.staff-guide-toggle::after { content: '+'; font-size: 20px; line-height: 1; }
.dashboard-staff-guide[open] .staff-guide-toggle::after { content: '−'; }
.staff-guide-content { margin-top: 16px; }
.staff-guide-content > p { max-width: 90ch; line-height: 1.6; }
.staff-guide-step { width: 100%; height: 100%; }
.staff-guide-step .workflow-step-top { align-items: center; gap: 10px; }
.staff-guide-step h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.staff-guide-step p { margin: 0; font-size: 13px; line-height: 1.65; color: #435066; }
.staff-guide-step a, .staff-guide-access { margin-top: auto; }
.staff-guide-note { margin: 18px 0 0; font-size: 13px; color: #435066; }
@media (max-width: 620px) {
    .staff-guide-content .staff-guide-step { display: flex; grid-template-columns: none; gap: 12px; }
}

/* Presentation release: concise setup guidance, with visible ownership. */
.setup-readiness { margin-top:24px; }
.setup-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.setup-heading h2 { margin:4px 0 10px; }
.setup-heading p { max-width:760px; }
.setup-progress { white-space:nowrap; padding:8px 12px; border-radius:6px; background:#edf2f6; color:#18344b; font-weight:700; font-size:13px; }
.setup-next { padding:14px 16px; background:#fff6e6; border-left:3px solid #9b6b20; color:#493615; }
.setup-next a { display:block; margin-top:5px; text-decoration:underline; color:inherit; }
.setup-readiness summary { padding:12px 0; cursor:pointer; font-weight:650; }
.setup-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.setup-item { display:block; padding:18px; border:1px solid #d9dfdf; border-radius:8px; background:#fff; color:#203344; text-decoration:none; }
.setup-item:hover,.setup-item:focus-visible { border-color:#506a82; outline-offset:3px; }
.setup-item h3 { font-size:17px; margin:12px 0 8px; }.setup-item p { font-size:13px; line-height:1.5; margin:0 0 12px; }.setup-item small { font-size:11px; }
.setup-status { font-size:11px; font-weight:700; color:#176142; }.setup-status.is-needed { color:#815219; }
@media(max-width:1000px){.setup-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.setup-heading{display:block}.setup-progress{display:inline-block;margin:8px 0}.setup-grid{grid-template-columns:1fr}.setup-item{padding:15px}}

.staff-advanced{padding:14px 16px;background:#f4f6f7;border:1px solid #d7dfe5;border-radius:6px}
.staff-advanced summary{cursor:pointer;font-weight:650}.staff-advanced p{font-size:13px;line-height:1.5}
.staff-advanced label{display:block;margin-top:12px}.staff-advanced textarea{min-height:90px;width:100%;font-family:monospace}
[data-choice-search]{margin-bottom:6px!important}[data-staff-form] select{width:100%;min-width:0}

/* Phase 3 visual carry-forward: comfortable named controls and primary actions. */
form[data-staff-form] input:not([type=hidden]), form[data-staff-form] select, form[data-staff-form] textarea { width:100%; min-height:42px; padding:9px 11px; border:1px solid #bbc8d5; border-radius:6px; background:#fff; color:#17324d; font:inherit; box-sizing:border-box; }
form[data-staff-form] label { display:flex; flex-direction:column; gap:6px; min-width:0; }
form[data-staff-form] button.button { min-height:44px; padding:10px 16px; border-radius:6px; background:#102553; color:#fff; font-weight:700; }
form[data-staff-form] input:focus-visible, form[data-staff-form] select:focus-visible, form[data-staff-form] textarea:focus-visible { outline:3px solid #c4a462; outline-offset:2px; }

.table-wrap[data-scrollable]::before, .table-scroll[data-scrollable]::before { content:'Scroll horizontally to view all columns →'; display:block; position:sticky; left:0; width:fit-content; padding:6px 0; font-size:12px; color:#596777; }
.table-wrap:focus-visible, .table-scroll:focus-visible { outline:2px solid #a47a2b; outline-offset:3px; }
@media (max-width:700px) { .app-brand-copy small { display:block; font-size:9px; } }
