/* Task-first workspace. Scoped overrides after the retained brand stylesheet. */
.authenticated-layout .analysis-state { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; padding: 24px !important; }
.authenticated-layout .analysis-copy { text-align: center; max-width: 760px; margin: auto; }
.authenticated-layout .analysis-copy h2 { font-size: 25px !important; margin: 6px 0 !important; }
.authenticated-layout .analysis-copy p { margin: 0; }
.task-cinema { width: min(100%, 560px); aspect-ratio: 16 / 9; margin: 0 auto; overflow: hidden; border-radius: 16px; background: #e9eff8; border: 1px solid #d2ddec; box-shadow: 0 12px 28px #18366b12; }
.task-cinema video { display: block; width: 100%; height: 100%; object-fit: contain; }
.task-cinema[data-media-state="error"] { background: #eef3fa; }
.cinema-controls { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; color: #354760; font-size: 13px; line-height: 1.6; text-align: center; }
#processingMotionToggle { margin: 0; padding: 6px 14px; min-height: 34px; font-size: 13px; }
.cinema-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; list-style: none; width: min(100%, 720px); margin: 0 auto; padding: 12px 0 0; }
.cinema-steps li { padding: 8px 0 0; border-top: 3px solid #d7e0ef; color: #465873; font-size: 13px; text-align: center; }
.cinema-steps .current { border-color: #2455d8; color: #1748bd; font-weight: 700; }
.cinema-steps .current::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; animation: task-alive 2s ease-in-out infinite; }
.cinema-steps .completed { border-color: #39836b; color: #24674f; }
.cinema-steps .failed { border-color: #ae3e36; color: #9c342e; }
@keyframes task-alive { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .cinema-steps .current::before { animation: none; } }
.authenticated-layout .result-primary-actions {
  position: static;
  top: auto;
  z-index: 3;
  background: #fff;
  margin: 0 0 18px !important;
  padding: 0 0 18px !important;
  border-top: 0 !important;
  border-bottom: 1px solid #d8e2ef;
  flex-wrap: wrap;
}
.authenticated-layout .result-primary-actions #confirmHint { flex: 1; min-width: 200px; font-size: 14px; color: #33435d; }
.authenticated-layout .has-result .summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 14px; margin-bottom: 14px; }
.authenticated-layout .has-result:has(#templatePanel:not(.hidden)) .summary-row > div:nth-child(1),
.authenticated-layout .has-result:has(#templatePanel:not(.hidden)) .summary-row > div:nth-child(3) { display: none; }
.authenticated-layout .result-evidence-overview { margin: 0 !important; padding: 18px 20px !important; }
.evidence-pages { border: 1px solid #d8e2ef; border-radius: 14px; padding: 0 18px; }
.evidence-pages > summary, .evidence-row > summary { cursor: pointer; padding: 16px 0; color: #22334f; font-size: 15px; font-weight: 650; }
.evidence-page-cards { display: grid; }
.evidence-row { border-top: 1px solid #e1e8f2; }
.evidence-row .change-evidence-card { margin: 0 0 14px; }
.evidence-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 14px 0; color: #41516a; }
.evidence-pagination button { min-height: 40px; }
.authenticated-layout .result-feedback { padding: 0 20px !important; margin-top: 18px !important; }
.result-feedback-toggle { cursor: pointer; padding: 18px 0; font-weight: 700; color: #243957; }
.result-feedback-toggle span { margin-left: 12px; font-size: 13px; font-weight: 500; color: #52637c; }
.result-feedback[open] { padding-bottom: 20px !important; }
.result-feedback[open] .result-feedback-heading { padding-top: 8px; }
summary:focus-visible { outline: 3px solid #4778e8; outline-offset: 4px; border-radius: 5px; }
.authenticated-layout .workspace-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 26px !important;
  min-height: 0 !important;
}
.authenticated-layout .upload-column {
  position: static !important;
  padding: 0 !important;
  min-width: 0;
}
.authenticated-layout .upload-file-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.authenticated-layout .upload-file-pair .optional-file {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-width: 0;
}
.authenticated-layout .upload-file-pair .file-card {
  margin: 0 !important;
  min-height: 88px;
  height: 100%;
  padding: 18px 20px !important;
}
.authenticated-layout .upload-column .section-heading,
.authenticated-layout .process-result-heading {
  align-items: center !important;
  min-height: 38px !important;
  font-size: 18px !important;
  margin-bottom: 12px !important;
}
.authenticated-layout .upload-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.authenticated-layout .upload-safety-note {
  margin: -2px 0 14px !important;
  font-size: 13px !important;
}
.authenticated-layout .upload-actions #startButton {
  width: auto !important;
  min-width: 170px;
  min-height: 46px;
  padding: 12px 26px !important;
}
.authenticated-layout #errorMessage:empty { display: none; }
.authenticated-layout .process-result-heading > div > small { display: none; }
.authenticated-layout .process-result-panel > .empty-state {
  min-height: 230px !important;
  padding: 30px !important;
}
.authenticated-layout .process-result-panel:has(> .empty-state:not(.hidden)) {
  min-height: 230px !important;
}
@media (max-width: 640px) {
  .authenticated-layout .upload-file-pair { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .authenticated-layout .upload-actions #startButton { flex: 1; min-width: 0; }
  .authenticated-layout .process-result-heading { flex-direction: row !important; }
}

/* Readable task surfaces: secondary content remains deliberately legible. */
.history-detail-dialog .history-detail-shell { padding: 30px !important; }
.history-detail-dialog .history-detail-state { display: inline-flex !important; width: fit-content !important; min-width: 0 !important; margin: 0 0 12px !important; padding: 6px 12px !important; border-radius: 8px !important; box-shadow: none !important; font-size: 13px !important; }
.history-detail-dialog .history-detail-header h2 { font-size: clamp(24px, 2.5vw, 32px) !important; line-height: 1.35; overflow-wrap: anywhere; }
.history-detail-dialog :is(.history-detail-header p, .history-evidence-empty p, .history-check-list p, .history-evidence-card p) { color: #354760 !important; font-size: 15px !important; line-height: 1.7 !important; font-weight: 400 !important; }
.history-detail-dialog :is(.history-detail-meta, .history-detail-section-head > span, .history-detail-stages p, .history-detail-stages small, .history-evidence-card small, .history-diagnostics) { color: #354760 !important; font-size: 14px !important; line-height: 1.65 !important; opacity: 1 !important; }
.history-detail-dialog .history-detail-stages { gap: 12px !important; }
.history-detail-dialog .history-detail-stages li { padding: 16px !important; }
.history-detail-dialog .history-detail-stages strong { font-size: 15px !important; color: #18283f !important; }
.history-detail-dialog .history-detail-section { margin-top: 24px; }
.history-diagnostics { margin-top: 10px; }
.history-diagnostics summary { cursor: pointer; font-weight: 500; }
.history-diagnostics code { overflow-wrap: anywhere; font-size: 12px; }
.authenticated-layout {
  --task-ink: #18283f;
  --task-secondary: #354760;
  --task-muted: #465873;
}
.authenticated-layout .intro .lede,
.authenticated-layout .history-panel-head p:not(.public-kicker),
.authenticated-layout #historyMessage,
.authenticated-layout .empty-state p,
.authenticated-layout .analysis-copy p {
  color: var(--task-secondary) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
}
.authenticated-layout .account-nav-link { color: var(--task-secondary) !important; font-size: 15px !important; font-weight: 600 !important; }
.authenticated-layout .account-nav-link.active { color: #1748bd !important; background: #e8efff !important; }
.authenticated-layout .account-nav-section-label { color: var(--task-muted) !important; font-size: 13px !important; font-weight: 600 !important; }
.authenticated-layout .progress-step, .authenticated-layout .progress-step b, .authenticated-layout .progress-step span { color: var(--task-secondary) !important; opacity: 1 !important; font-size: 13px !important; }
.authenticated-layout .progress-step.current, .authenticated-layout .progress-step.current b, .authenticated-layout .progress-step.current span { color: #1748bd !important; font-weight: 700 !important; }
.authenticated-layout .file-copy { min-width: 0; }
.authenticated-layout .file-copy strong, .authenticated-layout .history-item strong { color: var(--task-ink) !important; font-size: 16px !important; font-weight: 650 !important; }
.authenticated-layout .file-copy small, .authenticated-layout .section-heading > small,
.authenticated-layout .history-item small, .authenticated-layout .history-identity > span, .authenticated-layout .privacy-note,
.authenticated-layout .processing-trail small, .authenticated-layout .cinema-controls { color: var(--task-secondary) !important; font-size: 13px !important; font-weight: 500 !important; line-height: 1.6 !important; opacity: 1 !important; }
.authenticated-layout .file-copy small, .authenticated-layout .history-item strong { overflow-wrap: anywhere; white-space: normal !important; text-overflow: clip !important; }
.authenticated-layout .file-card { opacity: 1 !important; }
.authenticated-layout .file-card:has(input:disabled) { background: #f4f7fc !important; cursor: not-allowed; }
.authenticated-layout button:disabled { opacity: 1 !important; color: #52617a !important; background: #e5ebf4 !important; border-color: #bdcadc !important; box-shadow: none !important; cursor: not-allowed; }
.authenticated-layout input::placeholder, .authenticated-layout textarea::placeholder { color: #596982 !important; opacity: 1 !important; }
.authenticated-layout .process-result-panel > #resultState { min-height: 0 !important; }
@media (max-width: 640px) {
  .authenticated-layout .file-card { align-items: center; }
  .authenticated-layout .progress { gap: 7px !important; }
  .authenticated-layout .progress-line { margin: 0 !important; min-width: 8px !important; }
  .authenticated-layout .account-nav-link { white-space: nowrap; flex-shrink: 0; }
  .authenticated-layout .progress-step, .authenticated-layout .progress-step span { font-size: 12px !important; }
  .cinema-steps { gap: 6px; }
  .cinema-steps li { font-size: 12px; }
  .cinema-steps .current::before { display: none; }
  .authenticated-layout .result-primary-actions > * { min-width: 0 !important; }
  .evidence-pagination { gap: 8px; flex-wrap: wrap; }
}
