/* Reading ink stays black. Decorative rules have less weight than controls.
   This sheet deliberately also works before the legacy v303 reading sheet. */
body,
body.publisher-public,
.author-portal,
.intake,
.managing-portal,
.publication-library,
.sx-workspace {
  --isais-reading-line: #bdccc5 !important;
  --isais-frame-line: #adbbb4;
  --isais-divider-line: #dce4df;
}

/* The main workspace and major groups retain a quiet, continuous boundary. */
html body main :is(.staff-sidebar, .account-sidebar, .org-access-orders,
  .org-inbox, .org-file-library, .account-content-section,
  .account-action-center, .notification-section, .review-flow-summary,
  .review-flow-files, .review-flow-history, .org-metrics, .ana-metrics) {
  border-color: var(--isais-frame-line) !important;
}

/* Divisions inside a group should not compete with its contents or fields. */
body main :is(td, th, .staff-brand, .staff-heading, .staff-nav-footer,
  .account-side-brand, .account-side-footer, .account-side-panel-shelf,
  .org-metrics > article, .org-work-queue > header,
  .org-file-library li, .org-order-history li, .org-case-card > footer,
  .author-submission-card > footer, .author-record, .author-authorlist > li,
  .author-declarations > div, .editorial-task-history li,
  .account-directory-role-group > header, .notification-section > header,
  .notification-list > li, .manager-file > header, .manager-history > li,
  .manager-delivery > li, .intake-declaration, .ana-section-heading,
  .ana-review-list > li, .role-workspace-header, .purpose-tabs,
  .purpose-lane > h4, .role-workspace-summary > div,
  .account-operations-disclosure[open] > summary,
  .account-role-accordion[open] > summary,
  .account-directory-entry[open] > summary) {
  border-bottom-color: var(--isais-divider-line) !important;
}

body main :is(.account-side-footer, .account-side-group,
  .account-side-panel-group, .account-side-panel-shelf, .staff-nav-footer,
  .org-inbox li, .org-file-library li, .org-order-history,
  .review-flow-file-row, .manager-history, .manager-delivery,
  .editorial-task-deadline, .editorial-extension, .editorial-task-history,
  .science-card-foot, .science-record-card dl > div,
  .purpose-brief > div, .ana-empty) {
  border-top-color: var(--isais-divider-line) !important;
}

body main .org-metrics > article {
  border-right-color: var(--isais-divider-line) !important;
}

body main :is(.role-workspace-summary > div, .purpose-brief > div) {
  border-inline-color: var(--isais-divider-line) !important;
}

body main .contact-inbox-list > li {
  border-bottom-color: var(--isais-divider-line) !important;
}

/* No generic border/colour reset: field boundaries, emerald focus/selection,
   accent edges, deadline colours and error/alert borders remain unchanged. */

/* Compact factual delivery information, not another dashboard card grid. */
body main .review-flow-invitation-delivery > ul { margin: 1rem 0; padding: 0; list-style: none; }
body main .review-flow-invitation-delivery > ul > li { padding: .75rem 0; border-bottom: 1px solid var(--isais-divider-line); }

/* The fixed header must not cover the section reached from a navigation link. */
#en-sections, #es-sections { scroll-margin-top: 7rem; }

/* Additional files are document rows, not another set of nested boxes. */
html body main [data-revision-document] {
  min-width: 0;
  margin: 1rem 0;
  padding: 1rem 0 0;
  border: 0 !important;
  border-top: 1px solid var(--isais-divider-line) !important;
}
html body main [data-revision-document] legend { padding: 0 .5rem 0 0; font-weight: 600; }
