/* CYKI legacy bridge (ADR-073 D6, Phase 1b). Loaded by every restyled legacy page AFTER cyki-tokens.css.
   The pages' own <style> blocks now say var(--lg-*) wherever they used a legacy colour literal; this file is the ONE place
   that decides what those variables are. Change a colour here and every page (including already-published /blog/ articles) follows.
   Version marker (used by the blog patch script): cyki-legacy v3 (2026-10-08: the hub grid component, glass cards, header Market link) */
:root{
  --lg-bg:var(--bg);            /* was #F1E9D9 as a page/surface background */
  --lg-band:#0A0A0A;            /* was #1B1714 as a background: a deliberately dark band, the same in both themes */
  --lg-on-band:#F5F2ED;         /* was #F1E9D9 as text on a dark band: fixed */
  --lg-text:var(--text);        /* was #1B1714 as text */
  --lg-text2:var(--text2);      /* was #37312A */
  --lg-muted:var(--muted);      /* was #574F44 */
  --lg-surf2:var(--surf);       /* was #E7DCC6 (cards, footer) */
  --lg-line:var(--border);      /* was #c9b994 and soft borders */
  --lg-line-strong:var(--text); /* was #1B1714 as a border */
}
html{background:var(--bg)}
body{transition:background-color .18s ease,color .18s ease}
@media (prefers-reduced-motion:reduce){body{transition:none}}
/* the hub header look on the shared legacy skeleton: light bar, dark wordmark */
header{background:var(--bg) !important;border-bottom:1px solid var(--line) !important}
header .wordmark,header .wordmark .cyki{color:var(--text) !important}
header .wordmark .sub{color:var(--muted) !important;opacity:1 !important}
header .home-link{color:var(--text2) !important}
header .inner{align-items:center !important}
header .home-link{margin-left:auto}
header .inner > a.home-link{margin-left:0}
body > header a:focus-visible,body > header button:focus-visible{outline:2px solid #FF4A17;outline-offset:2px}

/* ======================= v2: the /market/ background treatment on every page (Klaas 2026-10-08) =======================
   Exposed blueprint grid: 1px hairlines at 0/25/50/75/100% of the content box (0/50/100% on a phone), full document height,
   drawn on body::before so no markup is added (this is why the published /blog/ articles get it from this one file).
   Orange 7px registration markers sit only on row-line corners (top of <main>, top of the footer), aria-hidden by construction
   (CSS pseudo-elements), never beside a figure. Frosted-glass panels are borderless: tint + blur only. Solid fallbacks without
   backdrop-filter and under prefers-reduced-transparency. Text-contrast numbers: docs/screens/market-hub/README.md "Figure tokens on glass". */
body{position:relative;background:transparent !important}
/* The grid itself (.kvgd, row lines, markers, Spec labels) is the markup and CSS of the hub, in cyki-tokens.css; there is no pseudo-element variant.
   <main> is the reading column: it carries the page background so a hairline never runs behind body text (lines show in the margins, and in the
   row lines between sections). get/ (kvnoglass) has no text column and stays transparent. The cards below are the surfaces. */
main{position:relative}
main:not(.kvnoglass){background:var(--bg)}
:root[data-theme="dark"] main{--muted:#A8A69F;--lg-muted:#A8A69F}
/* cards that hold TEXT become borderless glass; cards that hold figures stay opaque (see cyki-pages.css) */
.note,.step,.disclosure,.boilerplate,.spec{background:var(--gltint) !important;border:0 !important;box-shadow:none !important}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
.note,.step,.disclosure,.boilerplate,.spec{-webkit-backdrop-filter:blur(var(--gb)) saturate(1.6);backdrop-filter:blur(var(--gb)) saturate(1.6)}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.note,.step,.disclosure,.boilerplate,.spec{background:var(--glsolid) !important}}
@media (prefers-reduced-transparency:reduce){.note,.step,.disclosure,.boilerplate,.spec{background:var(--glsolid) !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important}}
/* header: glass bar (same recipe as the hub) + the Market link */
body>header{position:sticky;top:0;z-index:50;background:var(--glass) !important;-webkit-backdrop-filter:blur(var(--gb));backdrop-filter:blur(var(--gb))}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){body>header{background:var(--glsolid) !important}}
@media (prefers-reduced-transparency:reduce){body>header{background:var(--glsolid) !important;-webkit-backdrop-filter:none;backdrop-filter:none}}
body>header .inner{display:flex;align-items:center;justify-content:flex-start;gap:4px 14px;flex-wrap:wrap}
body>header .wordmark{color:var(--text) !important;display:flex;align-items:baseline;gap:12px}
body>header .wordmark .cyki{font-family:var(--f-head);font-weight:400;font-size:26px;letter-spacing:.02em;color:var(--text) !important}
body>header .wordmark .sub{font-family:var(--f-num);color:var(--muted) !important;opacity:1 !important}
body>header .inner>.home-link{margin-left:auto;font-family:var(--f-num);color:var(--text2) !important}
body>header .inner>.kvmlink{margin-left:auto}
body>header .inner>.home-link+.kvmlink,body>header .inner>.kvmlink+.kvtheme-btn,body>header .inner>.kvmlink~.home-link{margin-left:0}
body>header .home-link:hover{color:var(--text) !important}
@media (max-width:420px){body>header .wordmark .sub{display:none}}
body>header a{text-decoration:none}
