/* The document workspace follows Bild's current light workbench tokens.
   Marketing styles remain outside the workspace. No org/user/settings chrome. */
.workspace {
  --app-bg: #f7f7f8;
  --app-surface: #fff;
  --app-secondary: #f9f9f9;
  --app-hover: #efeff0;
  --app-selected: #e9e9eb;
  --app-line: #e6e6e8;
  --app-rule: #cdcdd1;
  --app-ink: #202123;
  --app-muted: #62636a;
  --app-accent: #252628;
  --app-fail: #ff3b30;
  --app-pass: #34c759;
  --app-source: #0071e3;
  color: var(--app-ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI",
    sans-serif;
  border-color: var(--app-rule);
  box-shadow: none;
}
.workspace .paper img,
.workspace .page-thumb img {
  height: auto;
  object-fit: contain;
}
.workspace .page-thumb img {
  aspect-ratio: 612 / 792;
}
.workspace .primary {
  background: var(--app-accent);
  border-color: var(--app-accent);
}
.workspace .quiet-button {
  color: var(--app-ink);
  border-color: var(--app-rule);
}
.workspace .app-glyph {
  display: none;
}
.workspace .workspace-bar,
.workspace .pane-toolbar,
.workspace .plan-title,
.workspace .plan-footer {
  background: var(--app-bg);
  border-color: var(--app-line);
}
.workspace .workspace-title span,
.workspace .source-detail small,
.workspace .source-detail p,
.workspace .plan-title p {
  color: var(--app-muted);
}
.workspace .drawing-pane,
.workspace .paper-scroll {
  background: var(--app-bg);
}
.workspace .tag {
  background: var(--app-selected);
  color: var(--app-muted);
}
.workspace .plan-table thead th {
  background: var(--app-secondary);
  color: var(--app-muted);
}
.workspace .plan-table tbody tr.selected {
  background: var(--app-selected);
}
.workspace .selected .row-link {
  background: var(--app-accent);
  border-color: var(--app-accent);
}
.workspace .method-select {
  color: var(--app-ink);
  border-color: var(--app-rule);
}
/* Match the Inspect workspace: table first, linked drawing at the right. */
.workspace .drawing-pane {
  border-right: 0;
  border-left: 1px solid var(--app-line);
}
.workspace .plan-title {
  padding: 12px 16px;
  background: white;
}
.workspace .plan-table th,
.workspace .plan-table td {
  border-color: var(--app-line);
  border-right: 1px solid var(--app-line);
  padding: 8px;
  font-size: 12px;
}
.workspace .plan-table th:first-child,
.workspace .plan-table td:first-child {
  width: 56px;
  text-align: center;
}
.workspace .plan-table input {
  accent-color: var(--app-accent);
}
.workspace .plan-table .row-link {
  border: 0;
  background: transparent;
  color: var(--app-ink);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  margin: auto;
}
.workspace .plan-table .selected .row-link {
  background: #dc2626;
  color: white;
}
.workspace .characteristic-button {
  font-weight: 500;
  font-size: 13px;
}
.workspace .method-select {
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  min-height: 36px;
  font-size: 12px;
  max-width: none;
}
.workspace .method-select:hover {
  background: var(--app-hover);
}
.workspace .method-select:focus {
  border-color: var(--app-muted);
}
.workspace .pane-tools button[aria-pressed="true"] {
  background: var(--app-accent);
  border-color: var(--app-accent);
}
.workspace .drawing-pane .source-box {
  border-color: #dc2626;
  background: #dc262612;
}
.workspace .drawing-pane .source-box::after {
  background: #dc2626;
}
.workspace .source-detail small {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.workspace .paper-scroll {
  scrollbar-color: var(--app-rule) transparent;
}
.capture-mode .workspace-bar {
  min-height: 60px;
  padding: 8px 16px;
}
.capture-mode .split-plan {
  height: calc(100vh - 60px);
}
.capture-mode .plan-table th,
.capture-mode .plan-table td {
  padding-block: 8px;
}
.capture-mode .drawing-pane .source-detail {
  min-height: 138px;
}
.dhr-workbench {
  border-radius: 8px;
  background: var(--app-bg);
  font-size: 13px;
  line-height: 1.45;
}
.dhr-workbench button,
.dhr-workbench a {
  color: inherit;
  font-size: 13px;
}
.dhr-workbench button:focus-visible,
.dhr-workbench a:focus-visible {
  outline: 2px solid var(--app-source);
  outline-offset: 2px;
}
.wb-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}
.wb-icon-button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 7px;
  flex: 0 0 auto;
}
.wb-icon-button:hover,
.wb-text-button:hover {
  background: var(--app-hover);
}
.wb-header {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-bg);
}
.wb-header > strong {
  font-size: 13px;
  font-weight: 590;
  white-space: nowrap;
}
.wb-header-divider {
  display: block;
  flex: 0 0 auto;
  width: 1px;
  height: 16px;
  background: var(--app-rule);
  margin: 0 3px;
}
.wb-header-document {
  color: var(--app-muted);
  font-size: 12px;
  white-space: nowrap;
}
.wb-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.wb-mode-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px 10px;
  font-weight: 400;
  white-space: nowrap;
}
.wb-mode-button[aria-pressed="true"] {
  background: var(--app-selected);
  font-weight: 500;
}
.wb-mode-button:hover {
  background: var(--app-hover);
}
.wb-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 618px;
}
.wb-body.is-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.wb-navigation {
  background: var(--app-bg);
  border-right: 1px solid var(--app-line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 750px;
  overflow: auto;
  padding: 8px;
  gap: 8px;
}
.wb-navigation > section {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.wb-navigation h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 550;
  margin: 0;
  min-height: 36px;
  padding: 4px 12px;
}
.wb-navigation h2 > span {
  font-size: 11px;
  font-weight: 500;
  color: var(--app-muted);
}
.wb-navigation h2 > .wb-error-count {
  background: #fff0ef;
  color: #c22b23;
  min-width: 18px;
  border-radius: 4px;
  text-align: center;
  line-height: 18px;
}
.wb-pages {
  padding-bottom: 10px;
}
.wb-page-groups {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 12px;
}
.wb-page-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 29px;
}
.wb-page-group > span {
  color: var(--app-muted);
  font-size: 12px;
}
.wb-page-group > div {
  display: flex;
  gap: 4px;
}
.wb-page-chip {
  width: 27px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-line);
  border-radius: 6px;
  background: white;
  padding: 0;
  font-size: 12px !important;
  font-weight: 500;
}
.wb-page-chip[aria-pressed="true"] {
  color: white;
  background: var(--app-ink);
  border-color: var(--app-ink);
}
.wb-page-chip:hover:not([aria-pressed="true"]) {
  background: var(--app-hover);
}
.wb-critical,
.wb-checks {
  padding: 0 0 8px;
}
.wb-cv-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 13px;
  font-size: 12px;
}
.wb-cv-row > span:first-child {
  color: var(--app-muted);
}
.wb-cv-row > strong {
  font-weight: 500;
}
.wb-cv-row > .wb-icon {
  color: #29964a;
  width: 14px;
  height: 14px;
}
.wb-cv-button {
  border: 0;
  text-align: left;
  background: white;
}
.wb-cv-button.is-active,
.wb-check-row.is-active {
  background: var(--app-selected);
}
.wb-cv-button:hover,
.wb-check-row:hover {
  background: var(--app-hover);
}
.wb-fail-mark {
  color: #db342b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.wb-check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 42px;
  width: 100%;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--app-line);
  padding: 9px 12px;
  text-align: left;
}
.wb-check-row strong {
  font-size: 12px;
  font-weight: 500;
}
.wb-check-row small {
  font-size: 11px;
  color: var(--app-muted);
  display: block;
  margin-top: 2px;
}
.wb-page-ref {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border: 1px solid var(--app-line);
  border-radius: 4px;
  color: var(--app-muted);
  font-size: 11px;
  margin-left: auto;
  flex-shrink: 0;
}
.wb-pass-row {
  align-items: center;
  font-size: 12px;
  min-height: 34px;
}
.wb-pass-row > .wb-icon {
  color: #29964a;
  width: 14px;
  height: 14px;
}
.wb-navigation-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 11px 12px;
  color: var(--app-muted);
  font-size: 11px;
}
.wb-status-dot {
  display: block;
  background: var(--app-fail);
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.wb-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  background: var(--app-bg);
}
.wb-stage.has-reference {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 35%);
}
.wb-primary {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wb-document-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--app-line);
  color: var(--app-muted);
  font-size: 12px;
}
.wb-toolbar-page {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dhr-workbench .record-viewport {
  flex: 1;
  min-height: 0;
}
.dhr-workbench .record-viewport .paper-scroll {
  height: 532px;
  max-height: 532px;
  min-height: 0;
  padding: 22px 24px;
  scrollbar-color: #bbbcc1 transparent;
}
.wb-paper-width {
  margin: 0 auto;
  min-width: 0;
  transition: none;
}
.dhr-workbench .record-viewport .paper {
  max-width: none;
  width: 100%;
  border: 1px solid var(--app-rule);
  box-shadow: 0 1px 2px #0000000a;
}
.wb-region {
  position: absolute;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1.5px solid var(--app-fail);
  background: #ff3b3015;
  border-radius: 2px;
}
.wb-region.is-active,
.wb-region:hover {
  border-width: 2px;
  background: #ff3b3026;
}
.wb-evidence-note {
  padding: 11px 15px 12px;
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
}
.wb-evidence-title {
  display: flex;
  align-items: center;
  gap: 7px;
}
.wb-evidence-title > strong {
  font-size: 12px;
  font-weight: 590;
}
.wb-text-button {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px !important;
  margin-left: auto;
  white-space: nowrap;
}
.wb-text-button .wb-icon {
  width: 13px;
  height: 13px;
}
.wb-evidence-values {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 4px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--app-muted);
}
.wb-evidence-values strong {
  color: var(--app-ink);
  font-weight: 550;
  margin-left: 5px;
}
.wb-evidence-values .wb-fail-text {
  color: #bf2a21;
}
.wb-evidence-note p {
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.5;
  max-width: 85ch;
}
.wb-viewer-hint {
  padding: 10px 16px;
  border-top: 1px solid var(--app-line);
  font-size: 11px;
  color: var(--app-muted);
  background: white;
}
.wb-reference {
  background: white;
  border-left: 1px solid var(--app-line);
  min-width: 0;
}
.wb-reference-header {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--app-bg);
  border-bottom: 1px solid var(--app-line);
}
.wb-reference-scroll {
  padding: 20px 14px;
  max-height: 640px;
  overflow: auto;
}
.wb-reference .paper {
  border: 1px solid var(--app-rule);
  box-shadow: none;
}
.wb-reference .source-box {
  min-width: 0;
  min-height: 0;
  border-width: 1.5px;
  border-color: var(--app-source);
  background: #0071e310;
}
.wb-reference .source-box::after {
  display: none;
}
.wb-source-detail {
  margin-top: 18px;
  font-size: 12px;
}
.wb-source-detail > span {
  color: var(--app-muted);
}
.wb-source-detail .callout-crop {
  height: 114px;
  border: 1px solid var(--app-rule);
  margin: 8px 0 12px;
  border-radius: 6px;
}
.wb-source-detail > strong {
  display: block;
  font-weight: 550;
  font-size: 13px;
}
.wb-source-detail p {
  margin: 5px 0;
  color: var(--app-muted);
  font-size: 12px;
}
.wb-footer {
  min-height: 44px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 5px 12px;
  background: white;
  border-top: 1px solid var(--app-line);
  font-size: 12px;
}
.wb-filename {
  color: var(--app-muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.wb-footer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.wb-rotate {
  transform: rotate(180deg);
}
.wb-zoom-value {
  border: 0;
  background: transparent;
  width: 44px;
  font-size: 12px !important;
  padding: 4px;
}
.wb-download {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--app-rule);
  border-radius: 6px;
  margin-left: auto;
  font-size: 12px !important;
}
.wb-download:hover {
  background: var(--app-hover);
}
@media (min-width: 1600px) {
  .wb-body {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .dhr-workbench .record-viewport .paper-scroll {
    height: 610px;
    max-height: 610px;
  }
}
@media (max-width: 1100px) {
  .wb-body {
    grid-template-columns: 238px minmax(0, 1fr);
  }
  .wb-stage.has-reference {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .dhr-workbench .record-viewport .paper-scroll {
    padding: 16px 12px;
  }
  .wb-header-document {
    display: none;
  }
  .wb-evidence-title {
    flex-wrap: wrap;
  }
  .wb-text-button {
    margin-left: 0;
  }
}
@media (max-width: 850px) {
  .wb-stage.has-reference {
    grid-template-columns: minmax(0, 1fr);
  }
  .wb-reference {
    border-left: 0;
    border-top: 1px solid var(--app-rule);
  }
  .wb-reference-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-height: 290px;
    padding: 14px;
  }
  .wb-source-detail {
    margin-top: 0;
  }
  .wb-filename {
    display: none;
  }
  .wb-footer-tools {
    margin-right: auto;
  }
  .wb-body {
    min-height: 0;
  }
  .wb-navigation {
    max-height: none;
  }
}
@media (max-width: 600px) {
  .wb-header {
    flex-wrap: wrap;
    height: auto;
    min-height: 44px;
    padding-block: 7px;
    gap: 6px;
  }
  .wb-header-actions {
    width: 100%;
    border-top: 1px solid var(--app-line);
    padding-top: 6px;
  }
  .wb-header-actions > a {
    margin-left: auto;
  }
  .wb-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .wb-navigation {
    border-right: 0;
    border-bottom: 1px solid var(--app-rule);
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: none;
  }
  .wb-pages {
    grid-column: 1/-1;
    border-bottom: 1px solid var(--app-rule);
    padding-bottom: 9px;
  }
  .wb-page-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }
  .wb-page-group > span {
    font-size: 11px;
  }
  .wb-critical {
    border-top: 0;
    border-right: 1px solid var(--app-line);
  }
  .wb-checks {
    border-top: 0;
  }
  .wb-cv-row {
    grid-template-columns: 1fr auto;
    gap: 3px;
    padding-inline: 9px;
    font-size: 11px;
  }
  .wb-cv-row > .wb-icon,
  .wb-cv-row > .wb-fail-mark {
    display: none;
  }
  .wb-cv-button {
    font-size: 11px !important;
  }
  .wb-check-row {
    padding: 7px 8px;
    gap: 5px;
  }
  .wb-check-row strong {
    font-size: 11px;
  }
  .wb-check-row small {
    font-size: 10px;
  }
  .wb-check-row > .wb-page-ref {
    display: none;
  }
  .wb-navigation-bottom {
    grid-column: 1/-1;
    min-height: 32px;
    padding: 8px 12px;
    border-top: 1px solid var(--app-line);
  }
  .dhr-workbench .record-viewport .paper-scroll {
    height: 420px;
    max-height: 420px;
  }
  .wb-document-toolbar {
    padding: 9px 10px;
    gap: 6px;
    font-size: 11px;
  }
  .wb-footer {
    gap: 4px;
    padding-inline: 6px;
  }
  .wb-footer .wb-icon-button {
    width: 27px;
  }
  .wb-footer .wb-download {
    font-size: 11px !important;
    gap: 4px;
  }
  .wb-reference-scroll {
    display: block;
    max-height: 380px;
  }
  .wb-source-detail {
    margin-top: 16px;
  }
}
