/* Assessment workspace presentation only.
 * Keep assessment state, eligibility, confidence and all event/ID contracts in
 * their existing modules. No generated content represents a case decision.
 * This stylesheet is deliberately loaded only by action-center.html.
 */
body:has(.action-page) {
  --focus: #125568;
  --aw-border: #7b919b;
  --aw-soft: #e7f2f2;
  --aw-surface: var(--panel, #fff);
  --aw-radius: 12px;
  background: var(--bg, #f4f7f9);
}
.action-page { max-width: 1680px; padding: 20px 24px 32px; margin: 0 auto; }
.action-page, .action-page * { box-sizing: border-box; }
.action-page [hidden] { display: none !important; }
.action-page .brief-head { align-items: center; gap: 16px; margin: 0 0 16px; }
.action-page h1.has-page-icon { font-size: 30px; line-height: 1.2; gap: 10px; margin: 0 0 6px; }
.action-page .page-icon { width: 34px; height: 34px; border-radius: 9px; box-shadow: none; }
.action-page .intro { font-size: 15px; line-height: 1.5; margin: 0; max-width: 72ch; }
.action-page .brief-head > .row { gap: 8px; flex-wrap: wrap; }
.action-page .brief-head .act { font-size: 13px; padding: 8px 12px; }

/* Preserve exploration scope and live storage/error feedback; compress the
 * surrounding chrome, not the evidence or the account's actual scope. */
body:has(.action-page) .workspace-shell {
  max-width: 1680px; padding: 10px 24px; border-bottom: 1px solid var(--line);
  display: block;
  background: var(--aw-surface);
}
body:has(.action-page) .workspace-scope { gap: 5px 8px; }
body:has(.action-page) .workspace-eyebrow { font-size: 11px; letter-spacing: .06em; }
body:has(.action-page) .workspace-chip { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
body:has(.action-page) .workspace-scope-help { flex-basis: 100%; font-size: 12px; line-height: 1.4; }
body:has(.action-page) .workspace-journey { margin-top: 8px; justify-content: flex-start; gap: 6px 10px; }
/* ui-refresh uses important declarations for these links site-wide. */
body:has(.action-page) .workspace-step { padding: 5px 8px !important; min-height: 32px; border-radius: 6px !important; font-size: 12px !important; }
body:has(.action-page) .workspace-change { min-height: 32px; padding: 5px 8px; font-size: 12px; border-radius: 6px; }
body:has(.action-page) .workspace-overview { padding: 5px 8px; font-size: 12px; }
body:has(.action-page) .workspace-feedback { grid-column: 1 / -1; margin: 0; font-size: 12px; gap: 5px 12px; }
body:has(.action-page) .workspace-state-detail { flex: 0 1 auto; }

/* Every control retains its existing label, value, enabled state and handler. */
.action-page :is(input, select, textarea, button) { font: inherit; }
.action-page :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  border: 1px solid var(--aw-border); border-radius: 8px; padding: 9px 11px;
  color: var(--ink); background-color: var(--aw-surface); min-height: 42px; max-width: 100%;
}
.action-page textarea { line-height: 1.5; resize: vertical; }
.action-page input:is([type=checkbox], [type=radio]) { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.action-page :is(button, .act) { min-height: 40px; border-radius: 8px; }
.action-page :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: none;
}
.action-page :is(button, input, select, textarea):disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }
.action-page button:disabled { border: 1px dashed var(--muted); background: var(--aw-surface); color: var(--muted); }
.action-page #privacy-note { margin: 10px 0; font-size: 13px; line-height: 1.5; }
.action-page #notice:empty { display: none; }
.action-page #notice { margin: 8px 0; }
.action-page .action-filters { display: grid; grid-template-columns: 1.2fr 1fr .8fr 1fr 1.4fr auto; gap: 12px; margin: 12px 0; align-items: end; }
.action-page .action-filters .action-field { min-width: 0; gap: 5px; font-size: 12px; font-weight: 700; }
.action-page .action-filters :is(input, select) { font-size: 14px; font-weight: 400; }
.action-page .ac-tabs { margin: 0; border-bottom: 1px solid var(--line); }
.action-page .ac-tabs [role=tab] { min-height: 44px; padding: 9px 16px; border-radius: 0; }
.action-page .ri-training-banner { border-width: 1px; border-radius: 8px; margin: 0 0 12px; padding: 7px 12px; font-size: 14px; }

/* Keep all queues available without turning each count into a large KPI card. */
.action-page .ri-queue-bar { align-items: center; gap: 8px; }
.action-page .ri-chips { gap: 6px; flex: 1 1 auto; }
.action-page .ri-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; min-height: 40px; }
.action-page .ri-chip-label { font-size: 13px; }
.action-page .ri-chip-count { font-size: 12px; white-space: normal; }
.action-page .ri-chip-count b { font-size: 13px; }
.action-page #queue-summary { margin: 10px 0 0; font-size: 13px; }
.action-page .ri-coverage { font-size: 12px; margin: 4px 0 0; }
.action-page .ri-coverage a { min-height: 24px; padding: 2px 4px; border: 0; border-radius: 4px; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.action-page #candidates:empty { display: none; }
.action-page #candidates > details { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--aw-surface); }

/* Queue and selected record form one stable workspace. */
.action-page .action-layout { grid-template-columns: 264px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.action-page #case-list { border: 1px solid var(--line); border-radius: var(--aw-radius); background: var(--aw-surface); min-width: 0; overflow: clip; }
.action-page #case-list > h2 { font-size: 18px; line-height: 1.4; padding: 16px; margin: 0; border-bottom: 1px solid var(--line); }
.action-page .action-case { border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; border-radius: 0; margin: 0; padding: 14px 12px; gap: 6px; box-shadow: none; min-height: 44px; }
.action-page .action-case:last-child { border-bottom: 0; }
.action-page .action-case.selected { border-left-color: var(--brand); background: var(--aw-soft); }
.action-page.ri-training .action-case.selected { border-left-color: var(--ri-train); }
.action-page .action-case:hover { background: var(--brand-soft); }
.action-page .action-case:focus-visible { outline-offset: -4px; }
.action-page .action-case strong { font-size: 15px; line-height: 1.4; }
.action-page .action-case :is(.meta, .hint, .ri-case-queues) { font-size: 12px; line-height: 1.5; color: var(--muted); }
.action-page #case-list > .empty { margin: 0; padding: 20px 16px; font-size: 14px; }
.action-page #case-detail { padding: 20px; background: var(--aw-surface); border: 1px solid var(--line); border-radius: var(--aw-radius); }
.action-page #case-detail > h2 { font-size: 24px; line-height: 1.3; margin: 0; letter-spacing: -.02em; }
.action-page .ri-case-tabs { margin: 12px 0 16px; gap: 2px; }
.action-page .ri-case-tabs [role=tab] { padding: 10px 12px; font-size: 14px; }
.action-page .ri-case-panel { min-width: 0; }
.action-page .ri-case-panel > :first-child { margin-top: 0; }
.action-page .ri-facts { font-size: 14px; gap: 8px 16px; }
.action-page .ri-facts dt { color: var(--ink); }
.action-page .ri-facts dd { line-height: 1.5; }
.action-page :is(.action-form, .action-evidence, .ia-panel) { border-radius: 10px; box-shadow: none; padding: 16px; margin: 16px 0; }
.action-page :is(h3, .ia-panel h3) { font-size: 18px; line-height: 1.4; }
.action-page :is(.action-form, .ia-panel) label { font-size: 14px; line-height: 1.5; }
.action-page :is(.hint, .ri-review-note) { line-height: 1.5; }
.action-page :is(th, td) { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.action-page .ri-no-case { padding: 64px 24px; text-align: center; margin: 0; }

/* Claude's six-slot summary is restyled, never synthesized or reinterpreted. */
.action-page .aa-strip { background: var(--brand-soft); border: 0; padding: 16px; border-radius: 10px; }
.action-page .aa-strip dt { font-size: 12px; text-transform: none; letter-spacing: 0; line-height: 1.5; }
.action-page .aa-strip dd { font-size: 14px; line-height: 1.5; }
.action-page .aa-strip .aa-slot-confidence dd { font-style: normal; }
.action-page .aa-strip .aa-strip-wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.action-page .aa-strip .aa-strip-narrow { display: none; }

/* Ask PV Info uses the shared floating launcher and mobile safe-area styles.
 * Keep the existing deliverables clearance from ri-workspace.css. */

@media (max-width: 1179px) {
  body:has(.action-page) .workspace-shell { grid-template-columns: 1fr; }
  .action-page .action-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .action-page .action-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-page #case-detail { padding: 16px; }
  .action-page .aa-strip { margin: 12px 0; }
}
@media (max-width: 760px) {
  .action-page { padding: 16px 12px 24px; }
  .action-page .brief-head { display: block; }
  .action-page .brief-head > .row { margin-top: 12px; }
  .action-page h1.has-page-icon { font-size: 26px; }
  body:has(.action-page) .workspace-shell { padding: 10px 12px; }
  body:has(.action-page) .workspace-step { min-height: 44px; }
  .action-page .action-layout { grid-template-columns: minmax(0, 1fr); }
  .action-page .action-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-page .action-filters .action-field { min-width: 0; }
  .action-page #case-detail { padding: 14px; }
  .action-page #case-detail > h2 { font-size: 21px; }
  .action-page .aa-strip .aa-strip-wide { display: none; }
  .action-page .aa-strip .aa-strip-narrow { display: block; }
  .action-page .aa-strip .aa-strip-narrow > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .action-page .ri-primary { position: static; }
  .action-page :is(.action-form, .action-evidence, .ia-panel) { padding: 12px; }
  .action-page :is(input:not([type=checkbox]):not([type=radio]), select, button, .act) { min-height: 44px; }
}
@media (max-width: 600px) {
  body:has(.action-page) .workspace-step { padding: 6px 2px !important; font-size: 11px !important; }
  .action-page .ri-chips { display: none; }
  .action-page .action-filters { grid-template-columns: minmax(0, 1fr); }
  .action-page .ri-case-tabs [role=tab] { padding: 10px; }
}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */
  :where([data-theme="dark"]) body:has(.action-page) { --focus: #8bd1d8; --aw-border: #839aa5; --aw-soft: #173b45; }
@media (prefers-color-scheme: dark){
  :where(:not([data-theme])) body:has(.action-page) { --focus: #8bd1d8; --aw-border: #839aa5; --aw-soft: #173b45; }
}
:root[data-theme=dark] body:has(.action-page) { --focus: #8bd1d8; --aw-border: #839aa5; --aw-soft: #173b45; }
:root[data-theme=light] body:has(.action-page) { --focus: #125568; --aw-border: #7b919b; --aw-soft: #e7f2f2; }

/* Phase 3: a scoped toolbar, searchable queue, and persistent next-step rail. */
body .action-page{padding-top:14px}
body .action-page .brief-head{margin-bottom:12px}
body .action-page .action-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}
body .action-page .ri-chips{display:none}
body .action-page .ri-queue-select-wrap{display:grid;gap:4px;flex:0 1 320px;font-size:12px}
body .action-page .ri-queue-select-wrap select{width:100%;min-width:0}
body .action-page .ri-queue-bar{gap:10px;align-items:end}
body .action-page .ri-filter-chips{padding-left:0;border:0}
body .action-page #queue-summary{margin-top:6px}
body .action-page .action-layout{grid-template-columns:300px minmax(0,1fr);gap:14px;margin-top:12px}
body .action-page .assessment-queue{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}
body .action-page .assessment-queue>h2{font-size:18px;padding:14px 14px 8px;margin:0}
body .action-page .assessment-queue-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0 12px 12px;border-bottom:1px solid var(--line);align-items:end}
body .action-page .assessment-queue-filters>.action-field:first-child{grid-column:1 / -1}
body .action-page .assessment-queue-filters .action-field{min-width:0;font-size:12px;gap:4px}
body .action-page .assessment-queue-filters :is(input,select){min-width:0;width:100%;font-size:13px}
body .action-page .assessment-queue-filters .act{padding:8px;font-size:12px}
body .action-page #case-list{border:0;border-radius:0}
body .action-page #case-list>h2{padding:10px 14px;font-size:13px;color:var(--muted)}
body .action-page .action-case{padding:12px 10px;gap:4px}
body .action-page #case-detail{padding:16px;min-width:0;border-radius:10px}
body .action-page .assessment-case-meta{font-size:12px;color:var(--muted);margin:6px 0 10px;overflow-wrap:anywhere}
body .action-page .assessment-context{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:8px 14px;background:var(--brand-soft);padding:14px;border-radius:8px;margin:10px 0}
body .action-page .assessment-context>h3{grid-column:1 / -1;font-size:16px;margin:0}
body .action-page .assessment-context .aa-strip{padding:0;margin:0;background:transparent;border:0}
body .action-page .assessment-context .aa-strip-wide{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body .action-page .assessment-next h3{font-size:14px;margin:0 0 8px}
body .action-page .assessment-next .ri-primary{margin:0;padding:0;background:transparent;border:0;position:static}
body .action-page .assessment-next .ri-primary-btn{width:100%;white-space:normal;min-height:44px;justify-self:stretch}
body .action-page .assessment-next .ri-review-note{font-size:12px;margin:4px 0 0}
body .action-page .ri-case-tabs{margin:10px 0 12px}
body .action-page .ri-case-tabs [role=tab]{font-size:13px;padding:9px 10px}
body .action-page .ri-facts{gap:0;border:1px solid var(--line);border-radius:6px;overflow:hidden}
body .action-page .ri-facts :is(dt,dd){padding:7px 10px;border-bottom:1px solid var(--line);margin:0;font-size:13px}
body .action-page .ri-facts dt{background:var(--brand-soft)}
body .action-page .ri-facts :is(dt,dd):nth-last-child(-n+2){border-bottom:0}
body .action-page :is(.action-form,.action-evidence,.ia-panel){padding:12px;margin:12px 0}
@media(min-width:761px){body .action-page #case-list{max-height:650px;overflow:auto}}
@media(min-width:1180px){
 body .action-page #case-detail:not(:has(.ri-no-case)){display:grid;grid-template-columns:minmax(0,1fr) 240px;grid-template-areas:'title title' 'tag tag' 'meta meta' 'tabs tabs' 'content context';column-gap:16px;align-items:start}
 body .action-page #case-detail>h2{grid-area:title}
 body .action-page #case-detail>.ri-training-tag{grid-area:tag;justify-self:start;margin:8px 0 0}
 body .action-page #case-detail>.assessment-case-meta{grid-area:meta}
 body .action-page #case-detail>.ri-case-tabs{grid-area:tabs}
 body .action-page #case-detail>.ri-case-panel{grid-area:content}
 body .action-page #case-detail>.assessment-context{grid-area:context;display:block;margin:0;position:sticky;top:calc(92px + var(--ri-banner-h,0px))}
 body .action-page .assessment-context>.aa-strip{margin-top:10px}
 body .action-page .assessment-context .aa-strip-wide{grid-template-columns:minmax(0,1fr);gap:10px}
 body .action-page .assessment-next{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
 /* Wide editing tables retain the full case width. Summary and next step remain above them. */
 body .action-page #case-detail:has(#ctab-deliverables-panel:not([hidden])),
 body .action-page #case-detail:has(#ctab-implementation-panel:not([hidden])){display:block}
 body .action-page #case-detail:has(#ctab-deliverables-panel:not([hidden]))>.assessment-context,
 body .action-page #case-detail:has(#ctab-implementation-panel:not([hidden]))>.assessment-context{position:static;display:grid;grid-template-columns:minmax(0,1fr) 240px;margin-top:10px}
 body .action-page #case-detail:has(#ctab-deliverables-panel:not([hidden])) .aa-strip-wide,
 body .action-page #case-detail:has(#ctab-implementation-panel:not([hidden])) .aa-strip-wide{grid-template-columns:repeat(3,minmax(0,1fr))}
 body .action-page #case-detail:has(#ctab-deliverables-panel:not([hidden])) .assessment-next,
 body .action-page #case-detail:has(#ctab-implementation-panel:not([hidden])) .assessment-next{margin:0;padding:0;border:0}
}
@media(min-width:761px) and (max-width:1179px){body .action-page .action-layout{grid-template-columns:260px minmax(0,1fr)}body .action-page .assessment-context{grid-template-columns:minmax(0,1fr)}body .action-page .assessment-next{border-top:1px solid var(--line);padding-top:10px}}
@media(max-width:760px){
 body .action-page .action-layout{grid-template-columns:minmax(0,1fr)}
 body .action-page .ri-case-open .assessment-queue{display:none}
 body .action-page .assessment-context{grid-template-columns:minmax(0,1fr);padding:12px}
 body .action-page .action-filters{grid-template-columns:minmax(0,1fr)}
 body .action-page .assessment-next{border-top:1px solid var(--line);padding-top:10px}
 body .action-page .ri-facts{grid-template-columns:minmax(0,1fr)}
 body .action-page .ri-facts dt{border:0}
}
