/* W3 evidence review workspace. Enabled only inside the execution-workspace flag. */

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-note {
  margin: 0 0 16px;
  color: var(--visual-copy);
  font-size: 14px;
  line-height: 1.6;
}
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head dd,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph footer > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-host {
  display: none;
  min-height: 0;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .at-execution-worksheet[data-active-execution-workspace="evidence-review"] .at-data-analysis-view-tabs,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .at-execution-worksheet[data-active-execution-workspace="evidence-review"] > :not(.at-primary-taskbar):not(.aer-host):not(.at-capability-assist-layer) {
  display: none !important;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .at-execution-worksheet[data-active-execution-workspace="evidence-review"] .aer-host {
  display: block;
  min-height: 0;
  height: calc(100% - 108px);
  animation: aer-workspace-in .18s cubic-bezier(.16, 1, .3, 1);
}

/* The shared execution shell owns the analysis-tool rail. Evidence review must
 * not hide it: contract review and knowledge lookup are contextual actions for
 * the selected source. Constrained canvases show tools after the reading area. */

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace {
  --aer-ink: var(--visual-accent-deep);
  --aer-muted:var(--visual-copy);
  --aer-line: var(--visual-surface-soft);
  --aer-soft: var(--visual-surface);
  --aer-accent: var(--visual-accent-deep);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 620px;
  color: var(--aer-ink);
  background: var(--visual-surface);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head h1 {
  margin: 0 0 3px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head p,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head span {
  margin: 0;
  color: var(--aer-muted);
  font-size: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head svg {
  width: 14px;
  height: 14px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head [data-aer-toggle-references] {
  display: none;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-grid {
  display: grid;
  grid-template-columns: minmax(210px, 248px) minmax(420px, 1fr) minmax(226px, 284px);
  min-height: 0;
  overflow: hidden;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-directory, .aer-reader, .aer-reference-rail) {
  min-width: 0;
  min-height: 0;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--visual-surface);
  border-right: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory-head {
  padding: 12px;
  border-bottom: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory-head label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--visual-line-soft);
  border-radius: 9px;
  background: var(--visual-surface);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory-head label:focus-within {
  border-color: var(--visual-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory-head label svg {
  width: 15px;
  height: 15px;
  color: var(--visual-copy);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory-head input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--aer-ink);
  background: transparent;
  font-size: 13px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-filters {
  display: flex;
  gap: 4px;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: thin;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-filters button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: var(--visual-copy);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-filters button:hover,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-filters button.is-active {
  color: var(--visual-accent-deep);
  background: var(--visual-surface-soft);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-list {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--visual-line) transparent;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--visual-surface-soft);
  border-radius: 0;
  color: var(--aer-ink);
  background: transparent;
  text-align: left;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row:hover {
  background: var(--visual-surface);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row.is-active {
  background: var(--visual-surface-soft);
  box-shadow: inset 3px 0 0 var(--aer-accent);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row > svg {
  width: 16px;
  height: 16px;
  margin: 2px 0 0 5px;
  color: var(--visual-copy);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row span {
  min-width: 0;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row strong,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row small {
  display: flex;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row strong {
  font-size: 13px;
  line-height: 1.45;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-row small {
  margin-top: 3px;
  color: var(--aer-muted);
  font-size: 11px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough [data-aer-read-status] {
  flex: 0 0 auto;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-source-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--visual-surface);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -.015em;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head p {
  margin: 0;
  color: var(--aer-muted);
  font-size: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head dl {
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  margin: 0;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head dl div {
  display: grid;
  align-content: start;
  gap: 2px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head dt {
  color: var(--visual-copy);
  font-size: 10px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head dd {
  max-width: 120px;
  margin: 0;
  overflow: hidden;
  color: var(--visual-copy);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-content {
  min-height: 0;
  padding: 18px 22px 26px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--visual-line) transparent;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-document-reader {
  width: min(100%, 74ch);
  margin: 0 auto;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph {
  padding: 14px 0 11px;
  border-bottom: 1px solid var(--visual-surface-soft);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph:first-child {
  padding-top: 2px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.4;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph p {
  margin: 0;
  color: var(--visual-ink);
  font-size: 14px;
  line-height: 1.82;
  white-space: pre-wrap;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph footer span {
  color: var(--visual-copy);
  font-size: 11px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph footer button {
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  color: var(--visual-accent-deep);
  background: transparent;
  font-size: 11px;
  font-weight: 760;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-paragraph footer button:hover {
  background: var(--visual-surface-soft);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-selection-bar,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 74ch);
  margin: 14px auto 0;
  padding-top: 13px;
  border-top: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-selection-bar, .aer-reader-action) :is(span, p) {
  margin: 0;
  color: var(--aer-muted);
  font-size: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-table-preview {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--aer-line);
  border-radius: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-table-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-table-preview :is(th, td) {
  padding: 9px 10px;
  border-right: 1px solid var(--visual-surface-soft);
  border-bottom: 1px solid var(--visual-surface-soft);
  text-align: left;
  white-space: nowrap;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-table-preview th {
  color: var(--visual-copy);
  background: var(--visual-surface);
  font-weight: 760;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--visual-surface);
  border-left: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail h2 {
  margin: 0;
  font-size: 14px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail header span {
  color: var(--aer-muted);
  font-size: 11px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-list {
  overflow: auto;
  scrollbar-width: thin;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-list article {
  padding: 12px 13px;
  border-bottom: 1px solid var(--visual-surface-soft);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-list article strong {
  display: block;
  font-size: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-list article p {
  display: block;
  margin: 6px 0;
  overflow-wrap: anywhere;
  color: var(--visual-copy);
  font-size: 12px;
  line-height: 1.55;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-list article small,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail > footer {
  color: var(--visual-copy);
  font-size: 10px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail > footer {
  padding: 9px 13px;
  border-top: 1px solid var(--aer-line);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-reference-empty, .aer-reader-empty, .aer-list-empty) {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 180px;
  padding: 22px;
  color: var(--aer-muted);
  text-align: center;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-reference-empty, .aer-reader-empty, .aer-list-empty) strong {
  color: var(--visual-copy);
  font-size: 13px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-reference-empty, .aer-reader-empty, .aer-list-empty) p,
html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-reference-empty, .aer-reader-empty, .aer-list-empty) span {
  max-width: 38ch;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-empty svg {
  width: 18px;
  height: 18px;
  margin-bottom: 10px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-ocr-warning, .aer-notice) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid #efd59e;
  color: #6d4c13;
  background: #fff8e8;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-ocr-warning {
  width: min(100%, 74ch);
  margin: 4px auto;
  border: 1px solid #efd59e;
  border-radius: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough :is(.aer-ocr-warning, .aer-notice) svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-ocr-warning :is(strong, p) {
  display: block;
  margin: 0;
  font-size: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-ocr-warning p {
  margin-top: 3px;
  line-height: 1.55;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-notice {
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-color: var(--visual-line-soft);
  color: var(--visual-accent);
  background: var(--visual-surface);
  font-size: 12px;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-notice.is-success {
  border-color: #b8dacd;
  color: #195d4f;
  background: #edf8f3;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-notice:is(.is-warning, .is-error) {
  border-color: #efd59e;
  color: #6d4c13;
  background: #fff8e8;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-notice button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: transparent;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-notice [data-aer-retry-reference] {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  font: inherit;
  white-space: nowrap;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-load-error {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 440px;
  padding: 32px;
  text-align: center;
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace ::selection {
  color: var(--visual-accent-deep);
  background: var(--visual-line-soft);
}

html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace button:focus-visible {
  outline: 2px solid var(--visual-accent);
  outline-offset: 2px;
}

@keyframes aer-workspace-in {
  from { opacity: .74; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head [data-aer-toggle-references] {
    display: inline-flex;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-grid {
    grid-template-columns: 218px minmax(390px, 1fr);
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reference-rail {
    display: none;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace[data-aer-view="references"] .aer-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace[data-aer-view="references"] :is(.aer-directory, .aer-reader) {
    display: none;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace[data-aer-view="references"] .aer-reference-rail {
    display: grid;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-head > div:last-child {
    flex-wrap: wrap;
    gap: 8px;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace {
    min-height: 760px;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-workspace-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 230px minmax(480px, 1fr);
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-directory {
    border-right: 0;
    border-bottom: 1px solid var(--aer-line);
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head dl {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-reader-head {
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-audit-execution-workspaces="enabled"] #view-walkthrough .aer-host {
    animation: none !important;
  }
}
