:root {
  --tblr-font-sans-serif: var(--fs-font-body);
  --tblr-primary: var(--fs-color-plum);
  --tblr-primary-rgb: 66, 11, 51;
  --tblr-body-bg: var(--fs-color-canvas);
  --tblr-body-color: var(--fs-color-ink);
  --tblr-border-color: var(--fs-color-border);
  --dr-surface: var(--fs-color-surface-elevated);
  --dr-surface-soft: var(--fs-color-surface);
  --dr-border: var(--fs-color-border);
  --dr-muted: var(--fs-color-secondary-text);
  --dr-ink: var(--fs-color-ink);
  --dr-brand: var(--fs-color-plum);
  --dr-brand-strong: var(--fs-color-deep-plum);
  --dr-accent: var(--fs-color-rose);
  --dr-status-success-bg: #eaf7ef;
  --dr-status-success-border: #b8e2c5;
  --dr-status-success-ink: #1f6f3b;
  --dr-status-warning-bg: #fff8e5;
  --dr-status-warning-border: #f4da99;
  --dr-status-warning-ink: #795500;
  --dr-status-danger-bg: #fdecec;
  --dr-status-danger-border: #f3b7b7;
  --dr-status-danger-ink: #962020;
  --dr-status-info-bg: #eee8f5;
  --dr-status-info-border: #cdbbdd;
  --dr-status-info-ink: #4d275f;
}

html {
  background: var(--fs-color-canvas);
}

body,
.dr-body {
  background: var(--fs-color-canvas);
  color: var(--fs-color-ink);
  font-family: var(--fs-font-body);
  min-height: 100vh;
}

@media (min-width: 1200px) {
  .container-xl {
    max-width: min(112rem, calc(100% - 2rem));
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.card-title {
  color: var(--fs-color-ink);
  font-family: var(--fs-font-heading);
}

.dr-shell {
  min-height: 100vh;
}

.dr-page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.dr-page-kicker {
  color: var(--dr-muted);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}

.dr-page-description {
  color: var(--dr-muted);
  margin: .4rem 0 0;
  max-width: 58rem;
}

.dr-toolbar,
.topbar,
.row,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.actions a {
  text-decoration: none;
}

.dr-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.dr-grid-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, .8fr);
  gap: 1rem;
}

.dr-workflow-grid {
  grid-template-columns: minmax(42rem, 1.45fr) minmax(22rem, .85fr);
}

.card {
  border-color: var(--dr-border);
  border-radius: var(--fs-radius-card);
  box-shadow: var(--fs-shadow-card);
  min-width: 0;
}

section.card > .row,
section.card > form {
  margin: 0;
  padding: 1rem 1.125rem;
}

section.card > .dr-table-wrap {
  padding: 1rem 1.125rem;
}

.card h3,
.card-title {
  letter-spacing: 0;
}

.stat {
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.1;
}

.muted,
.text-muted {
  color: var(--dr-muted) !important;
}

.mono,
.metrics,
.dr-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pill,
.status {
  align-items: center;
  background: #eef2f6;
  border: 1px solid var(--dr-border);
  border-radius: 999px;
  color: var(--dr-ink);
  display: inline-flex;
  gap: .35rem;
  min-height: 1.875rem;
  padding: .25rem .625rem;
}

.pill input[type="checkbox"],
.pill input[type="radio"] {
  margin: 0;
}

.status {
  font-size: .75rem;
  line-height: 1.25;
  max-width: 100%;
  min-height: 1.75rem;
  overflow-wrap: anywhere;
  padding-block: .3125rem;
  white-space: normal;
}

.status-ok,
.badge-ok {
  background: #eaf7ef;
  border-color: #b8e2c5;
  color: #1f7a3f;
}

.status-warn,
.badge-warn {
  background: #fff8e5;
  border-color: #f4da99;
  color: #8a5f00;
}

.status-fail,
.badge-fail,
.status-error {
  background: #fdecec;
  border-color: #f3b7b7;
  color: #a32020;
}

.status-running,
.badge-running {
  background: #e8f0ff;
  border-color: #b7cbff;
  color: #1f4aa8;
}

.status-neutral,
.badge-neutral {
  background: #eef2f6;
  border-color: var(--dr-border);
  color: #44515f;
}

.list {
  display: grid;
  gap: .625rem;
}

.panel {
  background: var(--dr-surface-soft);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-control);
  min-width: 0;
  padding: .875rem 1rem;
}

.metrics,
.dr-pre {
  background: #111827;
  border-radius: .5rem;
  color: #e5edf7;
  display: block;
  font-size: .8125rem;
  line-height: 1.5;
  margin: 0;
  max-height: 22rem;
  min-height: 4rem;
  overflow: auto;
  padding: .875rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.form-grid,
.dr-form-grid {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: .375rem;
}

.field label {
  color: var(--dr-muted);
  font-size: .8125rem;
  font-weight: 600;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea,
.field select,
#apiKeyInput {
  background: var(--dr-surface);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-control);
  color: var(--dr-ink);
  min-height: 2.5rem;
  padding: .5rem .75rem;
  width: 100%;
}

.field textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  min-height: 8rem;
  resize: vertical;
}

.checkbox-grid,
.dr-options-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.dr-effective-switch {
  display: grid;
  justify-items: start;
  gap: .35rem;
}

.dr-effective-switch [role="switch"] {
  min-width: 8rem;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.dr-effective-switch [role="switch"]::before {
  content: "";
  width: 1.8rem;
  height: 1rem;
  border-radius: 1rem;
  border: 1px solid currentColor;
  background: radial-gradient(circle at 25% 50%, currentColor 0 .3rem, transparent .33rem);
}

.dr-effective-switch [aria-checked="true"]::before {
  background: radial-gradient(circle at 75% 50%, currentColor 0 .3rem, transparent .33rem);
}

.dr-effective-switch.is-inherited [role="switch"] {
  background: var(--dr-surface);
  color: var(--dr-muted);
  border: 1px solid var(--dr-border);
}

.dr-switch-source { font-size: .85rem; }
.dr-switch-reset { font-size: .85rem; padding: .2rem .5rem; }
.dr-config-details { margin-top: 1rem; }
.dr-config-details > summary { cursor: pointer; font-weight: 600; }
.dr-config-details > .actions { margin-top: .75rem; }
[data-processing-run] [hidden],
.dr-privacy-options [hidden] { display: none !important; }

.option-card,
.dr-option-card {
  background: var(--dr-surface);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-card);
  display: grid;
  gap: .35rem;
  padding: .875rem 1rem;
}

.option-card label,
.dr-option-card label {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  gap: .625rem;
}

.cta-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.link-card {
  background: var(--dr-surface);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-card);
  color: var(--dr-ink);
  display: grid;
  gap: .375rem;
  padding: 1rem;
  text-decoration: none;
}

.link-card:hover {
  border-color: var(--fs-color-accent-soft);
  box-shadow: var(--fs-shadow-card);
  text-decoration: none;
}

.link-card span {
  color: var(--dr-muted);
  font-size: .875rem;
}

.dr-section-card {
  margin-top: 1rem;
}

.dr-section-card .mono {
  overflow-wrap: anywhere;
}

.dr-auth-panel {
  background: var(--dr-surface);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-card);
  padding: 1rem;
}

.dr-context-grid {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(18rem, 1fr) auto minmax(18rem, 1fr);
}

.dr-context-search {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(18rem, 1fr) auto;
  margin-bottom: 1rem;
}

.dr-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.dr-context-status {
  display: grid;
  gap: .5rem;
  min-width: 0;
}

.dr-manual-key {
  border-top: 1px solid var(--dr-border);
  margin-top: 1rem;
  padding-top: .75rem;
}

.dr-manual-key summary {
  color: var(--dr-muted);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
}

.dr-subsection {
  border-top: 1px solid var(--dr-border);
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.dr-section-heading {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dr-row-actions {
  gap: .5rem;
}

.dr-action-disabled-reason {
  flex-basis: 100%;
  font-size: .75rem;
  line-height: 1.35;
  max-width: 18rem;
  overflow-wrap: anywhere;
}

.dr-sticky-auth {
  position: sticky;
  top: .75rem;
  z-index: 5;
}

.dr-table-wrap {
  overflow: auto;
  scrollbar-gutter: stable;
}

.dr-table-wrap table {
  min-width: 48rem;
}

.dr-table-wrap .dr-data-table {
  min-width: 72rem;
}

.dr-data-table th,
.dr-data-table td {
  vertical-align: middle;
}

.dr-data-table .status {
  overflow-wrap: normal;
  white-space: nowrap;
}

.dr-data-table .mono {
  overflow-wrap: anywhere;
}

.dr-table-filename,
.dr-table-uuid {
  display: block;
  max-width: 18rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dr-table-uuid {
  max-width: 20rem;
}

.dr-table-actions {
  width: 13rem;
}

.dr-table-wrap .dr-jobs-table {
  min-width: 96rem;
}

.dr-job-key-filter {
  width: 24rem;
  max-width: 100%;
  min-width: 0;
}

.dr-job-key-filter select {
  min-width: 0;
}

.dr-jobs-table th:nth-child(1),
.dr-jobs-table td:nth-child(1) {
  width: 4rem;
  white-space: nowrap;
}

.dr-jobs-table th:nth-child(2),
.dr-jobs-table td:nth-child(2) {
  width: 6.25rem;
}

.dr-jobs-table th:nth-child(3),
.dr-jobs-table td:nth-child(3) {
  width: 7rem;
}

.dr-jobs-table th:nth-child(4),
.dr-jobs-table td:nth-child(4) {
  width: 8rem;
  white-space: nowrap;
}

.dr-jobs-table th:nth-child(5),
.dr-jobs-table td:nth-child(5) {
  width: 9rem;
  overflow-wrap: anywhere;
}

.dr-jobs-table th:nth-child(6),
.dr-jobs-table td:nth-child(6) {
  width: 7rem;
  white-space: nowrap;
}

.dr-jobs-table th:nth-child(7),
.dr-jobs-table td:nth-child(7) {
  min-width: 13rem;
}

.dr-jobs-table th:nth-child(8),
.dr-jobs-table td:nth-child(8) {
  max-width: 17rem;
  min-width: 15rem;
  overflow-wrap: anywhere;
}

.dr-jobs-table th:nth-child(9),
.dr-jobs-table td:nth-child(9) {
  width: 6.5rem;
  white-space: nowrap;
}

.dr-jobs-table th:nth-child(10),
.dr-jobs-table td:nth-child(10) {
  width: 9rem;
  white-space: nowrap;
}

.dr-jobs-table th:nth-child(11),
.dr-jobs-table td:nth-child(11) {
  min-width: 13rem;
}

.dr-jobs-table .dr-row-actions {
  align-items: stretch;
  flex-direction: column;
  gap: .375rem;
  min-width: 11.5rem;
}

.dr-jobs-table .dr-row-actions button {
  justify-content: center;
  white-space: nowrap;
  width: 100%;
}

.dr-jobs-table .dr-action-disabled-reason {
  max-width: 11.5rem;
}

.dr-table-wrap .dr-documents-table {
  min-width: 78rem;
}

.dr-table-wrap .dr-api-keys-table {
  min-width: 92rem;
}

.dr-table-wrap .dr-webhooks-table {
  min-width: 86rem;
}

.dr-table-wrap .dr-deliveries-table {
  min-width: 78rem;
}

.dr-json-preview {
  min-height: 12rem;
}

.dr-profile-card {
  display: grid;
  gap: .75rem;
}

.dr-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.dr-feature-list-compact {
  gap: .375rem;
}

.dr-feature-list-compact .status {
  min-height: 1.5rem;
  padding: .125rem .5rem;
}

.dr-result-details {
  border-top: 1px solid var(--dr-border);
  margin-top: 1rem;
  padding-top: .875rem;
}

details summary,
.dr-result-details summary {
  cursor: pointer;
}

.dr-result-details .metrics {
  margin-top: .75rem;
}

.dr-kv-list {
  display: grid;
  gap: .5rem;
}

.dr-kv-row {
  align-items: start;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(9rem, .45fr) minmax(0, 1fr);
}

.dr-kv-key {
  color: var(--dr-muted);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.dr-kv-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dr-nav-note {
  color: var(--dr-muted);
  font-size: .75rem;
}

.dr-copy-target {
  overflow-wrap: anywhere;
}

.dr-hidden {
  display: none !important;
}

.error {
  color: #a32020;
}

button.ghost,
.btn.ghost {
  background: var(--dr-surface);
  border: 1px solid var(--dr-border);
  color: var(--dr-brand);
}

button:not(.btn):not(.navbar-toggler) {
  background: var(--dr-brand);
  border: 1px solid var(--dr-brand);
  border-radius: var(--fs-radius-control);
  color: var(--fs-color-on-plum);
  cursor: pointer;
  font-weight: 600;
  min-height: 2.25rem;
  padding: .4375rem .75rem;
}

button.ghost:not(.btn):not(.navbar-toggler) {
  background: var(--dr-surface);
  border-color: var(--dr-border);
  color: var(--dr-brand);
}

button.secondary,
.btn.secondary {
  background: var(--dr-brand);
  border-color: var(--dr-brand);
  color: var(--fs-color-on-plum);
}

button:disabled,
button.ghost:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.btn-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  background: var(--dr-brand);
  border-color: var(--dr-brand);
  color: var(--fs-color-on-plum);
}

.btn-outline-primary {
  border-color: var(--dr-brand);
  color: var(--dr-brand);
}

a {
  color: var(--fs-link-color);
}

a:hover {
  color: var(--fs-link-hover-color);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  box-shadow: var(--fs-focus-ring);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.dr-skip-link {
  background: var(--dr-brand-strong);
  border-radius: 0 0 var(--fs-radius-control) 0;
  color: var(--fs-color-on-plum);
  left: 0;
  padding: .75rem 1rem;
  position: fixed;
  top: 0;
  transform: translateY(-120%);
  transition: transform 120ms ease;
  z-index: 1100;
}

.dr-skip-link:focus {
  color: var(--fs-color-on-plum);
  transform: translateY(0);
}

.dr-app-shell {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  min-height: 100vh;
}

.dr-sidebar {
  background: var(--dr-brand-strong);
  color: var(--fs-color-on-plum);
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
}

.dr-brand {
  display: grid;
  justify-items: start;
  gap: .3rem;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  margin: 0 .25rem 1rem;
  padding: 0 0 1rem;
}
.dr-brand, .dr-mobile-brand, .dr-account-header > a:first-child { text-decoration: none; }
.dr-body:not(.dr-office) .dr-sidebar .ll-brand { background: #fbf8f4; padding: .35rem .55rem; border-radius: .25rem; }
.dr-brand small { color: rgb(255 255 255 / 80%); font-size: .75rem; }

.dr-primary-nav {
  display: grid;
  gap: 1rem;
}

.dr-nav-section {
  display: grid;
  gap: .25rem;
}

.dr-nav-label {
  color: rgb(255 255 255 / 58%);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .09em;
  margin: 0 .625rem .2rem;
  text-transform: uppercase;
}

.dr-nav-link {
  border: 1px solid transparent;
  border-radius: var(--fs-radius-control);
  color: rgb(255 255 255 / 86%);
  display: grid;
  gap: .1rem;
  padding: .55rem .625rem;
  text-decoration: none;
}

.dr-nav-link span {
  font-weight: 700;
}

.dr-nav-link small {
  color: rgb(255 255 255 / 60%);
  font-size: .7rem;
  line-height: 1.35;
}

.dr-nav-link:hover,
.dr-nav-link:focus-visible {
  background: rgb(255 255 255 / 8%);
  color: var(--fs-color-on-plum);
  text-decoration: none;
}

.dr-nav-link.is-active {
  background: var(--fs-color-rose);
  border-color: var(--fs-color-rose);
  color: var(--fs-color-on-accent);
}

.dr-nav-link.is-active small {
  color: rgb(36 27 34 / 72%);
}

.dr-nav-section--secondary {
  border-top: 1px solid rgb(255 255 255 / 14%);
  padding-top: 1rem;
}

.dr-sidebar-note {
  color: rgb(255 255 255 / 58%);
  font-size: .7rem;
  line-height: 1.5;
  margin: auto .625rem 0;
  padding-top: 1.25rem;
}

.dr-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.dr-topbar {
  background: color-mix(in srgb, var(--fs-color-surface-elevated) 94%, transparent);
  border-bottom: 1px solid var(--dr-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dr-topbar-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  min-height: 3.75rem;
  padding: .625rem 1.25rem;
}

.dr-mobile-brand {
  color: var(--dr-brand);
  font-family: var(--fs-font-heading);
  font-weight: 700;
  margin-right: auto;
}

.dr-topbar-context {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  justify-content: flex-end;
}

.dr-user-label {
  color: var(--dr-muted);
  font-size: .8125rem;
  font-weight: 600;
}

.dr-user-menu { position: relative; }
.dr-user-menu > summary { list-style: none; cursor: pointer; }
.dr-user-menu > summary::-webkit-details-marker { display: none; }
.dr-user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  z-index: 110;
  width: min(19rem, calc(100vw - 2rem));
  padding: 1rem;
  display: grid;
  gap: 1rem;
  background: var(--dr-surface);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-card);
  box-shadow: var(--fs-shadow-soft);
}
.dr-user-menu-panel a { overflow-wrap: anywhere; }
.dr-user-menu-panel form { margin: 0; }
.dr-account-header { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; }
.dr-data-use { max-width: 54rem; }
.dr-data-use .panel { margin-block: 1rem; }
.dr-data-use h2 { font-size: 1.25rem; }
.dr-data-form { display: grid; gap: .75rem; margin-block: 1rem; }
.dr-data-form p { margin: 0; }
.dr-data-form label { display: block; font-weight: 600; margin-bottom: .35rem; }
.dr-data-form input:not([type="checkbox"]):not([type="hidden"]), .dr-data-form select, .dr-data-form textarea { max-width: 100%; width: 100%; padding: .5rem; }
.dr-data-form input[type="checkbox"] { margin-right: .5rem; }
.dr-data-form .helptext { display: block; margin-top: .35rem; color: var(--dr-muted); }
.dr-data-form .errorlist { color: #9b2020; }
.dr-data-form button { justify-self: start; white-space: normal; }
.dr-data-row { padding-block: 1rem; border-top: 1px solid var(--dr-border); overflow-wrap: anywhere; }
.dr-data-row details { margin-top: .75rem; }
.dr-private-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.dr-page-header-region {
  background: var(--dr-surface-soft);
  border-bottom: 1px solid var(--dr-border);
  padding: 1.35rem 0;
}

.dr-header-extra:empty {
  display: none;
}

.dr-header-extra:not(:empty) {
  padding-top: 1rem;
}

.dr-main {
  flex: 1 0 auto;
  min-width: 0;
  padding: 1.25rem 0 2rem;
}

.dr-upload-notices {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.dr-upload-notices:empty {
  display: none;
}

.dr-footer {
  border-top: 1px solid var(--dr-border);
  color: var(--dr-muted);
  font-size: .75rem;
  padding: 1rem 0;
}

.dr-footer p {
  margin: 0;
}

.dr-mobile-menu {
  margin-right: auto;
}

.dr-mobile-menu > summary {
  list-style: none;
}

.dr-mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.dr-mobile-menu-panel {
  background: var(--dr-brand-strong);
  border-radius: var(--fs-radius-card);
  box-shadow: var(--fs-shadow-soft);
  left: .75rem;
  max-height: calc(100vh - 5rem);
  width: min(22rem, calc(100vw - 1.5rem));
  overflow-y: auto;
  padding: 1rem;
  position: absolute;
  top: calc(100% + .5rem);
  z-index: 100;
}

.dr-empty-state {
  align-items: flex-start;
  background: var(--dr-surface);
  border: 1px dashed var(--dr-border);
  border-radius: var(--fs-radius-card);
  display: grid;
  gap: .5rem;
  justify-items: start;
  padding: 1.5rem;
}

.dr-empty-state h2,
.dr-empty-state p {
  margin: 0;
}

.dr-empty-state p {
  color: var(--dr-muted);
}

.dr-filter-grow {
  flex: 1 1 18rem;
}

.dr-pagination {
  align-items: center;
  border-top: 1px solid var(--dr-border);
  color: var(--dr-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
}

.dr-document-summary {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.dr-document-summary .panel {
  display: grid;
  gap: .25rem;
}

.dr-workspace-tabs {
  margin-top: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  white-space: nowrap;
}

.dr-workspace-content {
  min-height: 18rem;
  padding-top: 1.25rem;
}

/* Keep every core workspace section available when JavaScript is absent. */
.dr-workspace-content > .tab-pane {
  display: block;
  opacity: 1;
  scroll-margin-top: 1rem;
}

.dr-workspace-content > .tab-pane + .tab-pane {
  border-top: 1px solid var(--dr-border);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.dr-js .dr-workspace-content > .tab-pane {
  display: none;
}

.dr-js .dr-workspace-content > .tab-pane.active {
  display: block;
}

.dr-js .dr-workspace-content > .tab-pane + .tab-pane {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.dr-definition-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.dr-definition-grid > div {
  background: var(--dr-surface-soft);
  border: 1px solid var(--dr-border);
  border-radius: var(--fs-radius-control);
  min-width: 0;
  padding: .875rem 1rem;
}

.dr-definition-grid dt {
  color: var(--dr-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dr-definition-grid dd {
  margin: .3rem 0 0;
  overflow-wrap: anywhere;
}

.dr-definition-grid--single {
  grid-template-columns: 1fr;
}

.dr-kpi-grid,
.dr-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.dr-kpi-card {
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 8.5rem;
  text-decoration: none;
}

.dr-kpi-card strong {
  color: var(--dr-brand);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
  margin: .65rem 0;
}

.dr-kpi-card:hover,
.dr-kpi-card:focus-visible {
  border-color: var(--dr-brand);
  color: inherit;
}

.dr-card-grid > article.panel {
  align-content: start;
  display: grid;
  gap: .45rem;
}

.dr-card-grid > article.panel strong {
  color: var(--dr-brand);
  font-size: 1.25rem;
  line-height: 1.2;
}

.dr-card-grid > article.panel p {
  margin: 0;
}

.dr-record-card {
  color: inherit;
  display: grid;
  gap: .6rem;
  text-decoration: none;
}

.dr-record-card:hover,
.dr-record-card:focus-visible {
  border-color: var(--dr-brand);
  color: inherit;
}

.dr-boundary-note,
.dr-subsection-title,
.dr-run-config {
  margin-top: 1rem;
}

.dr-finding-list,
.dr-evidence-list {
  display: grid;
  gap: .8rem;
}

.dr-finding-card .dr-hash {
  overflow-wrap: anywhere;
}

.dr-finding-card details {
  margin-top: .8rem;
}

.dr-privacy-options {
  border-left: .25rem solid var(--dr-brand);
}

.dr-privacy-options > [data-privacy-fields] {
  margin-top: 1rem;
}

.dr-mapping-panel {
  background: var(--dr-surface-soft);
  margin-top: 1rem;
}

.dr-privacy-options select[multiple] {
  min-height: 6rem;
}

.dr-timeline,
.dr-artifact-list,
.dr-activity-list {
  display: grid;
  gap: .75rem;
}

.dr-timeline-item {
  border-left: 3px solid var(--fs-color-accent-soft);
  padding: .25rem 0 .25rem 1rem;
}

.dr-timeline-item p,
.dr-artifact-list p,
.dr-activity-list p {
  color: var(--dr-muted);
  margin: .3rem 0 0;
}

.dr-table-wrap[tabindex="0"]:focus-visible {
  border-radius: var(--fs-radius-control);
  box-shadow: var(--fs-focus-ring);
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex;
}

@media (max-width: 991.98px) {
  .dr-app-shell {
    display: block;
  }

  .dr-topbar-inner {
    justify-content: flex-start;
  }

  .dr-topbar-context {
    margin-left: auto;
  }
}

@media (max-width: 639.98px) {
  .container-xl {
    padding-left: .875rem;
    padding-right: .875rem;
  }

  .dr-user-label,
  .dr-topbar-context > .status {
    display: none;
  }

  .dr-topbar-inner {
    gap: .5rem;
    padding: .5rem .75rem;
  }

  .dr-page-header-region {
    padding: 1rem 0;
  }

  .dr-page-header {
    align-items: stretch;
    display: grid;
  }

  .dr-page-header .btn {
    justify-self: start;
  }

  .dr-kv-row {
    grid-template-columns: 1fr;
  }

  .dr-main {
    padding-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1180px) {
  .dr-grid-wide {
    grid-template-columns: 1fr;
  }

  .dr-context-grid {
    grid-template-columns: 1fr;
  }

  .dr-context-search {
    grid-template-columns: 1fr;
  }

  .dr-sticky-auth {
    position: static;
  }
}

/* System observations: scoped layout, readable values and stacked mobile rows. */
.dr-main--system, .dr-system-page h2, .dr-system-page [data-system-source], #document-inspection, #page-quality, #document-content, #review-table-link-status, .dr-review-table { scroll-margin-top: 7rem; }
/* Keep the fragment in view when the document viewer above it finishes loading. */
html:has(.dr-review-table:target) { scroll-behavior: auto; }
.dr-page-quality { margin-top: 1.5rem; min-width: 0; }
.dr-quality-help { margin: 1rem 0; }
.dr-quality-help dl { margin: 1rem 0; }
.dr-quality-help dt { font-weight: 600; }
.dr-quality-help dd { margin: 0 0 .75rem; }
.dr-quality-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.dr-quality-controls .field { min-width: 0; max-width: 100%; }
.dr-quality-controls select { max-width: 100%; }
.dr-page-quality th, .dr-page-quality td { font-variant-numeric: tabular-nums; }
.dr-page-quality .dr-table-wrap:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.dr-system-page { min-width: 0; container-type: inline-size; }
.dr-system-page time, .dr-system-uuid { overflow-wrap: anywhere; }
.dr-system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dr-system-grid .card { min-width: 0; }
.dr-system-grid .card-body { display: flex; flex-direction: column; align-items: flex-start; }
.dr-system-grid .status { white-space: normal; }
.dr-system-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.dr-system-metrics > div { padding: 1rem; border: 1px solid var(--dr-border); border-radius: .5rem; background: var(--dr-surface-soft); }
.dr-system-metrics dt { color: var(--dr-muted); font-weight: 500; }
.dr-system-metrics dd { margin: .5rem 0 0; font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.dr-system-values, .dr-system-source-meta { width: 100%; margin-bottom: 0; }
.dr-system-values > div { display: flex; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--dr-border); padding: .5rem 0; }
.dr-system-values dd { margin: 0; text-align: right; font-weight: 600; }
.dr-system-values dt { font-weight: 500; }
.dr-system-values + p { margin-top: 1rem; }
.dr-system-source-meta { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--dr-border); font-size: .8125rem; }
.dr-system-source-meta dt { color: var(--dr-muted); }
.dr-system-source-meta dd { margin-bottom: .5rem; }
.dr-system-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.dr-system-filter > div { flex: 1 1 22rem; max-width: 35rem; min-width: 0; }
.dr-system-uuid { display: block; color: var(--dr-muted); font-weight: 400; font-size: .75rem; }
.dr-system-tenants { table-layout: fixed; width: 100%; }
.dr-system-tenants th:first-child { width: 30%; }
.dr-system-tenants th, .dr-system-tenants td { white-space: normal; overflow-wrap: anywhere; }
.dr-system-tenants.table thead th { white-space: normal; }
.dr-system-mobile-label { display: none; }
@container (max-width: 959.98px) {
  .dr-system-grid, .dr-system-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 767.98px) {
  .dr-system-grid, .dr-system-metrics { grid-template-columns: 1fr; }
  .dr-system-tenants, .dr-system-tenants tbody, .dr-system-tenants tr { display: block; }
  .dr-system-tenants thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .dr-system-tenants tr { padding: 1rem 0; border-bottom: 1px solid var(--dr-border); }
  .dr-system-tenants th:first-child { display: block; width: auto; }
  .dr-system-tenants td { display: flex; justify-content: space-between; gap: 1rem; }
  .dr-system-mobile-label { display: inline; font-weight: 500; }
  .dr-system-tenants td, .dr-system-tenants th { padding: .5rem 0; border: 0; }
  .dr-system-filter button { width: 100%; }
}
#customer-configuration .mono {
  overflow-wrap: anywhere;
}

#customer-configuration .panel {
  min-width: 0;
}

/* Document workspace */
@media (min-width: 992px) {
  .dr-office .dr-app-shell { grid-template-columns: 13.25rem minmax(0, 1fr); }
}
.dr-office .dr-sidebar, .dr-office .dr-mobile-menu-panel {
  background: var(--dr-surface);
  color: var(--dr-ink);
  border-inline-end: 1px solid var(--dr-border);
}
.dr-office .dr-brand { border-color: var(--dr-border); }
.dr-office .dr-brand small, .dr-office .dr-nav-label, .dr-office .dr-nav-link small,
.dr-office .dr-sidebar-note { color: var(--dr-muted); }
.dr-office .dr-nav-link { color: var(--dr-ink); }
.dr-office .dr-nav-link:hover, .dr-office .dr-nav-link:focus-visible,
.dr-office .dr-nav-link.is-active { background: var(--dr-surface-soft); color: var(--dr-brand); border-color: var(--dr-border); }
.office-more-nav { border-top: 1px solid var(--dr-border); padding: .8rem .3rem; }
.office-more-nav .dr-nav-section { margin-top: 1rem; }
.office-more-nav summary { color: var(--dr-muted); font-size: .875rem; }
.dr-office .dr-page-header-region { background: transparent; border: 0; padding-bottom: .3rem; }
.dr-office .page-title { font-size: clamp(1.6rem, 3vw, 2.25rem); overflow-wrap: anywhere; }
.dr-office .dr-dashboard-context { padding: 0; margin: 0 0 1.25rem; background: transparent; border: 0; box-shadow: none; }
.office-context > summary { color: var(--dr-muted); padding: .35rem 0; font-size: .85rem; }
.office-context strong { color: var(--dr-ink); margin-inline: .35rem; }
.office-context small { text-decoration: underline; }
.office-context[open] { background: var(--dr-surface); border: 1px solid var(--dr-border); padding: .8rem; }
.office-context[open] summary { margin-bottom: .7rem; }
.office-inbox { overflow: hidden; }
.office-inbox .dr-section-heading { align-items: baseline; }
.office-inbox .card-title { margin-bottom: .4rem; }
.office-count { font-size: .8rem; border-radius: 1rem; padding: .15rem .55rem; background: var(--dr-surface-soft); vertical-align: middle; color: var(--dr-muted); }
.office-search { align-items: end; margin-top: 1rem; }
.office-search .dr-filter-grow { max-width: 35rem; }
.office-documents { width: 100%; border-collapse: collapse; color: var(--dr-ink); font-size: .92rem; }
.office-documents th, .office-documents td { padding: 1rem 1.25rem; text-align: start; border-top: 1px solid var(--dr-border); }
.office-documents th { font-size: .8rem; color: var(--dr-muted); background: var(--dr-surface-soft); }
.office-file { display: flex; gap: .8rem; align-items: center; }
.office-file a { font-weight: 700; color: var(--dr-ink); overflow-wrap: anywhere; }
.office-file small { display: block; color: var(--dr-muted); margin-top: .15rem; }
.office-file-icon { flex: none; display: grid; place-items: end center; width: 2.1rem; height: 2.6rem; padding: .25rem; border: 1px solid var(--dr-border); border-radius: .25rem; background: var(--dr-surface-soft); font-size: .6rem; font-weight: 800; color: var(--dr-brand); }
.office-next { font-weight: 650; }
.office-empty, .office-inbox .dr-pagination { padding: 1rem 1.25rem; }
.office-empty p { max-width: 36rem; }
.office-review-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.office-review-grid > * { min-width: 0; }
@media (min-width: 1250px) {
  .office-review-grid { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20%); }
}
.office-assist { padding: 1.15rem; gap: .85rem; }
.office-assist h2, .office-assist p { margin: 0; }
.office-assist textarea { width: 100%; min-height: 12rem; }
.office-assist [data-copy-panel] > * { margin-block: .45rem; }
.office-assist .btn { align-self: start; }
.office-metadata, .office-view-choices { margin-block: 1rem; }
.office-metadata > summary, .office-view-choices > summary { font-weight: 650; padding: .7rem 0; }
@media (max-width: 700px) {
  .office-documents thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .office-documents, .office-documents tbody { display: block; }
  .office-documents tr { display: grid; gap: .55rem; border-top: 1px solid var(--dr-border); padding: 1rem; }
  .office-documents td { display: block; border: 0; padding: 0; }
  .office-documents td + td { padding-left: 2.9rem; }
}
.office-upload { max-width: 54rem; }
.office-upload-settings > summary, .office-profiles > summary { padding-block: .75rem; font-weight: 650; }
.office-upload-settings[open] > * + * { margin-block-start: .7rem; }
.office-profiles { margin-block-start: 1rem; }
.office-profiles > summary { padding-inline: 1.25rem; }

@media (min-width: 1100px) {
  .office-review-grid:has([data-copy-panel]:not([hidden])) {
    grid-template-columns: minmax(0, 1.65fr) minmax(20rem, 1fr);
  }
  .office-review-grid:has([data-copy-panel]:not([hidden])) .dx-workspace,
  .office-review-grid:has([data-copy-panel]:not([hidden])) .dx-reading-layout:has(.dx-original:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
  .office-review-grid:has([data-copy-panel]:not([hidden])) .dx-original:not([hidden]) {
    grid-row: 1;
    padding-inline: 0;
    border-inline: 0;
  }
}
@media (min-width: 1100px) and (min-height: 700px) {
  .office-assist { position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow: auto; }
}

.office-page-hint {
  border-inline-start: .2rem solid var(--dr-status-warning-border);
  padding: .65rem .85rem;
  background: var(--dr-status-warning-bg);
  color: var(--dr-status-warning-ink);
}

.office-current-document { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.office-current-document span { color: var(--dr-muted); }
.office-review-grid .dx-original { scroll-margin-block-start: 4.5rem; }
.office-assist label { font-weight: 700; }
.office-assist textarea { padding: .65rem; border: 1px solid var(--dr-border); border-radius: var(--fs-radius-control); color: var(--dr-ink); font: inherit; line-height: 1.5; }
