/* Page colour mode — light / dark for a whole Flow page, header and footer included.
   Set per page in MTB Flow (Page settings → Color mode) or left to the reader on the tool pages.
   Values: docs/ops/DESIGN.md (Ink, Bone, and mixes of the two).  Loaded only on a page that carries a mode. */

/* ── the page ground ── */
html[data-omtb-theme="light"] body.omtb-themed,
html[data-omtb-theme="light"] body.omtb-themed .frame-zero-main { background: #EDE7D8; color: #0A0A0A; }
html[data-omtb-theme-lock] .omtb-theme:not(.omtb-theme--map) { display: none; }

/* ── header: solid Bone with Ink marks (not light glass) ── */
html[data-omtb-theme="light"] body.omtb-themed .omtb-ih.omtb-sc-bar {
  background: #EDE7D8; -webkit-backdrop-filter: none; backdrop-filter: none; color: #0A0A0A;
  box-shadow: inset 0 -1px 0 rgba(10, 10, 10, .16);
}
html[data-omtb-theme="light"] body.omtb-themed .omtb-sc-bar__mark { color: #0A0A0A; opacity: 1; }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sc-bar__btn { color: rgba(10, 10, 10, .86); }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sc-bar__btn:hover { color: #0A0A0A; background-color: rgba(10, 10, 10, .07); }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sc-bar__btn:focus-visible,
html[data-omtb-theme="light"] body.omtb-themed .omtb-sc-bar__mark:focus-visible { box-shadow: 0 0 0 2px rgba(10, 10, 10, .72); }
html[data-omtb-theme="light"] body.omtb-themed .mb2-nav-root--bar .mb2-nav__trigger:not([aria-expanded="true"]) { color: #0A0A0A; background: transparent; box-shadow: none; }
html[data-omtb-theme="light"] body.omtb-themed .mb2-nav-root--bar .mb2-nav__trigger:not([aria-expanded="true"])::before { opacity: 0; }

/* ── footer: its own band, in both modes ── */
body.omtb-themed .omtb-sf { border-top: 1px solid rgba(237, 231, 216, .22); }
body.omtb-themed .omtb-sf .mb5-ground { background: #141414; }
body.omtb-themed .omtb-sf .mb5-film { -webkit-mask-image: none; mask-image: none; }
body.omtb-themed .omtb-sf .mb5-film::before { -webkit-mask-image: none; mask-image: none; }
body.omtb-themed .omtb-sf .mb5-vig { background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 10, .6) 100%); }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sf {
  --mb5-ink: color-mix(in srgb, #0A0A0A 9%, #EDE7D8); --mb5-bone: #0A0A0A; --mb5-bone-86: rgba(10, 10, 10, .86); --mb5-bone-70: rgba(10, 10, 10, .7); --mb5-ember-t: #A83A28;
  border-top: 0; color: #0A0A0A;   /* the toned band is the boundary; a line on top of it reads as a second edge */
}
html[data-omtb-theme="light"] body.omtb-themed .omtb-sf .mb5-foot__base { border-top-color: rgba(10, 10, 10, .34); }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sf .mb5-news__row { border-bottom-color: rgba(10, 10, 10, .5); }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sf .mb5-ground { background: var(--mb5-ink); }
html[data-omtb-theme="light"] body.omtb-themed .omtb-sf .mb5-film,
html[data-omtb-theme="light"] body.omtb-themed .omtb-sf .mb5-vig { display: none; }

/* the reader's switch, where a page has no tool nav to carry it */
.omtb-themeswitch { display: inline-flex; gap: 2px; border: 1px solid rgba(237, 231, 216, .22); border-radius: 999px; padding: 3px; margin-top: 18px; }
.omtb-themeswitch button { font: 600 12px/1 "Hanken Grotesk", system-ui, sans-serif; letter-spacing: .04em; color: rgba(237, 231, 216, .7); background: transparent; border: 0; border-radius: 999px; height: 30px; padding: 0 14px; cursor: pointer; }
.omtb-themeswitch button[aria-pressed="true"] { background: #EDE7D8; color: #0A0A0A; }
html[data-omtb-theme="light"] .omtb-themeswitch { border-color: rgba(10, 10, 10, .24); }
html[data-omtb-theme="light"] .omtb-themeswitch button { color: rgba(10, 10, 10, .7); }
html[data-omtb-theme="light"] .omtb-themeswitch button[aria-pressed="true"] { background: #0A0A0A; color: #EDE7D8; }
