/* CP10-B: Request-only controls. Inherit the established 0007/7.5 tokens and compact style.
   No global theme, navigation, Home, Builder, Staff, or retirement overrides. */
.sw-request-workbench{position:sticky;top:3.5rem;z-index:7;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 0;margin:12px 0;border:0;border-block:1px solid var(--line);border-radius:0;background:var(--surface);box-shadow:none;color:var(--ink)}
.sw-request-workbench-context{display:grid;gap:2px;min-width:0}
.sw-request-workbench-context strong{font-size:13px;overflow-wrap:anywhere}
.sw-request-workbench-context span{font-size:12px;color:var(--muted)}
.sw-request-workbench-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sw-request-workbench-actions button{min-height:40px}
.sw-request-workbench-actions #swlor-request-finalize:not(:disabled){border-color:var(--accent)}
.sw-request-workbench :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:700px){.sw-request-workbench{top:3rem;padding:9px 0;gap:8px}.sw-request-workbench-actions{width:100%}.sw-request-workbench-actions button{flex:1 1 120px}}
@media(prefers-reduced-motion:reduce){.sw-request-workbench{scroll-behavior:auto}}

/* CP10-B3: local Request guidance and failed-save recovery reuse 0007 theme tokens. */
.sw-request-row-guidance{margin:7px 0;padding:0 2px;line-height:1.45}.sw-request-row-guidance p{margin:3px 0}.sw-request-workbench-error{flex-basis:100%;margin:0;padding:8px 10px;border-left:2px solid var(--accent);border-radius:6px;background:var(--field);color:var(--ink)}.sw-request-workbench-error[hidden]{display:none}

/* CP11 uses 0007/7.5 navy/mint tokens; scope to Requests worklist and returned items only. */
.sw-request-worklist{display:grid;gap:0;margin-top:12px}
/* Only these Request wrappers override the theme's shared card/detail fills. */
#swlor-build-calculator .sw-request-worklist-group{border:0;border-top:1px solid var(--line);border-radius:0;padding:10px 0;margin:0;background:transparent!important}
.sw-request-worklist-group>summary{color:var(--accent);font-weight:650;cursor:pointer;min-height:40px;padding:8px 2px}.sw-request-worklist-group>p{margin:2px 2px 9px}
#swlor-build-calculator .sw-request-worklist-card{min-width:0;margin:0;padding:12px 2px;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent!important;box-shadow:none}
.sw-request-worklist-card h4{margin:0 0 4px}.sw-request-worklist-card .viz-row{gap:8px}.sw-request-returned-reason{border-left:3px solid var(--accent);border-radius:8px;background:var(--field);margin:9px 0;padding:9px 12px;font-size:13px}.sw-request-returned-reason p{margin:5px 0 0}.sw-request-worklist :focus-visible,.sw-request-returned-reason :focus-visible{outline:2px solid var(--accent);outline-offset:3px}@media(max-width:700px){.sw-request-worklist-card .viz-row{width:100%;flex-wrap:wrap}.sw-request-worklist-card .viz-row button{flex:1 1 128px}}

/* CP11-B: Request-only progressive disclosure; core 7/7.5 components unchanged. */
#swlor-build-calculator .sw-request-disclosure:not([data-summary-detail]):not([data-request-general-evidence]){border:0;border-top:1px solid var(--line);border-radius:0;padding:8px 0;margin:10px 0;background:transparent!important}
.sw-request-disclosure>summary{cursor:pointer;min-height:40px;padding:7px 2px;color:var(--accent);font-weight:600}
.sw-request-disclosure>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.sw-request-disclosure>label{margin:9px 0}.sw-request-disclosure p{overflow-wrap:anywhere}
.sw-request-entry-compact{padding:0;border:0;background:none;margin:0}.sw-request-entry-compact>.viz-row:has(>[hidden]:only-child){display:none}
#swlor-build-calculator .sw-request-options{margin:0}.sw-request-options>button{margin-top:0}
.sw-request-rules{flex-basis:100%;min-width:0;width:100%;margin:8px 0}
.sw-request-setup>[data-request-browse]{max-width:24rem;margin:10px 0}
#swlor-requests-list .sw-case-filters>[data-request-browse]{min-width:180px}
[data-request-editing="true"]>#swlor-request-back{margin-bottom:9px}
[data-request-editing="true"] #swlor-requests-auth{display:none}
#swlor-panel-requests:not(.sw-inline-request)[data-request-setup-open="true"] #swlor-request-editor{display:none}
[data-request-disclosure="review"]>.text-muted{margin-top:9px}
.sw-request-correction-focus{margin:8px 0 12px;padding:9px 12px;border-left:3px solid var(--accent);background:var(--field);border-radius:8px;font-size:13px}
.sw-request-action-readiness{flex-basis:100%;font-size:12px}.sw-request-action-readiness[hidden]{display:none}
#swlor-build-calculator .sw-request-action-readiness .sw-request-disclosure{margin:0;padding:0 2px;border:0;background:transparent!important}
.sw-request-blocker-links{padding-left:16px;margin:2px 0}.sw-request-blocker-links button{text-align:left;white-space:normal;padding:6px;min-height:36px}
/* Requested abilities are sections of the same sheet. Evidence and readiness
   warnings keep their existing boundaries; returned items retain an accent rule. */
#swlor-build-calculator #swlor-request-editor .sw-request-card{border:0;border-top:1px solid var(--line);border-radius:0;padding:16px 0 0;margin:18px 0 0;background:transparent!important;box-shadow:none}
#swlor-build-calculator #swlor-request-editor .sw-request-card[data-returned-correction="true"]{border-inline-start:3px solid var(--accent)!important;padding-inline-start:12px}
#swlor-build-calculator #swlor-request-editor [data-request-locked]>.sw-request-card{border-top:0;margin-top:0;padding-top:6px}
#swlor-build-calculator #swlor-request-review{border:0;border-radius:0;padding:0;background:transparent!important;box-shadow:none}
#swlor-request-editor .sw-request-workbench{top:var(--request-sticky-offset,3.5rem)}
#swlor-request-editor .sw-request-keyboard-open{position:static}
#swlor-request-editor input,#swlor-request-editor textarea,#swlor-request-editor select{scroll-margin-top:calc(var(--request-sticky-offset,3.5rem) + 160px)}
@media(max-width:700px){#swlor-build-calculator .sw-request-disclosure{padding:6px 0}.sw-request-disclosure>summary{min-height:44px}.sw-request-action-readiness{width:100%}.sw-request-workbench-context strong{font-size:12px}.sw-request-workbench-actions button{min-height:44px}.sw-request-options .sw-request-grid{grid-template-columns:1fr}}

/* Familiar inbox -> case workspace. The page owns vertical scrolling. */
#swlor-request-editor[data-request-case] { min-width:0; max-height:none; overflow:visible; }
#swlor-request-editor [data-request-phase][hidden],#swlor-request-editor [data-request-section][hidden],#swlor-request-editor [hidden],#swlor-requests-list[hidden]{display:none!important}
#swlor-request-editor[data-request-case="standalone"] .sw-request-workbench{margin:0 0 12px;padding:8px 0;border-top:0;box-shadow:none}
#swlor-request-editor[data-request-case="standalone"] .sw-request-workbench-context:has(>[hidden]:only-child){display:none}
#swlor-request-editor[data-request-case="standalone"] .sw-request-card h4{font-size:14px}
#swlor-request-editor fieldset{min-width:0;border:0;padding:0;margin:0}
.sw-request-more{position:relative;align-self:center;flex:0 0 auto;max-width:100%;border:0!important;padding:0!important;margin:0!important;background:transparent!important}
.sw-request-more>summary{cursor:pointer;min-height:40px;padding:9px 12px;border:1px solid var(--line);border-radius:7px;color:var(--accent);font-weight:600;white-space:nowrap;box-sizing:border-box}
.sw-request-more>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.sw-request-more[open]{z-index:20}
.sw-request-more[open]>div{position:absolute;inset-inline-end:0;top:calc(100% + 6px);display:grid;gap:3px;width:max-content;min-width:13rem;max-width:min(20rem,calc(100vw - 48px));margin:0;padding:6px;border:1px solid var(--line);border-radius:8px;background:var(--surface,var(--panel));box-shadow:0 8px 24px #0004;box-sizing:border-box}
.sw-request-more[open]>div>.btn{width:100%;min-height:40px;margin:0;text-align:start;white-space:normal;border-color:transparent;flex:none}
.sw-request-more[open]>div>.btn:hover,.sw-request-more[open]>div>.btn:focus-visible{border-color:var(--line);background:var(--field)}
.sw-request-summary-item{padding:16px 18px;margin:12px 0;border:1px solid var(--line);border-radius:12px;min-width:0;background:var(--surface,var(--panel))}
.sw-request-summary-item>.sw-request-disclosure{padding:0;margin:8px 0 0;border:0;background:transparent!important}
.sw-case-workspace [data-request-general-evidence]{padding:18px;margin:16px 0;border:1px solid var(--line);border-radius:14px;background:var(--surface,var(--panel))}
.sw-request-summary-item h4{margin:0 0 6px;font-size:15px}
.sw-request-summary-item .sw-section-heading{align-items:baseline}
.sw-request-summary-item .sw-grant-detail-list{margin:8px 0 0}
.sw-request-summary-item dd,.sw-request-preserve-lines{white-space:pre-wrap;overflow-wrap:anywhere}
.sw-request-public-feedback{margin:8px 0;border-left:3px solid var(--accent);padding-left:10px;white-space:pre-wrap}
.sw-request-message{padding:12px 0;border-bottom:1px solid var(--line)}
.sw-request-message p{margin:0 0 6px}
.sw-request-message time,.sw-request-timeline time{font-size:12px;color:var(--muted);margin-inline-start:12px}
.sw-request-timeline{list-style:none;margin:0;padding:0}
.sw-request-timeline li{padding:12px 0;border-bottom:1px solid var(--line)}
.sw-request-timeline li p{margin:7px 0 0}
.sw-inline-request .sw-case-back{display:none}
#swlor-request-editor [data-request-section="review"] .sw-request-readiness{margin:14px 0}
#swlor-request-editor[data-request-case="integrated"]>.sw-request-workbench{position:static}
@media(max-width:700px){.sw-request-more>summary,.sw-request-more[open]>div>.btn{min-height:44px}.sw-request-more{flex:0 1 auto}.sw-request-message time,.sw-request-timeline time{display:block;margin:3px 0}.sw-request-summary-item .sw-section-heading{display:block}.sw-case-list-row h4{font-size:15px}}

/* Case actions share the normal page flow with the case header and tabs. */
#swlor-request-editor[data-case-workspace] .sw-request-workbench{position:static;top:auto}

#swlor-request-editor[data-case-workspace],.sw-retirement [data-retirement-editor]{scroll-margin-top:calc(var(--request-sticky-offset,3.5rem) + 12px)}

/* Keep the request header compact and put optional guidance behind Show rules. */
#swlor-request-editor .sw-case-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;padding-block:10px}
#swlor-request-editor .sw-case-header>.sw-case-back{grid-column:1/-1;justify-self:start;margin:0}
#swlor-request-editor .sw-case-header>.sw-case-type{grid-column:1;margin:0;font-size:12px}
#swlor-request-editor .sw-case-header>.sw-case-title{grid-column:1;margin:0;font-size:22px;line-height:1.25}
#swlor-request-editor .sw-case-header>.sw-case-meta{grid-column:1;gap:8px}
#swlor-request-editor .sw-case-header>.sw-case-next{grid-column:1/-1;margin:2px 0 0}
#swlor-request-editor .sw-request-rules{grid-column:2;grid-row:1/4;align-self:start;margin:0;width:auto;min-width:0}
#swlor-request-editor .sw-request-rules:has([data-review-rules-panel]:not([hidden])){grid-column:1/-1;grid-row:auto;width:100%}
#swlor-request-editor .sw-request-workbench{gap:8px;margin-block:4px 10px;padding-block:8px}
#swlor-request-editor .sw-request-add-actions{margin:10px 0;gap:8px;flex-wrap:wrap}
#swlor-request-editor .sw-request-slot-opportunities{margin-top:8px;border:1px solid #73c698;border-radius:8px;padding:10px 12px;background:color-mix(in srgb,#45ab70 13%,var(--surface));color:var(--ink)}
#swlor-request-editor .sw-request-slot-opportunities strong{color:var(--ink)}
#swlor-request-editor .sw-request-slot-opportunities p{margin:5px 0 0;line-height:1.4}
#swlor-request-editor [data-request-guidance]>[data-request-help]{margin:4px 10px}
@media(max-width:700px){#swlor-request-editor .sw-case-header{gap:6px 8px}#swlor-request-editor .sw-case-header>.sw-case-title{font-size:20px}#swlor-request-editor .sw-request-add-actions button{flex:1 1 130px}#swlor-request-editor .sw-request-add-actions>span{flex-basis:100%}#swlor-request-editor .sw-request-workbench-actions .sw-request-more{width:auto}}

/* One compact inbox toolbar; a case owns its own header and Actions dropdown. */
#swlor-build-calculator [data-request-toolbar="true"] .sw-request-setup{padding:0;margin:0 0 14px;border:0;background:transparent!important}
#swlor-build-calculator [data-request-toolbar="true"] .sw-request-setup[hidden],#swlor-build-calculator .sw-request-entry-toolbar>[hidden]{display:none!important}
.sw-request-entry-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.sw-request-entry-toolbar>.sw-section-heading{display:contents}
.sw-request-entry-toolbar>.sw-section-heading>h2{order:0;flex:1 1 auto;margin:0;font-size:18px}
.sw-request-entry-toolbar>.viz-row{order:1;margin:0}
.sw-request-entry-toolbar>[data-request-entry-rules]{order:2;flex:0 0 auto;width:auto;margin:0}
.sw-request-entry-toolbar>.sw-section-heading>.btn{order:3}
.sw-request-entry-toolbar:has([data-review-rules-panel]:not([hidden]))>[data-request-entry-rules]{order:4;flex-basis:100%;width:100%}
[data-request-toolbar="true"] #swlor-requests-workspace>h3{display:none}
[data-request-toolbar="true"] #swlor-requests-status:empty{display:none}
[data-request-toolbar="true"] [data-cp9-form]:not([hidden]){margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--surface,var(--panel))}
#swlor-request-editor .sw-case-header>.sw-case-back{grid-column:1;min-height:32px;padding:2px 0}
#swlor-request-editor .sw-case-chrome{margin-bottom:12px}
#swlor-request-editor .sw-request-workbench-context{flex:1 1 8rem}
#swlor-request-editor .sw-request-action-readiness{padding:0;line-height:1.35}
#swlor-request-editor .sw-request-action-readiness>.btn{min-height:28px;padding:3px 0;border-color:transparent;white-space:normal;text-align:start}
/* Wrap whole action controls at their label width instead of wrapping their text
   inside fixed narrow cells. This also keeps Save and Continue compact on phones. */
@media(max-width:700px){.sw-request-entry-toolbar>.sw-section-heading>h2{flex-basis:100%}.sw-request-entry-toolbar .btn{min-height:44px}.sw-request-entry-toolbar>.viz-row{flex:1 1 auto}.sw-request-workbench-actions>button{flex:1 1 auto;white-space:nowrap}.sw-request-workbench-actions>.sw-request-more{margin-inline-start:auto!important}#swlor-request-editor .sw-request-action-readiness>.btn{min-height:36px}}
@media(max-width:820px){.sw-request-list-actions>.sw-request-more,.sw-request-list-actions>.sw-retirement-menu{margin-inline-start:auto!important}}
