/* R068 authoritative visual boundary. Loaded after legacy and historical
   tail layers so card material has one final, inspectable owner. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"] {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .64) !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, rgba(249, 244, 229, .96), rgba(228, 215, 177, .82)), url("../assets/paper-fibers-open.png") center / 118px 118px repeat !important;
  color: #183b3f !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 4px rgba(157, 109, 39, .18), 0 8px 18px rgba(55, 39, 16, .14) !important;
}

/* R072 semantic contrast contract: action intent owns its foreground. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  text-shadow: 0 1px 1px rgba(83, 24, 20, .4) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar,
  [data-command-recycle="true"] > .panel > h3
) :is(.hud-button, .mini-action, .status-button, a) {
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"]::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border: 1px solid rgba(189, 138, 56, .5) !important;
  border-radius: 4px !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"] > * {
  position: relative !important;
  z-index: 1 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"] :is(h3, h4, p, span, strong, small, label, a, button, .muted-row, .tag) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2) {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .64) !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, rgba(248, 244, 226, .96), rgba(226, 215, 181, .82)), url("../assets/cloth-alike-open.png") center / 112px 112px repeat !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 4px rgba(157, 109, 39, .16), 0 8px 18px rgba(55, 39, 16, .14) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2)::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border: 1px solid rgba(189, 138, 56, .46) !important;
  border-radius: 4px !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2) > * {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"],
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2) {
    border-radius: 5px !important;
  }
}

/* Finance cards use a light paper surface; never inherit the shell's light
   foreground on these panels. Dark action bands opt back into white below. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.panel, .finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) :is(h2, h3, h4, p, span, strong, small, label, a, button, li, .muted-row, .tag) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) :is(.mini-action, button, a) {
  background: rgba(255, 252, 241, .82) !important;
  border-color: rgba(157, 109, 39, .5) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
}

/* R069 boundary refactor: each module owns one outer material surface. The
   historical layers remain available for rollback, while this terminal layer
   gives every visible workbench a distinct, inspectable texture. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] :is(.people-overview-primary, .people-overview-create),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] :is(.reminder-v2-editor-card, .reminder-v2-list-card),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] .knowledge-v2,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="items"] .items-v2__overview,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="recycle"] [data-command-recycle="true"] > .module-canvas-widget > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="settings"] .settings-action-grid > .module-canvas-widget > .panel {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .64) !important;
  border-radius: 6px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 4px rgba(157, 109, 39, .16), 0 8px 18px rgba(55, 39, 16, .14) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] :is(.people-overview-primary, .people-overview-create) {
  background: linear-gradient(135deg, rgba(255, 247, 243, .92), rgba(224, 210, 167, .62)), url("../assets/linen-gold.png") center / 124px 124px repeat, url("../assets/arabesque-open.png") right 16px top 16px / 164px 164px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-overview-panel {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(226, 215, 181, .7)), url("../assets/paper-fibers-open.png") center / 118px 118px repeat, url("../assets/botanical-paper-r1.svg") right 18px top 16px / 154px 154px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] :is(.reminder-v2-editor-card, .reminder-v2-list-card) {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(224, 210, 167, .62)), url("../assets/paper-fibers-open.png") center / 118px 118px repeat, url("../assets/archive-crest-watermark.svg") right 18px top 16px / 150px 150px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] .knowledge-v2 {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(226, 215, 181, .7)), url("../assets/paper-grid.png") center / 118px 118px repeat, url("../assets/botanical-paper-r1.svg") right 18px top 16px / 154px 154px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="items"] .items-v2__overview {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(224, 210, 167, .62)), url("../assets/paper-fibers-open.png") center / 118px 118px repeat, url("../assets/gold-scale-open.png") right 18px top 16px / 154px 154px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="recycle"] [data-command-recycle="true"] > .module-canvas-widget > .panel {
  background: linear-gradient(135deg, rgba(248, 244, 226, .94), rgba(226, 215, 181, .7)), url("../assets/cloth-alike-open.png") center / 112px 112px repeat, url("../assets/archive-crest-watermark.svg") right 18px top 16px / 150px 150px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="settings"] .settings-action-grid > .module-canvas-widget > .panel {
  background: linear-gradient(135deg, rgba(244, 240, 221, .94), rgba(224, 210, 167, .62)), url("../assets/black-linen-open.png") center / 124px 124px repeat, url("../assets/botanical-paper-r1.svg") right 18px top 16px / 154px 154px no-repeat !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .people-overview-primary,
  .people-overview-create,
  .library-overview-panel,
  .reminder-v2-editor-card,
  .reminder-v2-list-card,
  .knowledge-v2,
  .items-v2__overview,
  [data-command-recycle="true"] > .module-canvas-widget > .panel,
  .settings-action-grid > .module-canvas-widget > .panel
):not([data-art-frame-owner="true"])::after {
  content: "" !important;
  position: absolute !important;
  inset: 3px !important;
  pointer-events: none !important;
  z-index: 0 !important;
  border: 1px solid rgba(189, 138, 56, .46) !important;
  border-radius: 4px !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .people-overview-primary,
  .people-overview-create,
  .library-overview-panel,
  .reminder-v2-editor-card,
  .reminder-v2-list-card,
  .knowledge-v2,
  .items-v2__overview,
  [data-command-recycle="true"] > .module-canvas-widget > .panel,
  .settings-action-grid > .module-canvas-widget > .panel
) > * {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
    .people-overview-primary,
    .people-overview-create,
    .library-overview-panel,
    .reminder-v2-editor-card,
    .reminder-v2-list-card,
    .knowledge-v2,
    .items-v2__overview,
    [data-command-recycle="true"] > .module-canvas-widget > .panel,
    .settings-action-grid > .module-canvas-widget > .panel
  ) {
    border-radius: 5px !important;
    box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .76), inset 0 0 0 4px rgba(157, 109, 39, .14), 0 6px 14px rgba(55, 39, 16, .12) !important;
  }
}

/* R072 terminal semantic contrast and finance frame-fit contract.
   This block is intentionally the final cascade owner: action intent keeps a
   light foreground on dark controls, while nested finance lists use a crisp
   contained rail instead of a clipped full-frame artwork layer. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .52) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  background: linear-gradient(120deg, #b45245, #8f3935) !important;
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  border-color: rgba(255, 249, 244, .56) !important;
  text-shadow: 0 1px 1px rgba(83, 24, 20, .4) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(
  .finance-overview-ledger-list,
  .finance-overview-anomaly-list,
  .finance-overview-asset-list,
  .finance-day-list
)[data-art-tier="nested"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 3px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: none !important;
  border: 1px solid rgba(189, 138, 56, .54) !important;
  border-radius: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .64) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(
  .finance-overview-ledger-list,
  .finance-overview-anomaly-list,
  .finance-overview-asset-list,
  .finance-day-list
)[data-art-tier="nested"] {
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* R073 optimization: finance-specific rules are more specific than the
   generic action contract, so give these controls an explicit high-contrast
   material treatment at the same module specificity. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  background: linear-gradient(120deg, #b45245, #8f3935) !important;
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  border-color: rgba(255, 249, 244, .58) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-overview-hot-days > .list[data-art-frame-owner="true"][data-art-tier="nested"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 3px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: none !important;
  border: 1px solid rgba(189, 138, 56, .54) !important;
  border-radius: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .64) !important;
}

/* R074 shared cascade: module-specific action rules must not restore dark ink
   on dark primary/danger controls outside finance. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  background: linear-gradient(120deg, #b45245, #8f3935) !important;
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  border-color: rgba(255, 249, 244, .58) !important;
}

/* People editor repair: both cards own one vertical scroll surface. The
   generic preferences layer otherwise creates a clipped nested form, hiding
   the profile and interaction save actions below the card viewport. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 28px !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 .people-full-edit-form {
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 18px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 :is(
  .people-full-edit-actions,
  .people-interaction-entry-in-editor .people-form
) {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 #peopleInteractionSubmit {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
}

/* R075 final contrast owner: the finance module's broad paper-ink rule is
   intentionally overridden for calendar chrome, whose teal header can be
   dark enough to swallow the inherited ink color. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc :is(
  .fc-col-header-cell-cushion,
  .fc-daygrid-day-number,
  .fc-event-title,
  .fc-list-event-title,
  .fc-list-event-time
) {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
  text-shadow: 0 1px 2px rgba(4, 31, 31, .48) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc .fc-daygrid-day-number {
  font-weight: 700 !important;
}

/* R076 homepage contrast repair: the legacy ornamental theme targets the
   first text span with stronger selectors than the density layer. Keep the
   dark task chips light, and keep the pale timeline surface dark-inked. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:first-child :is(strong, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:first-child {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
  text-shadow: 0 1px 1px rgba(4, 31, 31, .36) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:first-child :is(strong, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:first-child {
  color: #17383b !important;
  -webkit-text-fill-color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:not(:first-child) :is(strong, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:not(:first-child) {
  color: #17383b !important;
  -webkit-text-fill-color: #17383b !important;
}

/* The editor shell is the scroll owner. Always show a stable rail so the
   lower fields and save actions remain discoverable on desktop. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 109, 39, .72) rgba(224, 210, 167, .34) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas > .people-canvas-editor-panel::-webkit-scrollbar {
  width: 12px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas > .people-canvas-editor-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(157, 109, 39, .88), rgba(189, 138, 56, .66)) !important;
  border: 2px solid rgba(255, 253, 241, .72) !important;
  border-radius: 8px;
}

/* R077 finance readability repair: only the teal weekday rail is a light-ink
   surface. Calendar cells and their income/expense chips stay dark-inked on
   paper, while the save action gets an explicit filled treatment. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc .fc-col-header-cell-cushion {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc :is(.fc-daygrid-day-number, .fc-event-title, .fc-list-event-title, .fc-list-event-time) {
  color: #17383b !important;
  -webkit-text-fill-color: #17383b !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc .fc-daygrid-event {
  color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-day-editor .hud-button.primary,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] [data-finance-day-entry-submit="true"] {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border: 1px solid rgba(255, 253, 244, .58) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}

/* R078 detail-card scroll owner. The generic nested-art rule is loaded before
   this file and forces overflow hidden, so the dedicated ledger card takes
   ownership again at the terminal cascade boundary. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-calendar-detail-records__list {
  max-height: clamp(240px, 42vh, 560px) !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 109, 39, .72) rgba(224, 210, 167, .34) !important;
}

/* Emergency rendering containment: dozens of legacy visual layers still
   request live backdrop blurs on large nested panels. Keep the authored
   textures, borders and shadows, but remove the repeated GPU blur passes. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.panel, [data-module-canvas-block], [data-overview-canvas-widget], .module-canvas-widget) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* R080 root-cause guard: class selectors are intentional fallbacks for
   moments before visual-card-system-v2.js can stamp data-art-scroll-owner.
   A behavior owner must keep its scroll rail even if a legacy layer left an
   art-frame marker behind. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__records, .knowledge-v2__capture-body),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__pane--answer, .ai-workbench__result) {
  box-sizing: border-box !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 109, 39, .72) rgba(224, 210, 167, .34) !important;
  border: 1px solid rgba(157, 109, 39, .36) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .66) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__records, .knowledge-v2__capture-body)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__records, .knowledge-v2__capture-body)::after,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__pane--answer, .ai-workbench__result)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__pane--answer, .ai-workbench__result)::after,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-scroll-owner="true"]::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-scroll-owner="true"]::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* R080 also removes the historical 104% artwork expansion.  The ornate rail
   belongs to the card edge, so it is inset and sized to the real box rather
   than painted beyond the box and clipped by overflow:hidden. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-scroll-owner="true"]):not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  inset: 1px !important;
  background-position: center top, center bottom, left center, right center !important;
  background-size: 100% 16px, 100% 16px, 16px 100%, 16px 100% !important;
}

/* Metric and nested elements get a contained rule only.  They do not paint a
   second four-sided artwork frame over the parent card or its scrollbar. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"]),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-scroll-owner="true"] {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid rgba(157, 109, 39, .36) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .66) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* R081 shared behavior boundary. Every renderer marks a growing list with
   data-scroll-owner; the runtime mirror is accepted for surfaces discovered
   after render. One contract covers both themes so legacy art layers cannot
   turn a list into a clipped, unreadable card again. */
:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"]) {
  box-sizing: border-box !important;
  min-height: 0 !important;
  max-height: min(60vh, 560px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--cc-accent, #c49a4b) color-mix(in srgb, var(--cc-surface-muted, #202b27) 72%, transparent) !important;
  color: var(--cc-ink, #e8eeeb) !important;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"]) :is(h1, h2, h3, h4, p, span, strong, small, label, li, a) {
  color: var(--cc-ink, #e8eeeb) !important;
  -webkit-text-fill-color: var(--cc-ink, #e8eeeb) !important;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::before,
:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::-webkit-scrollbar-thumb {
  background: var(--cc-accent, #c49a4b) !important;
  border: 2px solid color-mix(in srgb, var(--cc-surface-muted, #202b27) 78%, transparent) !important;
  border-radius: 8px;
}
