/*
 * P3 program execution visual assembly.
 * The approved reference keeps one formal work canvas, a slim contextual
 * inspector and a mode-aware command area. Existing business objects and
 * state machines are deliberately untouched here.
 */

body[data-active-view="walkthrough"] {
  overflow: hidden;
  background: #f4f6f9;
}

body[data-active-view="auditinterview"] {
  background: #f4f6f9;
}

.program-sidebar-toggle,
.program-sidebar-reopen,
.program-sidebar-resizer,
.program-context-toggle {
  display: none;
}

/* The application navigation is one shell-level control, not a page feature. */
@media (min-width: 769px) {
  body .app-layout {
    grid-template-columns: minmax(196px, var(--program-sidebar-width, 248px)) 8px minmax(0, 1fr);
  }

  body .sidebar {
    width: var(--program-sidebar-width, 248px);
  }

  body .program-sidebar-resizer {
    position: fixed;
    top: 0;
    left: var(--program-sidebar-width, 248px);
    z-index: 105;
    display: block;
    width: 8px;
    height: 100dvh;
    padding: 0;
    border: 0;
    background: linear-gradient(90deg, transparent 3px, rgba(148, 163, 184, .34) 3px, rgba(148, 163, 184, .34) 4px, transparent 4px);
    cursor: col-resize;
    touch-action: none;
  }

  body .program-sidebar-resizer:hover,
  body .program-sidebar-resizer:focus-visible,
  body.is-resizing-program-sidebar .program-sidebar-resizer {
    background: linear-gradient(90deg, transparent 2px, rgba(79, 141, 247, .48) 2px, rgba(79, 141, 247, .48) 5px, transparent 5px);
    outline: 0;
  }

  body .program-sidebar-resizer.is-collapse-armed {
    background: rgba(37, 99, 235, .28);
  }

  body .program-sidebar-resizer span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  body .program-sidebar-resizer em {
    display: none;
  }

  body .program-sidebar-resizer.is-collapse-armed em {
    position: absolute;
    top: 50%;
    left: 10px;
    display: block;
    width: max-content;
    padding: 5px 8px;
    border-radius: 6px;
    background: #173b7a;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    transform: translateY(-50%);
    pointer-events: none;
  }

  body :is(.project-toolbar, .breadcrumb, .main-content) {
    grid-column: 3;
  }

  body.is-program-workbar-collapsed .app-layout {
    grid-template-columns: 44px minmax(0, 1fr) !important;
  }

  body.is-program-workbar-collapsed :is(.sidebar, .program-sidebar-resizer) {
    display: none;
  }

  body.is-program-workbar-collapsed .program-sidebar-reopen {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 110;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    width: 44px;
    height: 100dvh;
    padding: 14px 8px;
    border: 0;
    border-right: 1px solid #22304a;
    background: #101827;
    color: #b9c8dc;
    cursor: pointer;
  }

  body.is-program-workbar-collapsed .program-sidebar-reopen:hover,
  body.is-program-workbar-collapsed .program-sidebar-reopen:focus-visible {
    background: #17233a;
    color: #fff;
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
  }

  body.is-program-workbar-collapsed .program-sidebar-reopen img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  body.is-program-workbar-collapsed .program-sidebar-reopen svg {
    width: 17px;
    height: 17px;
    color: #7db2ff;
  }

  body.is-program-workbar-collapsed .program-sidebar-reopen span {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 4px;
    writing-mode: vertical-rl;
  }

  body.is-program-workbar-collapsed :is(.project-toolbar, .breadcrumb, .main-content) {
    grid-column: 2 !important;
  }
}

@media (min-width: 769px) {
  body[data-active-view="auditinterview"] .app-layout {
    grid-template-columns: minmax(196px, var(--program-sidebar-width, 248px)) 8px minmax(0, 1fr);
    grid-template-rows: 58px minmax(0, 1fr);
    min-height: 100dvh;
    align-content: stretch;
  }

  body[data-active-view="auditinterview"] .sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: 100dvh;
    width: var(--program-sidebar-width, 248px);
  }

  body[data-active-view="auditinterview"] :is(.project-toolbar, .breadcrumb) {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-active-view="auditinterview"] .project-toolbar {
    z-index: 50;
    min-height: 58px;
    height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid #e0e6ef;
    background: #fff;
    box-shadow: none;
  }

  body[data-active-view="auditinterview"] .project-bar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    max-width: none;
    min-height: 58px;
    margin: 0;
  }

  body[data-active-view="auditinterview"] :is(.worktop-brand, .project-context, .project-actions, .program-sidebar-toggle, .program-context-toggle) {
    display: none !important;
  }

  body[data-active-view="auditinterview"] .breadcrumb {
    z-index: 52;
    align-self: center;
    justify-self: start;
    width: max-content;
    max-width: calc(100% - 440px);
    min-height: 0;
    margin: 0;
    padding: 0 18px;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-view="auditinterview"] .user-info-bar {
    margin-left: auto;
    padding-left: 14px;
    border-left: 1px solid #e2e8f0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-view="auditinterview"] .global-work-mode {
    align-items: center;
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body[data-active-view="auditinterview"] .global-work-mode > span,
  body[data-active-view="auditinterview"] .global-work-mode > small {
    display: none !important;
  }

  body[data-active-view="auditinterview"] .main-content {
    grid-column: 3;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 58px);
    margin: 0;
    padding: 14px 20px 28px;
  }
}

@media (min-width: 769px) {
  body[data-active-view="walkthrough"] .app-layout {
    grid-template-columns: minmax(196px, var(--program-sidebar-width, 248px)) 8px minmax(0, 1fr);
    grid-template-rows: 58px minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    align-content: stretch;
    background: #f4f6f9;
  }

  body[data-active-view="walkthrough"] .sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: var(--program-sidebar-width, 248px);
    height: 100dvh;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer {
    grid-column: 2;
    grid-row: 1 / span 2;
    z-index: 65;
    display: block;
    position: relative;
    width: 8px;
    height: 100dvh;
    padding: 0;
    border: 0;
    border: 0;
    background: linear-gradient(90deg, transparent 3px, rgba(148, 163, 184, .34) 3px, rgba(148, 163, 184, .34) 4px, transparent 4px);
    cursor: col-resize;
    touch-action: none;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer:hover,
  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer:focus-visible,
  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-resizing-program-sidebar .program-sidebar-resizer {
    background: linear-gradient(90deg, transparent 2px, rgba(79, 141, 247, .48) 2px, rgba(79, 141, 247, .48) 5px, transparent 5px);
    outline: 0;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer.is-collapse-armed {
    background: rgba(37, 99, 235, .28);
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer em {
    display: none;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]) .program-sidebar-resizer.is-collapse-armed em {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 2;
    display: block;
    width: max-content;
    padding: 5px 8px;
    border-radius: 6px;
    background: #173b7a;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    transform: translateY(-50%);
    pointer-events: none;
  }

  body.is-resizing-program-sidebar {
    cursor: col-resize;
    user-select: none;
  }

  body[data-active-view="walkthrough"] .project-toolbar,
  body[data-active-view="walkthrough"] .breadcrumb {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-active-view="walkthrough"] .project-toolbar {
    z-index: 53;
    min-height: 58px;
    height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid #e0e6ef;
    background: rgba(255, 255, 255, .98);
    box-shadow: none;
    backdrop-filter: none;
  }

  body[data-active-view="walkthrough"] .project-bar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    max-width: none;
    min-height: 58px;
    margin: 0;
  }

  body[data-active-view="walkthrough"] .program-context-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #d6dee9;
    border-radius: 8px;
    background: #f8fafc;
    color: #40516a;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    z-index: 55;
  }

  body[data-active-view="walkthrough"] .program-context-toggle[aria-expanded="true"] {
    border-color: #b9cae2;
    background: #eef4ff;
    color: #245bd7;
  }

  body[data-active-view="walkthrough"] :is(.worktop-brand, .project-actions) {
    display: none !important;
  }

  body[data-active-view="walkthrough"] .breadcrumb {
    z-index: 52;
    align-self: center;
    justify-self: start;
    width: max-content;
    max-width: calc(100% - 625px);
    min-height: 0;
    margin: 0;
    padding: 0 18px;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-view="walkthrough"] .user-info-bar {
    margin-left: 0;
    padding-left: 14px;
    border-left: 1px solid #e2e8f0;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-view="walkthrough"] .global-work-mode {
    align-items: center;
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body[data-active-view="walkthrough"] .global-work-mode > span,
  body[data-active-view="walkthrough"] .global-work-mode > small {
    display: none !important;
  }

  body[data-active-view="walkthrough"] .main-content {
    grid-column: 3;
    grid-row: 2;
    align-self: stretch;
    width: 100%;
    height: calc(100dvh - 58px);
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  body[data-active-view="walkthrough"] #view-walkthrough,
  body[data-active-view="walkthrough"] #view-walkthrough > .uaw-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .app-layout {
    grid-template-columns: 44px minmax(0, 1fr) !important;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-resizer,
  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .sidebar {
    display: none;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-reopen {
    grid-column: 1;
    grid-row: 1 / span 2;
    z-index: 70;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    width: 44px;
    height: 100dvh;
    padding: 14px 8px;
    border: 0;
    border-right: 1px solid #22304a;
    background: #101827;
    color: #b9c8dc;
    cursor: pointer;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-reopen:hover,
  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-reopen:focus-visible {
    background: #17233a;
    color: #fff;
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-reopen img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-reopen svg {
    width: 17px;
    height: 17px;
    color: #7db2ff;
  }

  body:is([data-active-view="walkthrough"], [data-active-view="auditinterview"]).is-program-workbar-collapsed .program-sidebar-reopen span {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 4px;
    writing-mode: vertical-rl;
  }

  body[data-active-view="walkthrough"].is-program-workbar-collapsed .breadcrumb {
    width: max-content !important;
    max-width: calc(100% - 555px) !important;
  }

  body[data-active-view="walkthrough"].is-program-workbar-collapsed :is(.project-toolbar, .breadcrumb, .main-content) {
    grid-column: 2 !important;
  }

  body[data-active-view="auditinterview"].is-program-workbar-collapsed :is(.project-toolbar, .breadcrumb, .main-content) {
    grid-column: 2 !important;
  }
}

/* Approved page skeleton: formal canvas, contextual inspector, bottom action. */
#view-walkthrough .uaw-shell {
  --uaw-border: #d9e1eb;
  --uaw-text: #172033;
  --uaw-context-width: 318px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--uaw-context-width));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  height: 100% !important;
  min-height: 0;
  border-top: 0;
  background: #fff;
}

#view-walkthrough .uaw-grid {
  display: contents;
}

#view-walkthrough .uaw-status {
  display: none;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: #fff;
}

#view-walkthrough .uaw-shell.has-program-blockers .uaw-status {
  display: block;
}

#view-walkthrough .uaw-status-row {
  display: none !important;
}

#view-walkthrough .uaw-status-blockers:not(:empty) {
  display: block;
  padding: 0;
  border: 0;
}

#view-walkthrough .uaw-program-blocker-summary {
  position: relative;
  margin: 0;
  background: #fffaf0;
}

#view-walkthrough .uaw-program-blocker-summary > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 16px;
  color: #8a4b0f;
  cursor: pointer;
  list-style: none;
}

#view-walkthrough .uaw-program-blocker-summary > summary::-webkit-details-marker {
  display: none;
}

#view-walkthrough .uaw-program-blocker-summary > summary strong {
  font-size: 12px;
}

#view-walkthrough .uaw-program-blocker-summary > summary span {
  color: #a16207;
  font-size: 11px;
  font-weight: 700;
}

#view-walkthrough .uaw-program-blocker-summary > div {
  display: grid;
  gap: 6px;
  padding: 8px 12px 12px;
  border-top: 1px solid #f3dfb2;
}

#view-walkthrough .uaw-program-blocker-summary :is(.at-scheme-gate-inline, .at-scheme-drift-notice, .at-review-notice) {
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 11px !important;
}

#view-walkthrough .uaw-formal {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
}

#view-walkthrough .uaw-context {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-content: start;
  gap: 12px;
  position: static;
  min-width: 0;
  width: var(--uaw-context-width);
  max-width: 100%;
  min-height: 0;
  max-height: none;
  padding: 14px 12px 18px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-left: 1px solid #dfe5ed;
  border-radius: 0;
  background: #fbfcfe;
  box-shadow: none;
}

#view-walkthrough .uaw-context-resizer {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: stretch;
  justify-self: start;
  width: 11px;
  min-width: 11px;
  height: 100%;
  margin-left: -6px;
  padding: 0;
  z-index: 32;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

#view-walkthrough .uaw-context-resizer:hover,
#view-walkthrough .uaw-context-resizer:focus-visible,
body.is-resizing-program-context #view-walkthrough .uaw-context-resizer {
  border-left-color: #5b8def;
  outline: none;
}

#view-walkthrough .uaw-context-resizer span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#view-walkthrough .uaw-context-resizer em {
  display: none;
}

#view-walkthrough .uaw-context-resizer.is-collapse-armed {
  border-left-color: #2563eb;
  background: rgba(37, 99, 235, .08);
}

#view-walkthrough .uaw-context-resizer.is-collapse-armed em {
  position: absolute;
  top: 50%;
  right: 12px;
  display: block;
  width: max-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: #173b7a;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

body.is-resizing-program-context {
  cursor: col-resize;
  user-select: none;
}

#view-walkthrough .uaw-shell.is-context-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

#view-walkthrough .uaw-shell.is-context-collapsed .uaw-context {
  display: none;
}

#view-walkthrough .uaw-shell.is-context-collapsed .uaw-context-resizer {
  display: none;
}

#view-walkthrough .uaw-context-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 0 2px 10px;
}

#view-walkthrough .uaw-context-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#view-walkthrough .uaw-context-head strong {
  font-size: 15px;
}

#view-walkthrough .uaw-context-head span {
  font-size: 10px;
}

#view-walkthrough [data-uaw-toggle-context][hidden] {
  display: none !important;
}

#view-walkthrough .uaw-default-context,
#view-walkthrough .uaw-inspector-section,
#view-walkthrough .uaw-inspector-state {
  gap: 8px;
}

#view-walkthrough .uaw-inspector-state {
  padding-top: 10px;
}

#view-walkthrough .uaw-inspector-state.is-empty {
  padding: 0;
  border: 0;
  background: transparent;
}

#view-walkthrough .uaw-inspector-state.is-empty p {
  color: #64748b;
  font-size: 11px;
}

#view-walkthrough .uaw-inspector-section dl > div,
#view-walkthrough .uaw-task-facts > div {
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 2px 0;
}

#view-walkthrough .uaw-program-support {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid #e1e7ef;
}

#view-walkthrough .uaw-support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#view-walkthrough .uaw-support-head > div {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

#view-walkthrough .uaw-support-head span {
  color: #245bd7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

#view-walkthrough .uaw-support-head h3 {
  font-size: 13px;
  white-space: nowrap;
}

#view-walkthrough .uaw-support-head small {
  color: #64748b;
  font-size: 9px;
  white-space: nowrap;
}

#view-walkthrough .uaw-tool-handoff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  list-style: none;
  background: #fff;
  counter-reset: tool-handoff;
}

#view-walkthrough .uaw-tool-handoff li {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  counter-increment: tool-handoff;
}

#view-walkthrough .uaw-tool-handoff li:nth-child(2n) {
  border-right: 0;
}

#view-walkthrough .uaw-tool-handoff li:nth-last-child(-n+2) {
  border-bottom: 0;
}

#view-walkthrough .uaw-tool-handoff span::before {
  content: counter(tool-handoff) '. ';
  color: #245bd7;
}

#view-walkthrough .uaw-tool-handoff span {
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
}

#view-walkthrough .uaw-tool-handoff strong {
  overflow: hidden;
  color: #26364f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-walkthrough [data-uaw-program-actions] {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: #fff;
}

#view-walkthrough .peca-task-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

#view-walkthrough .peca-task-actions > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  min-height: 0;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  background: #fff;
}

#view-walkthrough .peca-task-actions > button:hover {
  background: #f7faff;
}

#view-walkthrough .peca-task-actions > button strong {
  font-size: 10px;
}

#view-walkthrough .peca-task-actions > button span {
  grid-column: 1;
  font-size: 9px;
}

#view-walkthrough .peca-task-actions > button em {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245bd7;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

#view-walkthrough [data-uaw-program-actions] :is(.adpe-entry, .project-linked-knowledge-cards, .at-current-program-meta) {
  margin: 0 !important;
  padding: 8px 9px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf1f6 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

#view-walkthrough [data-uaw-program-actions] .at-current-program-meta {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px !important;
}

#view-walkthrough [data-uaw-program-actions] .at-current-program-meta > span {
  padding: 3px 6px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #526174 !important;
  font-size: 10px !important;
}

#view-walkthrough [data-uaw-program-actions] .at-current-program-meta > button {
  flex: 1 1 120px;
}

#view-walkthrough .uaw-tool-boundary {
  margin: 0;
  color: #64748b;
  font-size: 9px;
  line-height: 1.5;
}

#view-walkthrough .uaw-secondary-capabilities {
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid #e1e7ef;
}

#view-walkthrough .uaw-secondary-capabilities > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #40516a;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 750;
}

#view-walkthrough .uaw-secondary-capabilities > summary::-webkit-details-marker {
  display: none;
}

#view-walkthrough .uaw-secondary-capabilities > summary small {
  color: #245bd7;
  font-size: 9px;
}

#view-walkthrough .uaw-secondary-capabilities[open] > summary small {
  font-size: 0;
}

#view-walkthrough .uaw-secondary-capabilities[open] > summary small::after {
  content: '收起';
  font-size: 9px;
}

#view-walkthrough .uaw-secondary-capabilities > div {
  display: grid;
  gap: 8px;
  padding-top: 9px;
}

#view-walkthrough .uaw-secondary-capabilities:not([open]) > div {
  display: none;
}

#view-walkthrough .uaw-bottom {
  grid-column: 1;
  grid-row: 3;
  position: relative;
  bottom: auto;
  z-index: 20;
  min-height: 58px;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-top: 1px solid #d9e1eb;
  border-radius: 0;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 -5px 18px rgba(15, 23, 42, .04);
}

#view-walkthrough .uaw-bottom > [data-uaw-mode-actions] {
  width: 100%;
  gap: 12px;
}

#view-walkthrough .uaw-bottom-copy {
  gap: 3px;
}

#view-walkthrough .uaw-bottom-copy strong {
  font-size: 12px;
}

#view-walkthrough .uaw-bottom-copy span {
  font-size: 10px;
}

#view-walkthrough .uaw-bottom-actions {
  gap: 7px;
}

#view-walkthrough .uaw-bottom-actions .btn {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 7px;
}

#view-walkthrough .uaw-bottom-toggle {
  min-height: 32px;
  border-color: transparent;
  color: #64748b;
  background: transparent;
}

#view-walkthrough .uaw-mode-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  flex: 1;
}

#view-walkthrough .uaw-mode-composer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#view-walkthrough .uaw-mode-composer > header > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#view-walkthrough .uaw-mode-composer > header span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
}

#view-walkthrough .uaw-mode-composer > header strong {
  color: #172033;
  font-size: 13px;
}

#view-walkthrough .uaw-mode-composer > header small {
  color: #64748b;
  font-size: 10px;
}

#view-walkthrough .uaw-mode-composer label {
  display: block;
}

#view-walkthrough .uaw-mode-composer textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  max-height: 100px;
  resize: vertical;
  padding: 9px 11px;
  border: 1px solid #b9c9df;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font: inherit;
  line-height: 1.45;
}

/* Restore the 2026-08-27 compact AI-assist dock. The assistant stays a
 * lightweight launcher and never competes with the evidence work area. */
#view-walkthrough .uaw-assist-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

#view-walkthrough .uaw-assist-compact-label {
  display: grid;
  gap: 1px;
  padding-right: 10px;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
}

#view-walkthrough .uaw-assist-compact-label b {
  color: #2563eb;
  font-size: 11px;
}

#view-walkthrough .uaw-assist-compact-label small {
  color: #64748b;
  font-size: 9px;
}

#view-walkthrough .uaw-assist-compact-input {
  display: block;
  min-width: 0;
}

#view-walkthrough .uaw-assist-compact-input textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  max-height: 72px;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid #c7d3e3;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  line-height: 1.35;
}

#view-walkthrough .uaw-assist-compact > .uaw-inline-message {
  grid-column: 2 / 4;
  min-height: 0;
  margin: -3px 0 0;
  font-size: 9px;
}

#view-walkthrough .uaw-send-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#view-walkthrough .uaw-send-preview > span {
  display: inline-flex;
  gap: 5px;
  width: auto;
  padding: 4px 7px;
  border: 1px solid #dce4ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
}

#view-walkthrough .uaw-send-preview b {
  font-size: 9px;
}

#view-walkthrough .uaw-composer-boundary {
  margin: 0;
  color: #64748b;
  font-size: 9px;
  line-height: 1.35;
}

/* Formal canvas: one overview, one dataset, no nested dashboard stack. */
#view-walkthrough :is(.at-shell, .at-layout, .at-workspace, .at-evidence-workbench) {
  min-width: 0;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

#view-walkthrough .at-shell {
  padding: 0;
}

#view-walkthrough .at-execution-workbench {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100%;
  gap: 0;
}

#view-walkthrough .at-execution-workbench.is-program-collapsed {
  grid-template-columns: minmax(0, 1fr) !important;
}

#view-walkthrough .at-execution-workbench > .at-sidebar {
  min-width: 0;
  border: 0;
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
  background: #f8fafc;
}

#view-walkthrough .at-execution-workbench > .at-sidebar.is-collapsed {
  display: none !important;
}

#view-walkthrough .at-execution-worksheet {
  padding: 12px 16px 30px;
}

#view-walkthrough .at-program-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin: 0 0 8px;
}

#view-walkthrough .at-program-page-title > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

#view-walkthrough .at-program-page-title span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
}

#view-walkthrough .at-program-page-title h1 {
  margin: 0;
  color: #172033;
  font-size: 22px;
  line-height: 1.2;
}

#view-walkthrough .at-program-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px !important;
  gap: 18px;
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #fff;
}

#view-walkthrough .at-program-overview-main,
#view-walkthrough .at-program-overview-side {
  min-width: 0;
}

#view-walkthrough .at-program-overview > .at-program-overview-main {
  display: block !important;
}

#view-walkthrough .at-program-overview dl {
  margin: 0;
}

#view-walkthrough .at-program-overview-main dl {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  gap: 9px 22px;
}

#view-walkthrough .at-program-overview-main dl > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

#view-walkthrough .at-program-overview-main dl > div.is-wide {
  grid-column: 1 / -1;
}

#view-walkthrough .at-program-overview dt,
#view-walkthrough .at-program-overview-side dt {
  color: #64748b;
  font-size: 11px;
}

#view-walkthrough .at-program-overview dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-walkthrough .at-program-overview-main .is-wide dd {
  white-space: normal;
}

#view-walkthrough .at-program-overview-side {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid #e7ebf1;
}

#view-walkthrough .at-program-overview-side dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
}

#view-walkthrough .at-program-overview-side dl > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 6px;
}

#view-walkthrough .at-program-overview-side dd.is-status {
  color: #16845b;
}

#view-walkthrough .at-program-overview-side dd.is-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #1eaf7a;
}

#view-walkthrough .at-program-overview-side .btn-link {
  justify-self: start;
  min-height: 28px;
  padding: 0;
  border: 0;
  color: #2563eb;
  background: transparent;
  box-shadow: none;
}

#view-walkthrough .at-program-overview > .at-current-program-meta {
  display: none;
}

#view-walkthrough .at-program-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, .75fr)) minmax(155px, 1.15fr) auto;
  align-items: stretch;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #fff;
}

#view-walkthrough .at-program-metrics > div {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 0 6px;
  min-height: 58px;
  padding: 7px 12px;
  border-right: 1px solid #e7ebf1;
}

#view-walkthrough .at-program-metrics span {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
}

#view-walkthrough .at-program-metrics strong {
  color: #172033;
  font-size: 20px;
  line-height: 1.15;
}

#view-walkthrough .at-program-metrics small {
  align-self: end;
  color: #64748b;
  font-size: 9px;
}

#view-walkthrough .at-program-metrics .is-exception strong {
  color: #dc2626;
}

#view-walkthrough .at-program-metrics .at-program-progress {
  grid-template-columns: auto 1fr;
}

#view-walkthrough .at-program-progress strong {
  justify-self: end;
  font-size: 12px;
}

#view-walkthrough .at-program-progress i {
  grid-column: 1 / -1;
  align-self: center;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

#view-walkthrough .at-program-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

#view-walkthrough .at-program-metrics > button {
  align-self: center;
  margin: 0 10px;
}

#view-walkthrough .at-execution-lineage {
  display: none !important;
}

#view-walkthrough .at-execution-basis:not([open]) {
  display: none;
}

#view-walkthrough .at-execution-basis[open] {
  margin: 0 0 10px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
}

#view-walkthrough .at-execution-basis > summary {
  padding: 10px 12px;
}

#view-walkthrough .at-evidence-workbench {
  margin: 0;
  padding: 0;
}

#view-walkthrough .at-evidence-workbench-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px !important;
  min-height: 42px;
  padding: 0 4px !important;
  border: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #fff !important;
}

#view-walkthrough .at-evidence-workbench-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

#view-walkthrough .at-evidence-workbench-head > div:first-child span {
  color: #2563eb;
  font-size: 9px;
  font-weight: 800;
}

#view-walkthrough .at-evidence-workbench-head h3 {
  margin: 0;
  font-size: 14px !important;
}

#view-walkthrough .at-evidence-kpis {
  display: none !important;
}

#view-walkthrough .at-evidence-actions {
  display: flex;
  gap: 6px;
  grid-column: auto !important;
  overflow: visible !important;
}

#view-walkthrough .at-evidence-actions .btn {
  min-height: 29px !important;
  padding: 4px 8px !important;
  border-radius: 6px;
  font-size: 10px;
}

#view-walkthrough .at-regular-workflow[hidden] {
  display: none !important;
}

#view-walkthrough .at-evidence-import-drawer {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e7ebf1;
  border-radius: 0;
  background: #fff;
}

#view-walkthrough .at-evidence-import-drawer > summary {
  min-height: 34px;
  padding: 4px 6px;
  background: #fff;
}

#view-walkthrough .at-evidence-import-drawer > summary div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

#view-walkthrough .at-evidence-import-drawer > summary span,
#view-walkthrough .at-evidence-import-drawer > summary b {
  font-size: 9px;
}

#view-walkthrough .at-evidence-import-drawer > summary strong {
  font-size: 11px;
}

#view-walkthrough .at-evidence-dropzone {
  margin: 8px;
  min-height: 88px;
  padding: 12px;
}

#view-walkthrough .at-evidence-work-area,
#view-walkthrough .at-evidence-work-area.is-sources-hidden {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
  min-height: 360px;
  margin: 0;
  border: 1px solid #d9e1eb;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

#view-walkthrough .at-evidence-sources.is-hidden {
  display: none !important;
}

#view-walkthrough .at-evidence-sources:not(.is-hidden) {
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
}

#view-walkthrough .at-evidence-work-area:not(.is-sources-hidden) {
  grid-template-columns: 230px minmax(0, 1fr) !important;
}

/* The evidence stage is a workspace, not a document-length list. Keep large
 * source sets and data rows inside their own scroll coordinates so judgment,
 * review and the mode dock remain reachable in the same page context. */
@media (min-width: 961px) {
  #view-walkthrough .at-evidence-work-area {
    height: 620px !important;
    min-height: 620px !important;
    max-height: 620px;
    overflow: hidden !important;
  }

  #view-walkthrough .at-evidence-work-area > .at-evidence-sources,
  #view-walkthrough .at-evidence-work-area > .at-evidence-preview {
    box-sizing: border-box;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 620px;
  }

  #view-walkthrough .at-evidence-work-area > .at-evidence-sources {
    overflow: hidden;
  }

  #view-walkthrough .at-evidence-work-area .at-evidence-source-body {
    height: calc(100% - 42px);
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #view-walkthrough .at-evidence-work-area > .at-evidence-preview {
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
  }

  #view-walkthrough .at-evidence-work-area :is(.at-evidence-table-wrap, .at-document-preview, .at-linked-material-preview) {
    min-height: 0;
    overflow: auto !important;
    overscroll-behavior: contain;
  }

  #view-walkthrough .at-evidence-work-area .at-evidence-table-wrap {
    flex: 1 1 auto;
  }
}

#view-walkthrough .at-evidence-preview {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
}

#view-walkthrough .at-evidence-preview-head {
  min-height: 42px;
  padding: 8px 10px !important;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

#view-walkthrough .at-evidence-preview-head strong {
  font-size: 12px;
}

#view-walkthrough .at-evidence-preview-head small {
  max-width: 340px;
  font-size: 9px;
}

#view-walkthrough .at-data-toolbar {
  padding: 7px 9px !important;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

#view-walkthrough :is(.at-evidence-table-wrap, .at-document-preview, .at-linked-material-preview) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#view-walkthrough .at-evidence-result,
#view-walkthrough :is(.at-inline-materials, .at-execution-assistance, .at-execution-more, .at-case-capture, .at-danger-drawer) {
  margin-top: 10px;
}

#view-walkthrough .at-inline-materials.is-command-open[open] {
  border-color: #9dbff5 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08) !important;
}

/* Project-material selection is a requested secondary action. Keep the
   collapsed selector out of the reading flow; when opened it is assembled
   before the data canvas by audit-testing-ui.js. */
#view-walkthrough .at-primary-view-panel > .at-inline-materials {
  margin: 0 0 12px !important;
}

#view-walkthrough .at-primary-view-panel > .at-inline-materials:not([open]) {
  display: none !important;
}

#view-walkthrough .at-evidence-result {
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  box-shadow: none;
}

#view-walkthrough .at-page-guide-after {
  margin: 12px 16px 28px;
}

/* Dedicated, process-level interview entry. */
#view-auditinterview .aiw-stage-page {
  max-width: 1320px;
  margin: 0 auto;
  color: #172033;
}

#view-auditinterview .aiw-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 20px 22px;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  background: #fff;
}

#view-auditinterview .aiw-stage-header > .aiw-entry {
  order: 2;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

#view-auditinterview .aiw-stage-header > .aiw-entry > div {
  display: none;
}

#view-auditinterview .aiw-stage-header > .aiw-entry > button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #2f6feb;
  border-radius: 8px;
  background: #2f6feb;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

#view-auditinterview .aiw-stage-header > .btn {
  order: 3;
}

#view-auditinterview .aiw-stage-header span,
#view-auditinterview .aiw-stage-section-head span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
}

#view-auditinterview .aiw-stage-header h2 {
  margin: 4px 0 5px;
  font-size: 24px;
}

#view-auditinterview .aiw-stage-header p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

#view-auditinterview .aiw-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1px solid #bcd0ee;
  border-radius: 9px;
  background: #f7faff;
}

#view-auditinterview .aiw-entry > div {
  display: grid;
  gap: 3px;
}

#view-auditinterview .aiw-entry span {
  color: #64748b;
  font-size: 11px;
}

#view-auditinterview .aiw-stage-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
}

#view-auditinterview .aiw-stage-content > section,
#view-auditinterview .aiw-stage-content > aside {
  padding: 18px;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  background: #fff;
}

#view-auditinterview .aiw-stage-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

#view-auditinterview .aiw-stage-section-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

#view-auditinterview .aiw-stage-section-head small,
#view-auditinterview .aiw-stage-content > aside li {
  color: #64748b;
  font-size: 11px;
}

#view-auditinterview .aiw-stage-list {
  display: grid;
}

#view-auditinterview .aiw-stage-list > button {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid #e7ebf1;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

#view-auditinterview .aiw-stage-list > button > span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 750;
}

#view-auditinterview .aiw-stage-list > button > div {
  display: grid;
  gap: 3px;
}

#view-auditinterview .aiw-stage-list small {
  color: #64748b;
  font-size: 10px;
}

#view-auditinterview .aiw-stage-list b {
  color: #2563eb;
  font-size: 11px;
}

#view-auditinterview .aiw-stage-empty {
  display: grid;
  gap: 4px;
  padding: 24px 4px 8px;
}

#view-auditinterview .aiw-stage-empty span {
  color: #64748b;
  font-size: 11px;
}

#view-auditinterview .aiw-stage-content > aside ol {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.55;
}

#view-walkthrough :is(.uaw-program-support, .uaw-secondary-capabilities)[hidden] {
  display: none !important;
}

#view-walkthrough .uaw-shell[data-uaw-has-program="false"] :is(.uaw-tool-handoff, .uaw-tool-boundary),
#view-walkthrough .uaw-shell[data-uaw-has-program="false"] :is(.at-page-guide-after, .at-scheme-gate-inline, .ajr-review-stage) {
  display: none !important;
}

#view-walkthrough .uaw-inspector-state.is-empty.is-compact {
  display: grid;
  gap: 3px;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
}

#view-walkthrough .uaw-inspector-state.is-empty.is-compact h3,
#view-walkthrough .uaw-inspector-state.is-empty.is-compact p {
  margin: 0;
}

#view-walkthrough .uaw-inspector-state.is-empty.is-compact h3 {
  font-size: 13px;
}

#view-walkthrough .uaw-inspector-state.is-empty.is-compact p {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

#view-walkthrough .uaw-context {
  gap: 10px;
  padding: 13px 13px 18px;
}

#view-walkthrough .uaw-context-head {
  padding-bottom: 9px;
}

#view-walkthrough .uaw-context-head strong {
  font-size: 16px;
  line-height: 1.3;
}

#view-walkthrough .uaw-context-head span {
  font-size: 11px;
}

#view-walkthrough .uaw-default-context h3,
#view-walkthrough .uaw-support-head h3 {
  font-size: 15px;
  line-height: 1.3;
}

#view-walkthrough .uaw-inspector-section dl > div,
#view-walkthrough .uaw-task-facts > div {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
}

#view-walkthrough .uaw-inspector-section :is(dt, p, small),
#view-walkthrough .uaw-task-facts dt {
  font-size: 12px;
  line-height: 1.55;
}

#view-walkthrough .uaw-inspector-section :is(dd, strong),
#view-walkthrough .uaw-task-facts dd {
  font-size: 13px;
  line-height: 1.55;
}

#view-walkthrough .uaw-inspector-context > dl > div:first-child dd {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#view-walkthrough .uaw-context-more {
  margin-top: 2px;
  border-top: 1px solid #e7ebf1;
}

#view-walkthrough .uaw-responsibility {
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid #e7ebf1;
}

#view-walkthrough .uaw-responsibility > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

#view-walkthrough .uaw-responsibility > header h4 {
  margin: 0;
  color: #26364f;
  font-size: 13px;
  line-height: 1.35;
}

#view-walkthrough .uaw-responsibility > header span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245bd7;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

#view-walkthrough .uaw-responsibility dl {
  margin: 0;
}

#view-walkthrough .uaw-responsibility dl > div {
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 4px 0;
}

#view-walkthrough .uaw-context-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0 1px;
  color: #526177;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  list-style: none;
}

#view-walkthrough .uaw-context-more > summary::-webkit-details-marker {
  display: none;
}

#view-walkthrough .uaw-context-more > summary small {
  color: #245bd7;
  font-size: 10px;
  font-weight: 650;
}

#view-walkthrough .uaw-context-more[open] > summary small {
  color: transparent;
}

#view-walkthrough .uaw-context-more[open] > summary small::after {
  content: '收起';
  color: #245bd7;
}

#view-walkthrough .uaw-program-support {
  gap: 8px;
  padding-top: 11px;
}

#view-walkthrough .uaw-support-head span,
#view-walkthrough .uaw-support-head small {
  font-size: 10px;
}

#view-walkthrough .uaw-tool-handoff {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#view-walkthrough .uaw-tool-handoff li {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
}

#view-walkthrough .uaw-tool-handoff li:nth-child(2n) {
  border-right: 0;
}

#view-walkthrough .uaw-tool-handoff li:nth-last-child(-n+2) {
  border-bottom: 0;
}

#view-walkthrough .uaw-tool-handoff span,
#view-walkthrough .uaw-tool-handoff strong {
  font-size: 11px;
  line-height: 1.35;
}

#view-walkthrough .uaw-tool-handoff strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  #view-walkthrough *,
  #view-auditinterview * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

#view-walkthrough [data-uaw-program-actions] .adpe-entry {
  padding: 0 !important;
}

#view-walkthrough [data-uaw-program-actions][data-uaw-data-preparation-required="false"] .adpe-entry {
  display: none !important;
}

#view-walkthrough [data-uaw-program-actions] .adpe-entry > button,
#view-walkthrough .peca-task-actions > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  background: #fff;
  color: #26364f;
  text-align: left;
  cursor: pointer;
}

#view-walkthrough [data-uaw-program-actions] .adpe-entry > button:hover {
  background: #f7faff;
}

#view-walkthrough [data-uaw-program-actions] .adpe-entry > button strong,
#view-walkthrough .peca-task-actions > button strong {
  font-size: 13px;
}

#view-walkthrough [data-uaw-program-actions] .adpe-entry > button span,
#view-walkthrough .peca-task-actions > button span {
  grid-column: 1;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

#view-walkthrough [data-uaw-program-actions] .adpe-entry > button em,
#view-walkthrough .peca-task-actions > button em {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245bd7;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

#view-walkthrough .uaw-tool-boundary,
#view-walkthrough .uaw-secondary-capabilities > summary {
  font-size: 10px;
  line-height: 1.5;
}

#view-walkthrough .at-evidence-mark-index {
  position: relative;
  width: max-content;
  max-width: calc(100% - 8px);
  margin: 7px 4px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible;
}

#view-walkthrough .at-evidence-mark-index > summary {
  display: inline-flex !important;
  min-height: 28px;
  gap: 7px;
  padding: 4px 9px !important;
  border: 1px solid #e7cf96;
  border-radius: 999px;
  background: #fffaf0;
}

#view-walkthrough .at-evidence-mark-index > summary :is(span, small) {
  font-size: 10px !important;
}

#view-walkthrough .at-evidence-mark-index > div {
  position: absolute;
  z-index: 18;
  width: min(520px, calc(100vw - 360px));
  max-height: 320px;
  margin-top: 6px;
  padding: 8px;
  overflow: auto;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
}

#view-walkthrough .at-evidence-preview-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 6px 10px !important;
}

#view-walkthrough .at-evidence-preview-head > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

#view-walkthrough .at-evidence-preview-head strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-walkthrough .at-evidence-preview-head span,
#view-walkthrough .at-evidence-preview-head small {
  flex: none;
  color: #64748b;
  font-size: 10px;
}

#view-walkthrough .at-data-toolbar {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px !important;
  padding: 6px 9px !important;
}

#view-walkthrough .at-data-toolbar label:first-child {
  flex: 1 1 220px;
}

#view-walkthrough .at-data-toolbar label:nth-child(2) {
  flex: 0 1 180px;
}

#view-walkthrough .at-data-toolbar label {
  display: block !important;
}

#view-walkthrough .at-data-toolbar :is(input, select) {
  width: 100%;
  height: 31px;
  min-height: 31px;
  font-size: 11px;
}

#view-walkthrough .at-data-toolbar > span {
  margin-left: auto;
  font-size: 10px !important;
}

#view-walkthrough .at-evidence-actions > [hidden] {
  display: none !important;
}

#view-walkthrough .uaw-collab-composer.is-unavailable textarea {
  background: #fff;
}

#view-walkthrough .uaw-collab-composer.is-unavailable > header small,
#view-walkthrough .uaw-collab-composer.is-unavailable .uaw-composer-boundary {
  color: #8a5b18;
}

@media (max-width: 1550px) and (min-width: 769px) {
  #view-walkthrough .uaw-shell {
    --uaw-context-width: 286px;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--uaw-context-width));
  }

  #view-walkthrough .at-program-overview {
    grid-template-columns: minmax(0, 1fr) 220px !important;
    gap: 12px;
    padding: 12px 14px;
  }

  #view-walkthrough .at-program-overview-main dl {
    gap: 7px 12px;
  }

  #view-walkthrough .at-program-overview-main dl > div {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  #view-walkthrough .at-program-overview-side {
    padding-left: 12px;
  }

  #view-walkthrough .at-program-overview-side dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #view-walkthrough .at-program-metrics {
    grid-template-columns: repeat(4, minmax(78px, .7fr)) minmax(125px, 1fr) auto;
  }

  #view-walkthrough .at-program-metrics > div {
    padding-inline: 8px;
  }
}

@media (max-width: 960px) {
  body[data-active-view="walkthrough"] {
    overflow: auto;
  }

  #view-walkthrough .uaw-shell {
    display: block;
    height: auto !important;
  }

  #view-walkthrough .uaw-formal,
  #view-walkthrough .uaw-context,
  #view-walkthrough .uaw-bottom {
    display: block;
    overflow: visible;
  }

  #view-walkthrough .uaw-context-resizer {
    display: none;
  }

  #view-walkthrough .at-program-overview,
  #view-auditinterview .aiw-stage-content {
    grid-template-columns: 1fr;
  }

  #view-walkthrough .at-program-overview-side {
    padding: 10px 0 0;
    border-top: 1px solid #e7ebf1;
    border-left: 0;
  }

  #view-walkthrough .at-program-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #view-walkthrough .uaw-assist-compact {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #view-walkthrough .uaw-assist-compact-label {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    padding-right: 0;
    border-right: 0;
  }

  #view-walkthrough .uaw-assist-compact > .uaw-inline-message {
    grid-column: 1 / -1;
  }
}

/* P4 remediation: quiet regular rail, collapsible context and a single visible next step. */
#view-walkthrough .uaw-inspector-context {
  display: grid;
  gap: 0;
}

#view-walkthrough .uaw-context-block {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e5eaf1;
  background: transparent;
}

#view-walkthrough .uaw-context-block > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 1px;
  color: #26364f;
  cursor: pointer;
  list-style: none;
}

#view-walkthrough .uaw-context-block > summary::-webkit-details-marker {
  display: none;
}

#view-walkthrough .uaw-context-block > summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#view-walkthrough .uaw-context-block > summary b {
  font-size: 12px;
  line-height: 1.35;
}

#view-walkthrough .uaw-context-block > summary small {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-walkthrough .uaw-context-block > summary em {
  color: #245bd7;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

#view-walkthrough .uaw-context-block[open] > summary em {
  font-size: 0;
}

#view-walkthrough .uaw-context-block[open] > summary em::after {
  content: '收起';
  font-size: 10px;
}

#view-walkthrough .uaw-context-block > dl {
  margin: 0;
  padding: 0 1px 8px;
}

#view-walkthrough .uaw-responsibility {
  margin: 0;
  padding: 0;
  border-top: 0;
}

#view-walkthrough .uaw-handoff-path {
  display: grid;
  gap: 0;
  margin: 2px 0 4px;
  padding: 3px 8px;
  border: 1px solid #dce5f1;
  border-radius: 7px;
  background: #f8fafc;
  list-style: none;
}

#view-walkthrough .uaw-handoff-path > li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
  padding: 6px 0;
}

#view-walkthrough .uaw-handoff-path > li + li {
  border-top: 1px solid #e4eaf2;
}

#view-walkthrough .uaw-handoff-path > li > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#view-walkthrough .uaw-handoff-path small {
  color: #64748b;
  font-size: 9px;
}

#view-walkthrough .uaw-handoff-path strong {
  color: #26364f;
  font-size: 11px;
  line-height: 1.38;
}

#view-walkthrough .uaw-handoff-path > li > i {
  width: 14px;
  height: 14px;
  margin: 2px 0 0 1px;
  color: #7d93b5;
}

#view-walkthrough .uaw-program-support {
  gap: 7px;
  padding-top: 9px;
  border-top: 0;
}

#view-walkthrough .uaw-support-head {
  align-items: end;
}

#view-walkthrough .uaw-next-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 1px 9px;
  min-width: 0;
}

#view-walkthrough .uaw-next-action > span {
  grid-row: 1 / span 2;
  align-self: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245bd7;
  font-size: 10px;
  font-weight: 800;
}

#view-walkthrough .uaw-next-action > strong {
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-walkthrough .uaw-next-action > small {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-walkthrough .uaw-next-action.is-failed > span {
  background: #fff1e8;
  color: #9a3412;
}

/* P4 visual refinement: preserve the formal object while removing cramped text and uneven metrics. */
#view-walkthrough .at-program-overview dd {
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.5 !important;
}

#view-walkthrough .at-program-overview-main .is-program-name dd {
  white-space: nowrap;
}

#view-walkthrough .at-program-overview-main .is-program-objective dd {
  display: -webkit-box;
  max-height: 3em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

#view-walkthrough .at-program-metrics :is(span, small) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

@container (max-width: 700px) {
  #view-walkthrough .at-program-overview {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px;
    padding: 10px 12px;
  }

  #view-walkthrough .at-program-overview-main dl {
    gap: 5px 12px;
  }

  #view-walkthrough .at-program-overview-main dl > div {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 6px;
  }

  #view-walkthrough .at-program-overview dt,
  #view-walkthrough .at-program-overview-side dt {
    font-size: 10px;
    white-space: nowrap;
  }

  #view-walkthrough .at-program-overview dd {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  #view-walkthrough .at-program-overview-side {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 8px 0 0;
    border-top: 1px solid #edf1f5;
    border-left: 0;
  }

  #view-walkthrough .at-program-overview-side dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  #view-walkthrough .at-program-overview-side dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }

  #view-walkthrough .at-program-overview-side dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #view-walkthrough .at-program-overview-side .btn-link {
    min-height: 24px;
    white-space: nowrap;
  }

  #view-walkthrough .at-program-metrics {
    position: relative;
    grid-template-columns: repeat(4, minmax(58px, .72fr)) minmax(96px, 1.16fr) 30px;
  }

  #view-walkthrough .at-program-metrics > div {
    min-height: 54px;
    padding: 6px;
    gap: 0 4px;
  }

  #view-walkthrough .at-program-metrics span {
    font-size: 9px;
  }

  #view-walkthrough .at-program-metrics strong {
    font-size: 17px;
  }

  #view-walkthrough .at-program-metrics small {
    font-size: 8px;
  }

  #view-walkthrough .at-program-metrics > button {
    width: 26px;
    min-width: 26px;
    min-height: 28px;
    margin: 0 2px;
    padding: 0;
    overflow: hidden;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }

  #view-walkthrough .at-program-metrics > button::before {
    content: '\21BB';
    color: #526177;
    font-size: 14px;
    line-height: 1;
  }
}

/* P0: reserve a usable evidence canvas on common 1280/1366px laptop widths. */
@media (min-width:1181px) and (max-width:1400px) {
  #view-walkthrough .uaw-shell { --uaw-context-width: 280px; }
  #view-walkthrough .at-evidence-table-wrap { overflow-x:auto; scrollbar-gutter:stable both-edges; }
}
