@media screen {
  /* Keep the workflow's intrinsic width inside its own scroller, including browser zoom. */
  .app-shell .view[data-view="opportunityDetail"],
  .app-shell .view[data-view="opportunityDetail"] .detail-content { grid-template-columns: minmax(0, 1fr); }
  .app-shell .view[data-view="opportunityDetail"] > *,
  .app-shell .view[data-view="opportunityDetail"] .detail-content > * { min-width: 0; }
  .app-shell .qualification-workspace { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; width: 100%; max-width: 1120px; margin-inline: auto; min-width: 0; }
  .app-shell .qualification-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 14px; }
  .app-shell .qualification-pending { display: grid; gap: 10px; margin-top: 16px; padding: 16px; border-radius: 12px; background: #fff9e9; border: 1px solid #f2db9e; }
  .app-shell .qualification-pending ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
  .app-shell .qualification-pending .btn { justify-self: start; }
  .app-shell .consumption-upload { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: end; gap: 12px; }
  .app-shell .consumption-upload .field { min-width: 0; }
  .app-shell .consumption-upload > .muted { grid-column: 1; overflow-wrap: anywhere; }
  .app-shell .consumption-upload > .context-help { grid-column: 2; grid-row: 1; }
  .app-shell .consumption-upload input[type=file] { max-width: 100%; padding: 8px; font-size: 14px; }
  .app-shell .consumption-upload input::file-selector-button { border: 0; border-radius: 7px; padding: 8px 10px; margin-right: 10px; color: #153b4d; background: #edf3f6; font: inherit; cursor: pointer; }
  .app-shell .consumption-editor { display: grid; gap: 24px; min-width: 0; }
  .app-shell .consumption-editor [hidden], .app-shell .qualification-workspace [hidden] { display: none !important; }
  .app-shell .consumption-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .app-shell .consumption-section-heading h3 { font-size: 16px; font-weight: 600; margin: 0; }
  .app-shell .consumption-section-heading > span { font-size: 13px; color: #526d7d; }
  .app-shell .consumption-month-entry { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
  .app-shell .consumption-month-entry label { display: grid; flex: 1 1 160px; gap: 7px; font-size: 14px; color: #405e70; }
  .app-shell .consumption-month-entry input { width: 100%; min-width: 0; }
  .app-shell .consumption-editor input:not([type=checkbox]), .app-shell .consumption-editor select { min-height: 44px; font-size: 16px; }
  .app-shell .consumption-editor textarea { min-height: 88px; font-size: 16px; }
  .app-shell .consumption-table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid #dbe6ed; border-radius: 10px; overscroll-behavior-x: contain; }
  .app-shell .consumption-month-table { min-width: 0; width: 100%; border-collapse: collapse; table-layout: auto; font-size: 14px; }
  .app-shell .consumption-month-table th { text-transform: none; font-size: 13px; font-weight: 600; background: #f2f6f8; }
  .app-shell .consumption-month-table :is(th,td) { vertical-align: middle; padding: 10px 12px; line-height: 1.45; text-align: left; }
  .app-shell .consumption-month-table :is(th,td):nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
  .app-shell .consumption-month-table td:last-child { width: 1%; white-space: nowrap; }
  .app-shell .consumption-month-table input { min-width: 130px; max-width: 180px; }
  .app-shell .consumption-row-actions { display: flex; gap: 8px; justify-content: end; }
  .app-shell .consumption-row-actions .btn { min-height: 44px; padding: 8px 10px; }
  .app-shell .consumption-capture { padding: 18px; border: 1px solid #e5ce91; border-radius: 12px; background: #fffdf6; }
  .app-shell .consumption-capture .actions { margin-top: 14px; }
  .app-shell .consumption-conflict { display: grid; gap: 6px; margin-top: 10px; color: #865b00; font-size: 13px; white-space: normal; }
  .app-shell .consumption-conflict select { min-width: 190px; }
  .app-shell .consumption-expansion { background: #f4f8f8; border-radius: 12px; padding: 18px; }
  .app-shell .consumption-checkbox { display: flex; align-items: center; gap: 10px; width: fit-content; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
  .app-shell .consumption-checkbox input { width: 20px; height: 20px; accent-color: #167c65; }
  .app-shell .consumption-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 18px; }
  .app-shell .consumption-metrics > div { display: grid; align-content: start; gap: 7px; min-width: 0; }
  .app-shell .consumption-metrics span { color: #526d7d; font-size: 13px; }
  .app-shell .consumption-metrics strong { font-size: clamp(18px,2vw,24px); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
  .app-shell .consumption-metrics small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: #526d7d; }
  .app-shell .consumption-inline-note { font-size: 14px; line-height: 1.55; margin: 10px 0 16px; color: #526d7d; }
  .app-shell .consumption-field-error, .app-shell .consumption-missing { color: #a92f38; font-size: 14px; }
  .app-shell .consumption-feedback { padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.55; background: #edf7f2; color: #176749; }
  .app-shell .consumption-feedback.is-error { background: #fff0f1; color: #a12e38; border: 1px solid #f2cdd0; }
  .app-shell .opportunity-stage-gate { display: grid; gap: 12px; align-content: start; padding: 24px; }
  .app-shell .opportunity-stage-gate h3, .app-shell .opportunity-stage-gate p { margin: 0; }
  .app-shell .opportunity-stage-gate .btn { justify-self: start; }
  .app-shell .commercial-continuity { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 18px; border-radius: 12px; background: #f2f7f7; margin-bottom: 20px; }
  .app-shell .commercial-continuity p { margin: 4px 0 0; font-size: 14px; }
  .app-shell .stage-strip { overflow-x: auto; overflow-y: hidden; justify-items: start; padding-bottom: 8px; overscroll-behavior-x: contain; }
  .app-shell .stage-strip-track { grid-template-columns: repeat(var(--opportunity-stage-count, 9), minmax(82px, 1fr)); width: 100%; }
  .app-shell .stage-chip-label { overflow: visible; -webkit-line-clamp: unset; }
  .app-shell .cost-workspace { display: grid; gap: 20px; }
  .app-shell .cost-workspace .panel { min-width: 0; }
  .app-shell .cost-workspace .panel > h2 { margin-bottom: 20px; }
  .app-shell .cost-entry { min-width: 0; margin: 18px 0; padding: 18px; border: 1px solid #dce6ec; border-radius: 12px; background: #f7fafb; }
  .app-shell .cost-entry legend { font-weight: 600; padding: 0 6px; }
  .app-shell .cost-metrics { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 16px; margin-bottom: 16px; }
  .app-shell .cost-metrics > div { display: grid; gap: 6px; min-width: 0; }
  .app-shell .cost-metrics span { color: #526d7d; font-size: 14px; }
  .app-shell .cost-metrics strong { font-size: clamp(20px, 2.3vw, 28px); font-weight: 600; font-variant-numeric: tabular-nums; }
  .app-shell .cost-workspace [data-cost-error] { color: #a92f38; }
  .app-shell .cost-workspace .cell-identity > small { display: block; margin-top: 4px; }
  .app-shell .technical-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
  .app-shell .technical-metrics > div { display: grid; gap: 6px; align-content: start; }
  .app-shell .technical-metrics span, .app-shell .technical-metrics small { color: #526d7d; font-size: 13px; }
  .app-shell .technical-metrics strong { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .app-shell .technical-study { display: grid; gap: 20px; margin: 20px 0; }
  .app-shell .study-fields { margin-top: 16px; }
  .app-shell .study-source-title { display: flex; align-items: center; justify-content: space-between; }
  .app-shell .study-source-title h3 { margin: 0; }
  .app-shell .study-checks { margin: 16px 0; padding: 12px 16px; border: 1px solid #dce6ec; border-radius: 12px; }
  .app-shell .study-checks legend { padding: 0 6px; }
  .app-shell .study-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
  .app-shell .study-location { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; background: #f2f7f8; border-radius: 10px; }
  .app-shell .study-location p { flex-basis: 100%; margin: 0; }
  .app-shell .study-plane { padding: 12px 0; border-bottom: 1px solid #dce6ec; margin-bottom: 12px; }
  .app-shell [data-study-error] { color: #a92f38; }
  .app-shell .solution-workspace > form { display: grid; gap: 20px; }
  .app-shell .solution-workspace .panel { min-width: 0; }
  .app-shell .solution-workspace .cell-identity small, .app-shell .solution-workspace .cell-description small { display: block; margin-top: 5px; color: #526d7d; }
  .app-shell .solution-entry { padding: 16px; margin: 18px 0; border: 1px solid #dce6ec; border-radius: 12px; background: #f7fafb; min-width: 0; }
  .app-shell .solution-entry legend { padding: 0 6px; font-weight: 600; }
  .app-shell .solution-requirements { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
  .app-shell .solution-requirements > span { padding: 6px 10px; border: 1px solid #dce6ec; border-radius: 8px; color: #526d7d; font-size: 13px; }
  .app-shell .solution-issues { padding-left: 20px; margin: 14px 0; display: grid; gap: 10px; line-height: 1.5; }
  .app-shell .solution-check-status { padding: 12px 16px; border-radius: 10px; background: #f2f7f8; }
  @media (max-width: 600px) {
    .app-shell .technical-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-shell .study-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-shell .cost-metrics { grid-template-columns: 1fr auto; }
    .app-shell .cost-metrics > div { grid-column: 1; }
    .app-shell .cost-metrics > .context-help { grid-column: 2; grid-row: 1 / 3; }
    .app-shell .cost-entry { padding: 12px; }
    .app-shell .stage-strip-track { grid-template-columns: repeat(var(--opportunity-stage-count, 9), minmax(44px, 1fr)); gap: 6px; }
    .app-shell .stage-strip-track .stage-chip { min-width: 44px; min-height: 44px; align-content: center; }
    .app-shell .consumption-capture, .app-shell .consumption-expansion { padding: 12px; }
    .app-shell .consumption-month-entry label { flex-basis: calc(50% - 6px); }
    .app-shell .consumption-month-entry > button { flex: 1 1 auto; }
    .app-shell .consumption-metrics { grid-template-columns: 1fr; gap: 12px; }
    .app-shell .consumption-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .app-shell .consumption-metrics strong { text-align: right; }
    .app-shell .consumption-month-table :is(th,td) { padding: 8px; }
    .app-shell .consumption-row-actions { flex-direction: column; gap: 4px; }
    .app-shell .consumption-row-actions .btn { font-size: 12px; }
  }
}
/* Optional evidence remains compact and separate from qualification requirements. */
.qualification-file-list { list-style: none; margin: 0 0 16px; padding: 0; }
.qualification-file-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid #e1e9ee; }
.qualification-file-list a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.qualification-file-list small { color: #536c7b; }
[data-qualification-attachments] input[type="file"] { width: 100%; min-width: 0; }
