/* PEX-004: quiet documents, visible task context and normal page scrolling. */
#ifd-provider-return {
  --pr-navy: #071426; --pr-blue: #185fa5; --pr-line: #ccd4dc;
  --pr-text: #1b232e; --pr-muted: #53616e;
  background: #f4f6f8; color: var(--pr-text); font: 16px/1.55 Inter, system-ui, sans-serif;
  min-height: 100vh; width: 100%;
}
#ifd-provider-return *, #ifd-provider-return *::before, #ifd-provider-return *::after { box-sizing: border-box; }
#ifd-provider-return button, #ifd-provider-return input { font: inherit; }
#ifd-provider-return button { cursor: pointer; }
#ifd-provider-return button:disabled { cursor: not-allowed; opacity: .5; }
#ifd-provider-return button:focus-visible, #ifd-provider-return input:focus-visible,
#ifd-provider-return a:focus-visible, #ifd-provider-return [tabindex="-1"]:focus {
  outline: 3px solid var(--pr-blue); outline-offset: 3px;
}
#ifd-provider-return a { color: var(--pr-blue); text-decoration: underline; }
.pr-top { align-items: center; background: var(--pr-navy); color: #fff; display: flex; gap: 20px; padding: 16px 24px; }
.pr-top > div:first-child { display: grid; gap: 3px; margin-right: auto; }
#ifd-provider-return .pr-top a { color: #d9e7f4; font-size: 14px; width: fit-content; }
.pr-top span { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.pr-top strong { font-size: 19px; }
.pr-top > button { background: transparent; border: 1px solid #a7b4c2; border-radius: 4px; color: #fff; min-height: 44px; padding: 8px 12px; }
.pr-overall { display: grid; min-width: 62px; text-align: center; }
.pr-mobile-switch { display: none; }
.pr-workspace { align-items: start; display: grid; gap: 24px; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); margin: auto; max-width: 1600px; padding: 24px; }
.pr-evidence-pane, .pr-task-pane { min-width: 0; }
.pr-bundle { background: #fff; border: 1px solid var(--pr-line); border-radius: 5px; }
.pr-bundle-head { align-items: center; display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.pr-bundle-head > div { display: grid; }
.pr-bundle-head span, .pr-bundle-head small { color: var(--pr-muted); font-size: 12px; }
.pr-bundle nav { border-top: 1px solid var(--pr-line); border-bottom: 1px solid var(--pr-line); display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.pr-bundle nav button { background: #fff; border: 1px solid var(--pr-line); border-radius: 3px; color: var(--pr-text); font-size: 13px; min-height: 44px; padding: 8px 10px; }
.pr-bundle nav button[aria-current="page"] { background: var(--pr-blue); border-color: var(--pr-blue); color: #fff; }
.pr-document-scroll { padding: 20px; }
.pr-document { background: #fff; border: 1px solid var(--pr-line); margin: 0 auto; max-width: 920px; }
.pr-document > header { border-bottom: 2px solid var(--pr-navy); display: grid; gap: 6px; padding: 18px; }
.pr-document > header span { color: var(--pr-muted); font-size: 12px; text-transform: uppercase; }
.pr-document > header strong { font-size: 18px; }
.pr-document > footer { border-top: 1px solid var(--pr-line); color: var(--pr-muted); font-size: 12px; padding: 12px 16px; }
.pr-provenance { border-bottom: 1px solid var(--pr-line); display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 16px; }
.pr-provenance strong { flex-basis: 100%; font-size: 12px; text-transform: uppercase; }
.pr-provenance span { color: var(--pr-muted); font-size: 12px; }
.pr-cover { border-bottom: 1px solid var(--pr-line); padding: 16px; }
.pr-cover > strong { font-size: 14px; }
.pr-cover p, .pr-qualification p { font-family: 'Source Serif 4', Georgia, serif; font-size: 16px; line-height: 1.55; margin: 6px 0; }
.pr-cover .noise { color: var(--pr-muted); }
.pr-table-wrap { overflow-x: auto; }
.pr-document table { border-collapse: collapse; font-size: 13px; min-width: 690px; width: 100%; }
.pr-document th { background: #f5f6f7; font-size: 11px; padding: 10px; text-align: left; text-transform: uppercase; }
.pr-document td { border-top: 1px solid var(--pr-line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: 12px 10px; white-space: nowrap; }
.pr-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 0; }
.pr-field { border-bottom: 1px solid var(--pr-line); min-width: 0; padding: 14px 16px; }
.pr-field:nth-child(odd) { border-right: 1px solid var(--pr-line); }
.pr-field dt { color: var(--pr-muted); font-size: 12px; font-weight: 600; }
.pr-field dd { color: var(--pr-text); font-size: 15px; font-weight: 600; margin: 5px 0 0; overflow-wrap: anywhere; }
.pr-qualification { border-left: 2px solid #8695a4; margin: 16px; padding: 0 14px; }
.pr-qualification strong { font-size: 14px; }
.pr-locked { border: 1px dashed var(--pr-line); padding: 24px; text-align: center; }
.pr-ladder { display: grid; gap: 8px; list-style: none; margin: 0; padding: 16px; }
.pr-ladder li { align-items: center; border-bottom: 1px solid var(--pr-line); display: grid; gap: 10px; grid-template-columns: 24px 1fr; padding: 10px 0; font-size: 14px; }
.pr-ladder li.stop { border-left: 3px solid var(--pr-blue); padding-left: 10px; }
.pr-ladder em { font-size: 12px; font-style: normal; grid-column: 2; }
.pr-boundary { padding: 0 16px 16px; }
.pr-boundary section { border-top: 1px solid var(--pr-line); padding: 14px 0; }
.pr-boundary p { font-size: 15px; margin: 6px 0; }
.pr-task-panel { background: #fff; border: 1px solid var(--pr-line); border-radius: 5px; }
.pr-task-progress { border-bottom: 1px solid var(--pr-line); display: grid; gap: 8px; padding: 16px 24px; }
.pr-task-progress span { color: var(--pr-muted); font-size: 13px; }
.pr-task-progress progress { accent-color: var(--pr-blue); height: 5px; width: 100%; }
.pr-task-scroll { padding: 24px; }
.pr-task-scroll h1 { color: var(--pr-navy); font: 650 26px/1.2 Inter, system-ui, sans-serif; margin: 0 0 16px; }
.pr-task-scroll p, .pr-task-scroll li { font-family: 'Source Serif 4', Georgia, serif; font-size: 17px; line-height: 1.55; }
.pr-task-callout { border-left: 2px solid #9babb9; margin: 20px 0; padding-left: 16px; }
.pr-task-callout > strong { font-size: 14px; }
.pr-task-callout p { margin: 6px 0; }
.pr-question { border-top: 1px solid var(--pr-line); margin-top: 20px; padding-top: 20px; }
.pr-question fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
.pr-question legend { font-size: 17px; font-weight: 650; line-height: 1.45; margin-bottom: 12px; }
.pr-hint { color: var(--pr-muted); font: 14px/1.5 Inter, system-ui, sans-serif !important; margin: 0 0 10px; }
.pr-question label { align-items: flex-start; border: 1px solid var(--pr-line); border-radius: 3px; display: flex; gap: 10px; margin: 8px 0; padding: 12px; cursor: pointer; }
.pr-question label:has(input:checked) { background: #f2f6fb; border-color: var(--pr-blue); }
.pr-question input { flex: 0 0 auto; margin-top: 5px; accent-color: var(--pr-blue); }
.pr-question label span { font-size: 16px; line-height: 1.5; }
.pr-question > button { background: var(--pr-blue); border: 0; border-radius: 3px; color: #fff; min-height: 44px; margin-top: 12px; padding: 10px 16px; }
.pr-feedback { background: #f4f7fa; border-left: 3px solid var(--pr-blue); margin-top: 16px; padding: 14px 16px; }
.pr-feedback.retry { background: #f7f7f7; border-color: #657587; }
.pr-feedback p { margin: 6px 0; }
.pr-source-links { border-top: 1px solid var(--pr-line); margin-top: 24px; padding-top: 16px; font-size: 14px; }
.pr-task-nav { border-top: 1px solid var(--pr-line); display: flex; gap: 12px; justify-content: space-between; padding: 16px 24px; }
.pr-task-nav button { background: #fff; border: 1px solid #8699a6; border-radius: 3px; color: var(--pr-navy); min-height: 44px; min-width: 88px; padding: 10px 14px; }
.pr-task-nav button.primary { background: var(--pr-blue); border-color: var(--pr-blue); color: #fff; margin-left: auto; }
.pr-complete > span { color: var(--pr-muted); font-size: 13px; text-transform: uppercase; }
@media (max-width: 1000px) {
  .pr-workspace { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); gap: 16px; padding: 16px; }
  .pr-document-scroll { padding: 12px; }
  .pr-fields { grid-template-columns: 1fr; }
  .pr-field:nth-child(odd) { border-right: 0; }
}
@media (max-width: 800px) {
  .pr-top { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .pr-top > div:first-child { flex-basis: calc(100% - 78px); }
  .pr-top > button { font-size: 13px; }
  .pr-mobile-switch { background: #fff; border-bottom: 1px solid var(--pr-line); display: grid; grid-template-columns: 1fr 1fr; position: sticky; top: 0; z-index: 2; }
  .pr-mobile-switch button { background: #fff; border: 0; border-bottom: 3px solid transparent; min-height: 48px; }
  .pr-mobile-switch button[aria-pressed="true"] { border-color: var(--pr-blue); font-weight: 700; }
  .pr-workspace { display: block; padding: 12px; }
  .pr-evidence-pane, .pr-task-pane { display: none; }
  .pr-evidence-pane.is-mobile-active, .pr-task-pane.is-mobile-active { display: block; }
  .pr-task-scroll { padding: 20px; }
  .pr-document-scroll { padding: 8px; }
  .pr-bundle-head { flex-wrap: wrap; }
  .pr-provenance { display: grid; }
}
body.ifd-provider-return-active { background: #f4f6f8; }
body.ifd-provider-return-active .md-header, body.ifd-provider-return-active .md-tabs, body.ifd-provider-return-active .md-sidebar,
body.ifd-provider-return-active .md-footer, body.ifd-provider-return-active .ifd-modebar { display: none !important; }
body.ifd-provider-return-active .md-main, body.ifd-provider-return-active .md-main__inner, body.ifd-provider-return-active .md-content,
body.ifd-provider-return-active .md-content__inner { margin: 0; max-width: none; padding: 0; }
body.ifd-provider-return-active .md-content__inner::before, body.ifd-provider-return-active .md-content__inner > h1,
body.ifd-provider-return-active .md-content__inner > .headerlink { display: none; }

/* The shared main-content wrapper also owns a page heading. The lab has its own. */
body.ifd-provider-return-active #ifd-main-content > h1 { display: none; }
