/* Final material pass: quiet archive-paper cards with a concise operational title rail. */
:root {
  --card-polish-ink: #173d3b;
  --card-polish-teal: #2d7268;
  --card-polish-teal-soft: #dcece7;
  --card-polish-brass: #b48a47;
  --card-polish-line: #aec8c0;
  --card-polish-paper: #fdfcf7;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__timeline,
  .cc-profile__structure,
  .cc-profile__archive-manager,
  .knowledge-v2__canvas-card,
  .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  border-color: var(--card-polish-line);
  background-color: color-mix(in srgb, var(--card-polish-paper) 94%, transparent);
  background-image: url("../assets/archive-crest-watermark.svg");
  background-position: right 18px bottom 16px;
  background-repeat: no-repeat;
  background-size: min(23%, 205px);
  box-shadow: inset 0 1px rgb(255 255 255 / 82%), 0 10px 24px rgb(22 64 55 / 8%);
}

/* Keep card headers readable without a heavy full-width dark bar. */
body.owner-shell-v1:not(.auth-required) #moduleStage .panel > .command-console-head,
body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header,
  .reminder-v2-section-title
) {
  position: relative;
  min-height: 46px;
  margin: -1px -1px 15px;
  padding: 11px 16px 11px 20px;
  border: 1px solid color-mix(in srgb, var(--card-polish-line) 76%, white);
  border-left: 4px solid var(--card-polish-teal);
  border-radius: 5px 5px 0 0;
  background-color: rgb(243 249 246 / 95%);
  background-image: url("../assets/archive-crest-watermark.svg");
  background-position: right 17px center;
  background-repeat: no-repeat;
  background-size: 82px;
  box-shadow: inset 0 -1px rgb(180 138 71 / 20%);
  color: var(--card-polish-ink);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > .command-console-head::before,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header,
  .reminder-v2-section-title
)::before {
  content: "";
  position: absolute;
  top: 0;
  right: 14px;
  width: 36px;
  height: 2px;
  background: var(--card-polish-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3 {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > .command-console-head,
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header
) :is(h3, h4, strong) {
  color: var(--card-polish-ink) !important;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head {
  min-height: 42px;
  margin-bottom: 10px;
  padding-block: 9px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head::before {
  width: 22px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__timeline,
  .cc-profile__structure,
  .cc-profile__archive-manager,
  .knowledge-v2__canvas-card,
  .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  border-color: rgb(127 185 171 / 46%);
  background-color: rgb(8 33 38 / 86%);
  background-image: url("../assets/archive-crest-watermark.svg");
  box-shadow: inset 0 1px rgb(199 244 229 / 7%), 0 15px 30px rgb(0 0 0 / 23%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > .command-console-head,
  .panel > h3,
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header,
  .reminder-v2-section-title
) {
  border-color: rgb(127 185 171 / 42%);
  border-left-color: #74bcae;
  background-color: rgb(11 51 57 / 91%);
  background-image: url("../assets/archive-crest-watermark.svg");
  box-shadow: inset 0 -1px rgb(218 178 97 / 28%);
  color: #dff0e9;
}

/* Large browser/empty areas carry a quiet crest so they read as intentional work surfaces. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__life-timeline,
  .knowledge-v2__browser,
  .knowledge-v2__records,
  .knowledge-v2__current-notes,
  .cc-profile__view-empty,
  .cc-profile__life-empty,
  .knowledge-v2__empty
) {
  background-color: color-mix(in srgb, var(--card-polish-paper) 93%, transparent);
  background-image: url("../assets/archive-crest-watermark.svg");
  background-position: center 58%;
  background-repeat: no-repeat;
  background-size: min(31%, 248px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__life-timeline,
  .knowledge-v2__browser,
  .knowledge-v2__records,
  .knowledge-v2__current-notes,
  .cc-profile__view-empty,
  .cc-profile__life-empty,
  .knowledge-v2__empty
) {
  background-color: rgb(8 33 38 / 58%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > .command-console-head,
  .cc-profile__editor-head,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__current-notes > header
) :is(h3, h4, strong) {
  color: #e5f5ee !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__life-head h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__life-editor > header h4 {
  color: #effaf4 !important;
}

@media (max-width: 700px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .panel > .command-console-head,
    .panel > h3,
    .cc-profile__editor-head,
    .cc-profile__life-head,
    .cc-profile__life-editor > header,
    .cc-profile__timeline > header,
    .cc-profile__structure > header,
    .knowledge-v2__editor-head,
    .knowledge-v2__browser-head,
    .knowledge-v2__current-notes > header,
    .reminder-v2-section-title
  ) {
    min-height: 42px;
    padding: 9px 12px 9px 15px;
  }
}
