.law-theme-toggle {
  margin-left: auto;
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  min-height: 36px;
}
.law-theme-toggle:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
html[data-law-theme='dark'] {
  color-scheme: dark;
  --bg: #0e1726;
  --bg-soft: #152238;
  --surface: #18263a;
  --surface-strong: #1d2e45;
  --border: #34465f;
  --text: #e2eaf5;
  --muted: #a5b6cd;
  --brand: #90bdf1;
  --brand-strong: #bad7fa;
  --brown: #90bdf1;
  --brown-dark: #bad7fa;
  --accent: #90bdf1;
  --chip: #283d57;
  --shadow: 0 20px 50px rgba(0,0,0,.25);
  background: var(--bg);
}
html[data-law-theme='dark'] body { background: var(--bg); color: var(--text); }
html[data-law-theme='dark'] .site-topbar { background: #142443; }
html[data-law-theme='dark'] .site-mobile-menu,
html[data-law-theme='dark'] .site-mobile-menu-close,
html[data-law-theme='dark'] .legislative-link,
html[data-law-theme='dark'] .legislative-compare-btn,
html[data-law-theme='dark'] .legislative-compare-btn:hover,
html[data-law-theme='dark'] .registry-link-chip,
html[data-law-theme='dark'] .registry-link-toggle,
html[data-law-theme='dark'] .registry-links-modal,
html[data-law-theme='dark'] .button,
html[data-law-theme='dark'] .ghost-button,
html[data-law-theme='dark'] .icon-button,
html[data-law-theme='dark'] .metric,
html[data-law-theme='dark'] .draft-filter-shell,
html[data-law-theme='dark'] .registry-search-panel,
html[data-law-theme='dark'] .filter-group,
html[data-law-theme='dark'] .chip[data-active='true'],
html[data-law-theme='dark'] .search-box,
html[data-law-theme='dark'] .registry-table,
html[data-law-theme='dark'] .table-row[data-active='true'],
html[data-law-theme='dark'] .mobile-registry-pager button,
html[data-law-theme='dark'] .order-move-button,
html[data-law-theme='dark'] .detail-card,
html[data-law-theme='dark'] .detail-link,
html[data-law-theme='dark'] .law-detail-loading-card,
html[data-law-theme='dark'] .law-detail-back-link,
html[data-law-theme='dark'] .requirement-import-file,
html[data-law-theme='dark'] .library-coverage-count-badge,
html[data-law-theme='dark'] .law-detail-update-link,
html[data-law-theme='dark'] .law-detail-search-box,
html[data-law-theme='dark'] .global-requirement-search-law-filter,
html[data-law-theme='dark'] .global-requirement-search-law-filter:hover,
html[data-law-theme='dark'] .law-search-filter-dropdown:not([hidden]),
html[data-law-theme='dark'] .law-search-document-header,
html[data-law-theme='dark'] #globalRequirementDetailOpenLaw,
html[data-law-theme='dark'] #globalRequirementDetailOpenLaw:hover,
html[data-law-theme='dark'] .law-detail-filter-button,
html[data-law-theme='dark'] .law-detail-dropdown-search,
html[data-law-theme='dark'] .law-detail-option[data-active='true'],
html[data-law-theme='dark'] .law-detail-option-check,
html[data-law-theme='dark'] .law-detail-option[data-active='true'] .law-detail-option-check,
html[data-law-theme='dark'] .law-detail-list-shell,
html[data-law-theme='dark'] .law-detail-page-button,
html[data-law-theme='dark'] .law-detail-table-row.admin-editable:hover,
html[data-law-theme='dark'] .law-detail-table-row.is-expanded,
html[data-law-theme='dark'] .law-detail-pending-badge,
html[data-law-theme='dark'] .law-detail-expand-button,
html[data-law-theme='dark'] .law-detail-expand-card,
html[data-law-theme='dark'] .requirement-detail-card,
html[data-law-theme='dark'] .linked-article-media,
html[data-law-theme='dark'] .linked-document-viewer-modal,
html[data-law-theme='dark'] .linked-document-viewer-button,
html[data-law-theme='dark'] .upcoming-candidate-card,
html[data-law-theme='dark'] .source-link-button,
html[data-law-theme='dark'] .output-chip,
html[data-law-theme='dark'] .detail-admin-input,
html[data-law-theme='dark'] .detail-admin-select,
html[data-law-theme='dark'] .detail-admin-textarea,
html[data-law-theme='dark'] .law-detail-admin-filter-chip,
html[data-law-theme='dark'] .detail-admin-library-panel,
html[data-law-theme='dark'] .detail-admin-link-guide,
html[data-law-theme='dark'] .detail-admin-add-btn,
html[data-law-theme='dark'] .detail-admin-remove-btn,
html[data-law-theme='dark'] .detail-admin-cancel,
html[data-law-theme='dark'] .mobile-section-toggle,
html[data-law-theme='dark'] .hero-panel,
html[data-law-theme='dark'] .table-head,
html[data-law-theme='dark'] .law-detail-table-head,
html[data-law-theme='dark'] .linked-article-modal,
html[data-law-theme='dark'] .linked-document-modal,
html[data-law-theme='dark'] .library-coverage-modal,
html[data-law-theme='dark'] .law-detail-expand,
html[data-law-theme='dark'] .law-detail-dropdown,
html[data-law-theme='dark'] .global-requirement-search-modal,
html[data-law-theme='dark'] .legislative-compare-modal {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
html[data-law-theme='dark'] :is(.article-chip, .chip, .output-chip) {
  background: var(--chip); color: var(--text); border-color: var(--border);
}
html[data-law-theme='dark'] :is(.law-detail-expand-card, .requirement-detail-card) :is(p, li, span, strong),
html[data-law-theme='dark'] :is(.article-line, .registry-link-obligation, .law-detail-table-row, .law-detail-table-head) {
  color: var(--text);
}
html[data-law-theme='dark'] :is(input, textarea, select) { color: var(--text); background: var(--bg-soft); border-color: var(--border); }
html[data-law-theme='dark'] .article-line.is-linked-target { background: #29496e; box-shadow: inset 3px 0 0 #93c5fd; }
html[data-law-theme='dark'] :is(#siteNoticeOverlay, #registryUpdateOverlay) > div { background: var(--surface) !important; color: var(--text) !important; }
@media (max-width: 768px) {
  .law-theme-toggle { padding: 7px 9px; font-size: 11px; }
}

/* Semantic badges keep their meaning with colors designed for dark surfaces. */
html[data-law-theme='dark'] {
  --theme-red-bg: #4b2832;
  --theme-red-text: #ffb4ad;
  --theme-green-bg: #183e34;
  --theme-green-text: #9ce5bc;
  --theme-blue-bg: #233e60;
  --theme-blue-text: #b4d4ff;
  --theme-purple-bg: #392c54;
  --theme-purple-text: #d7baff;
  --theme-pink-bg: #492d43;
  --theme-pink-text: #f5b9de;
  --theme-neutral-bg: #2b374a;
  --theme-neutral-text: #c0cede;
}
html[data-law-theme='dark'] .law-detail-row-status { background: var(--theme-blue-bg); color: var(--theme-blue-text); }
html[data-law-theme='dark'] :is(.importance-high, .badge.domain-fire, .law-detail-row-status.is-missing, .diff-del) {
  background: var(--theme-red-bg); color: var(--theme-red-text); border-color: #80505a;
}
html[data-law-theme='dark'] :is(.badge.status-live, .badge.domain-environment, .law-detail-row-status.is-exact) {
  background: var(--theme-green-bg); color: var(--theme-green-text); border-color: #386957;
}
html[data-law-theme='dark'] :is(.importance-medium, .badge.status-review, .badge.status-upcoming, .badge.domain-safety, .badge.domain-facility-construction, .badge.domain-special-management, .law-detail-row-status.is-automatic, .upcoming-candidate-status, .law-detail-pending-badge) {
  background: var(--theme-blue-bg); color: var(--theme-blue-text); border-color: #466b97;
}
html[data-law-theme='dark'] .badge.domain-energy-radiation {
  background: var(--theme-purple-bg); color: var(--theme-purple-text);
}
html[data-law-theme='dark'] .badge.domain-labor-health {
  background: var(--theme-pink-bg); color: var(--theme-pink-text);
}
html[data-law-theme='dark'] :is(.importance-low, .badge.status-archive) {
  background: var(--theme-neutral-bg); color: var(--theme-neutral-text);
}
html[data-law-theme='dark'] :is(.detail-admin-link-status.is-exact, .requirement-import-status.success) { color: var(--theme-green-text); }
html[data-law-theme='dark'] .detail-admin-link-status.is-manual { color: var(--theme-blue-text); }
html[data-law-theme='dark'] :is(.detail-admin-remove-btn, .detail-admin-error, .requirement-import-status.error) { color: var(--theme-red-text); }
html[data-law-theme='dark'] :is(.registry-link-row, .registry-link-detail, .cf-cell, .source-value, .legal-article-popover, .detail-admin-modal, .global-requirement-detail-modal) {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
html[data-law-theme='dark'] .cf-cell.cf-empty { background: var(--bg-soft); color: var(--muted); }
html[data-law-theme='dark'] :is(.site-mobile-menu-link.active, .law-detail-import-button, .registry-update-star) {
  background: var(--theme-blue-bg); color: var(--theme-blue-text);
}
html[data-law-theme='dark'] :is(.detail-admin-close, .linked-article-meta, .upcoming-candidate-kicker) { color: var(--muted); }

/* Expanded detail groups and revision comparison surfaces. */
html[data-law-theme='dark'] :is(.law-detail-expand-panel, .requirement-expanded-panel) {
  background: var(--bg-soft);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(165,182,205,.08);
}
html[data-law-theme='dark'] :is(.main-admin-bar, .detail-admin-library-result) {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
html[data-law-theme='dark'] :is(.legislative-compare-modal, .cf-cell, .source-value) {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
html[data-law-theme='dark'] :is(.cf-col-heads, .cf-section, .future-sub) { border-color: var(--border); }
html[data-law-theme='dark'] .future-item { color: var(--text); }
html[data-law-theme='dark'] .diff-add { background: var(--theme-green-bg); color: var(--theme-green-text); }
html[data-law-theme='dark'] .diff-del { background: var(--theme-red-bg); color: var(--theme-red-text); }
html[data-law-theme='dark'] .detail-admin-delete { background: var(--theme-red-bg); color: var(--theme-red-text); }
html[data-law-theme='dark'] .site-topbar-menu-btn { background: #283d57; color: #e2eaf5; }

.requirement-output-list > .requirement-output-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  white-space: pre-wrap;
}
.requirement-output-list > .requirement-output-line::before { display: none; }
.output-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}
.output-type-badge--submit { color: #254e86; background: #e7f0ff; border-color: #c8dcff; }
.output-type-badge--write { color: #6746a3; background: #f1eaff; border-color: #ddccff; }
.output-type-badge--receive { color: #146c68; background: #e0f5f1; border-color: #b9e7df; }
.output-type-badge--record { color: #2c7048; background: #e6f5e9; border-color: #c9e8d0; }
.output-type-badge--retain { color: #805313; background: #fff2d9; border-color: #f3ddb0; }
.output-type-badge--post { color: #9c4352; background: #ffeaed; border-color: #f3cbd2; }
html[data-law-theme='dark'] .requirement-output-list .output-type-badge--submit { color: #b7d2ff; background: #233752; border-color: #39577e; }
html[data-law-theme='dark'] .requirement-output-list .output-type-badge--write { color: #d6c1ff; background: #33284a; border-color: #59427f; }
html[data-law-theme='dark'] .requirement-output-list .output-type-badge--receive { color: #9de1d9; background: #1e3d3c; border-color: #326865; }
html[data-law-theme='dark'] .requirement-output-list .output-type-badge--record { color: #b6e6be; background: #263f30; border-color: #3b6248; }
html[data-law-theme='dark'] .requirement-output-list .output-type-badge--retain { color: #f3d08c; background: #473824; border-color: #725934; }
html[data-law-theme='dark'] .requirement-output-list .output-type-badge--post { color: #ffbec8; background: #482b33; border-color: #74424d; }

/* PDF paper stays unchanged; the viewer chrome and surrounding frame are dark. */
html[data-law-theme='dark'] :is(.linked-document-viewer-shell, .linked-document-viewer-frame, .linked-document-native-viewer) {
  background: var(--bg-soft);
  border-color: var(--border);
}
html[data-law-theme='dark'] :is(.linked-document-viewer-header, .linked-document-viewer-toolbar, .linked-document-viewer-modal .legal-article-popover-actions) {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
html[data-law-theme='dark'] .linked-document-page-indicator {
  background: var(--theme-blue-bg); color: var(--theme-blue-text); border-color: var(--border);
}
html[data-law-theme='dark'] .linked-document-viewer-button.primary {
  background: #315c96; color: #fff; border-color: #709dd3;
}
html[data-law-theme='dark'] :is(.linked-document-header, .linked-document-body) {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
/* Popup text must contrast with its own surface rather than inherit page colors. */
html[data-law-theme='dark'] :is(.legal-article-tooltip, .related-document-tooltip) {
  background: #1d2e45;
  color: #f1f5fb;
  border: 1px solid #709dd3;
  font-size: 14px;
  line-height: 1.65;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}
html[data-law-theme='dark'] :is(.detail-admin-modal, .linked-article-modal, .linked-document-modal, .legal-article-popover, .registry-links-modal, .global-requirement-detail-modal, .legislative-compare-modal) {
  color: #e2eaf5;
}
html[data-law-theme='dark'] :is(.detail-admin-modal-title, .detail-admin-section-title, .legal-article-popover-text, .linked-document-title, .linked-document-text, .cf-section h3, .cf-col-heads span, .cf-cell, .source-value) {
  color: #e2eaf5;
}
html[data-law-theme='dark'] :is(.linked-article-meta, .linked-document-viewer-meta, .linked-document-label, .detail-admin-label, .registry-link-label, .detail-admin-library-result-meta) {
  color: #c0cede;
}
html[data-law-theme='dark'] :is(.linked-article-modal, .linked-document-modal) .article-line :is(strong, span) { color: inherit; }
/* Notices use inline colors, including dynamically rendered update details. */
html[data-law-theme='dark'] :is(#siteNoticeOverlay, #registryUpdateOverlay) [role='dialog'] {
  background: #18263a !important;
  color: #e2eaf5 !important;
}
html[data-law-theme='dark'] :is(#siteNoticeOverlay, #registryUpdateOverlay) :is(h2, p, div, span, strong, b) {
  color: #e2eaf5 !important;
  border-color: #34465f !important;
}
html[data-law-theme='dark'] :is(#siteNoticeOverlay, #registryUpdateOverlay) :is([style*='background:#f'], [style*='background: #f']) {
  background: #1d2e45 !important;
}
html[data-law-theme='dark'] :is(#siteNoticeCloseBtn, #siteNoticeHideTodayBtn, #registryUpdateCloseBtn, #registryUpdateHideTodayBtn) {
  color: #c0cede !important;
}
html[data-law-theme='dark'] :is(#siteNoticeConfirmBtn, #registryUpdateConfirmBtn) {
  background: #315c96 !important;
  color: #fff !important;
}
html[data-law-theme='dark'] #registryUpdateContent .registry-update-goto {
  background: #233e60 !important;
  color: #b4d4ff !important;
}

/* Use the full header width; admin-only controls share the right-hand edge. */
.site-topbar .site-topbar-inner {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding-left: 20px;
  padding-right: 20px;
  justify-content: flex-start;
  gap: 12px;
}
.site-topbar-inner > .site-topbar-left { margin-right: 0; }
.site-topbar-inner > .law-theme-toggle { order: 1; margin-left: auto; }
.site-topbar-inner > .market-switcher {
  order: 2;
  position: relative;
  top: auto;
  right: auto;
  flex-shrink: 0;
}
@media (max-width: 980px) {
  .site-topbar .site-topbar-inner { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .site-topbar-inner > .market-switcher { right: auto; }
}

/* Shared legal hierarchy: stable marker column and hanging body alignment. */
.linked-article-content { --legal-indent: 24px; }
.linked-article-content .article-line {
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  line-height: 1.75;
}
.linked-article-content .article-line > strong, .cf-cell .future-marker {
  font-weight: 800;
  white-space: nowrap;
}
.linked-article-content .article-line > span, .cf-cell .future-level > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.linked-article-content .article-line.subparagraph { margin-left: var(--legal-indent); }
.linked-article-content .article-line.item { margin-left: calc(var(--legal-indent) * 2); }
.linked-article-paragraph + .linked-article-paragraph { margin-top: 12px; }
#linkedArticleTitle, .cf-section > h3 { line-height: 1.5; font-weight: 800; }
#linkedArticleMeta { line-height: 1.6; }
.cf-cell { --legal-indent: 24px; }
.cf-cell .source-value { padding: 4px 0; background: transparent; }
html[data-law-theme='dark'] .cf-cell .source-value { background: transparent; }
.cf-cell .future-level { grid-template-columns: 6em minmax(0, 1fr); gap: 8px; align-items: start; line-height: 1.75; }
.cf-cell .future-sub { margin-left: var(--legal-indent); padding-left: 0; border-left: 0; }
.cf-cell .future-item { margin-left: var(--legal-indent); margin-top: 6px; }
@media (max-width: 720px) {
  .linked-article-content, .cf-cell { --legal-indent: 12px; }
  .linked-article-content .article-line, .cf-cell .future-level { grid-template-columns: 5.5em minmax(0, 1fr); gap: 6px; }
}

/* Inline law search and library article bodies use the same hierarchy. */
.law-search-article-body, .article-content { --legal-indent: 24px; }
.law-search-article-body .legal-structure-line,
.article-content .article-line {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  line-height: 1.75;
}
.law-search-article-body .legal-structure-line > strong,
.article-content .article-marker { font-weight: 800; white-space: nowrap; }
.law-search-article-body .legal-structure-line > span,
.article-content .article-text { min-width: 0; overflow-wrap: anywhere; margin-top: 0; }
.law-search-article-body .law-search-paragraph-sub,
.article-content .article-line.subparagraph { margin-left: var(--legal-indent); }
.law-search-article-body .law-search-paragraph-item { margin-left: var(--legal-indent); }
.article-content .article-line.item { margin-left: calc(var(--legal-indent) * 2); }
.law-search-article-body .law-search-paragraph + .law-search-paragraph { margin-top: 12px; }
.article-content .article-line.markerless { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 720px) {
  .law-search-article-body, .article-content { --legal-indent: 12px; }
  .law-search-article-body .legal-structure-line,
  .article-content .article-line { grid-template-columns: 5.5em minmax(0, 1fr); gap: 6px; }
  .article-content .article-line.markerless { grid-template-columns: minmax(0, 1fr); }
}
/* Dark semantic borders must not restore the old hierarchy guide lines. */
html[data-law-theme='dark'] .cf-cell .future-sub { border-left: 0; }

/* One shared grid row per matched paragraph keeps the next paragraph aligned. */
.cf-paragraph-pair { align-items: stretch; margin-bottom: 8px; }
.cf-paragraph-pair > .cf-cell { min-width: 0; }
.cf-paragraph-pair .source-value { margin-top: 0 !important; }
.cf-paragraph-pair > .cf-empty { justify-content: flex-start; padding-top: 16px; }
.cf-missing-paragraph { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .cf-paragraph-pair > .cf-cell::before {
    content: attr(data-comparison-side);
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-strong);
    margin-bottom: 8px;
  }
  .cf-paragraph-pair > .cf-empty { display: block; }
}

#legislativeCompareBackdrop .legislative-compare-title-group {
  flex: 1;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
}
#legislativeCompareEffectiveDate {
  margin: 0 0 0 auto;
  font-size: max(12px, calc(var(--font-metric, 22px) - 8px));
  font-weight: 700;
  line-height: 1.5;
  color: #974b12;
  white-space: nowrap;
}
#legislativeCompareEffectiveDate:empty { display: none; }
html[data-law-theme='dark'] #legislativeCompareEffectiveDate { color: #f3c17a; }

html[data-law-theme='dark'] .law-search-highlight { background: #ffe066; color: #302500; }

/* Importance uses both distinct hues and a three-step indicator. */
.badge.importance-badge,
.registry-redesigned #lawDetailPage .law-detail-importance-cell .badge.importance-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  box-sizing: border-box;
  width: 96px;
  min-width: 96px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--importance-border);
  border-radius: 6px;
  color: var(--importance-text);
  background: var(--importance-bg);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge.importance-badge.importance-high { --importance-bg: #fdebed; --importance-text: #9f2737; --importance-border: #efbac4; }
.badge.importance-badge.importance-medium { --importance-bg: #fff4db; --importance-text: #805000; --importance-border: #e6c275; }
.badge.importance-badge:is(.importance-low, .importance-unknown) { --importance-bg: #eef1f5; --importance-text: #45556b; --importance-border: #c3ccd7; }
html[data-law-theme='dark'] .badge.importance-badge.importance-high { --importance-bg: #432530; --importance-text: #ffb1be; --importance-border: #80505a; }
html[data-law-theme='dark'] .badge.importance-badge.importance-medium { --importance-bg: #3c301d; --importance-text: #ffd585; --importance-border: #83612d; }
html[data-law-theme='dark'] .badge.importance-badge:is(.importance-low, .importance-unknown) { --importance-bg: #303b4a; --importance-text: #d1dbe8; --importance-border: #536276; }
html[data-law-theme] .badge.importance-badge {
  color: var(--importance-text);
  background: var(--importance-bg);
  border-color: var(--importance-border);
}
.badge.importance-badge .importance-level-dots {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  color: inherit;
}
.badge.importance-badge .importance-level-dot {
  display: block;
  box-sizing: border-box;
  width: 4px;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
}
.badge.importance-badge .importance-level-dot.is-filled { background: currentColor; }
.badge.importance-badge .importance-badge-label { color: inherit; font: inherit; }

/* Pending revisions belong with the obligation title, separate from row actions. */
.law-detail-obligation-stack > .law-detail-revision-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid #ddccff;
  border-radius: 5px;
  background: #f1eaff;
  color: #67409a;
  box-shadow: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}
.law-detail-revision-badge svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.law-detail-obligation-stack > .law-detail-revision-badge > span { color: inherit; }
.law-detail-obligation-stack > .law-detail-revision-badge:hover { background: #e7dcfb; border-color: #bca1e7; }
.law-detail-obligation-stack > .law-detail-revision-badge:focus-visible { outline: 2px solid #8054b7; outline-offset: 3px; }
html[data-law-theme='dark'] .law-detail-obligation-stack > .law-detail-revision-badge {
  color: #d4bbff;
  background: #332a4c;
  border-color: #59427f;
}
html[data-law-theme='dark'] .law-detail-obligation-stack > .law-detail-revision-badge:hover { background: #40335f; border-color: #8d70b8; }
html[data-law-theme='dark'] .law-detail-obligation-stack > .law-detail-revision-badge:focus-visible { outline-color: #d4bbff; }

/* Keep pending revisions inside the original detail card footprint. */
#lawDetailPage .registry-detail-upcoming-card { container-type: inline-size; }
#lawDetailPage .registry-detail-upcoming-card > .upcoming-candidate-panel,
.requirement-window #lawDetailPage .registry-detail-upcoming-card > .upcoming-candidate-panel {
  display: block;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  overscroll-behavior: contain;
}
#lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-strip {
  display: grid;
  gap: 6px;
  padding: 0;
  overflow: visible;
  scroll-snap-type: none;
}
#lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-card-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fbfdff;
  box-shadow: none;
}
#lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-kicker,
#lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-title {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
}
#lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-kicker {
  white-space: normal;
  overflow-wrap: anywhere;
  color: inherit;
}
#lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-title {
  padding-left: 10px;
  border-left: 1px solid #d5dfec;
}
#lawDetailPage .registry-detail-upcoming-card .source-link-button {
  width: auto;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 20px;
}
html[data-law-theme='dark'] #lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-card-inline {
  background: var(--surface);
  border-color: var(--line);
}
html[data-law-theme='dark'] #lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-title { border-color: var(--line); }
@container (max-width: 360px) {
  #lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-card-inline { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 4px 8px; }
  #lawDetailPage .registry-detail-upcoming-card .upcoming-candidate-title { grid-column: 1; padding-left: 0; border-left: 0; }
  #lawDetailPage .registry-detail-upcoming-card .source-link-button { grid-column: 2; grid-row: 1 / 3; }
}
#lawDetailPage .registry-detail-upcoming-card:focus { outline: 1px solid #8eafd5; outline-offset: 2px; }
html[data-law-theme='dark'] #lawDetailPage .registry-detail-upcoming-card:focus { outline-color: #6f91b8; }
