/* ============================================================================
   MY CRUSADER — NAME ALIAS BRIDGE  (mc-alias.css)
   Lane F integration, Nov 9, 2026. Scratch build only — not deployed.

   PART 1 · VARIABLE ALIASES. Lane B's sheets and mc-legacy-map.css speak
   in --mc-* names (37 tokens, authored from the spec's starter values
   while Lane A's sheet was still empty). Lane A's canonical sheets
   (mc-tokens.css / mc-glass.css, loaded BEFORE this file) speak in the
   measured spec names. This block is the ONLY place in the final stack
   where a --mc-* variable is defined: every Lane B name is mapped onto
   a Lane A token. Where Lane B's value had no Lane A counterpart, the
   nearest token on Lane A's locked scales was chosen and the delta is
   recorded in INTEGRATION.md. Lane A's values win every conflict.

   PART 2 · CLASS-NAME BRIDGE. A handful of class names Lane B's markup
   uses differ from Lane A's BEM names for the same component, and two
   Lane A recipes are keyed to markup the app does not have (the canvas
   class, the nav's inner bar element). Those bridges are built here,
   ONLY from Lane A tokens, so neither lane's work is lost. No legacy
   styling is introduced: every rule below restates a Lane A recipe or
   a Lane B layout (doors grid, segment children) in Lane A tokens.
   Load order: app.css, mc-tokens.css, mc-glass.css, THIS FILE,
   mc-tiers.css, mc-legacy-map.css.
   ========================================================================== */

/* ============================ PART 1 · VARIABLES ========================= */
:root {
  /* ---- deep field (Lane B starter pair -> measured field scale) ------- */
  --mc-deep-1: var(--deep-900);          /* #05272B -> #01242F, field base   */
  --mc-deep-2: var(--deep-700);          /* #083B3D -> #09313D, nearest      */
  --mc-deep-3: var(--deep-600);          /* #0A4548 -> #0A4C50, nearest      */

  /* ---- glass fills ------------------------------------------------------ */
  --mc-glass-aqua: var(--glass-aqua);            /* .16 alpha -> .18       */
  --mc-glass-aqua-strong: var(--glass-aqua);     /* .28 alpha -> .18 (see
                                                    INTEGRATION.md delta)  */
  --mc-glass-bright: var(--glass-bright);        /* same RGB, .34 -> .72   */
  --mc-glass-panel: var(--glass-solid);          /* translucent panel ->
                                                    Lane A no-blur fill    */
  --mc-glass-panel-solid: var(--glass-solid);    /* #0A3437 -> #0E3A42      */

  /* ---- rim / light ------------------------------------------------------ */
  --mc-rim: var(--rim);                  /* #5FF2DF — identical value       */
  --mc-rim-soft: var(--rim-soft);        /* identical value                 */
  --mc-rim-dim: var(--rim-faint);        /* .32 alpha -> .28 hairline token */

  /* ---- ink ---------------------------------------------------------------- */
  --mc-ink: var(--ink);                  /* #FFFFFF — identical             */
  --mc-ink-2: var(--ink-2);              /* #DFFBF5 — identical             */
  --mc-ink-dim: var(--ink-3);            /* #A9CFC8 -> rgba(223,251,245,.68) */
  --mc-on-bright: var(--ink-on-bright);  /* #06302F -> #06302E              */

  /* ---- warm accent -------------------------------------------------------- */
  --mc-gold: var(--accent-warm);         /* #E3BC3F — identical value       */
  --mc-gold-ink: var(--accent-warm-deep);/* #C9A227 -> #BF8E46, darkest
                                            warm token on Lane A's scale    */

  /* ---- state (NO Lane A counterpart exists — Lane A has no state scale.
     Mapped onto app.css's standing tokens, which are part of this stack
     and byte-identical to live; see INTEGRATION.md.) ---------------------- */
  --mc-ok: var(--ok);                    /* #7FC97F — identical value       */
  --mc-bad: var(--bad);                  /* #E88A76 -> #E07A5F (app token)  */
  --mc-line: var(--rim-faint);           /* hairline divider token          */

  /* ---- geometry (Lane A locked radius scale wins) ------------------------ */
  --mc-r-pill: var(--radius-pill);       /* 14px since item 7 (Nov 16, 2026)  */
  --mc-r-card: var(--radius-card);       /* 20px -> 28px                    */
  --mc-r-tile: var(--radius-tile);       /* 24px -> 32px                    */
  --mc-r-sheet: var(--radius-card);      /* 24px -> 28px (Lane A sheets use
                                            the card radius)                */
  --mc-r-input: var(--radius-m);         /* 12px -> 14px (inputs-inner)     */

  /* ---- spacing (mapped BY VALUE onto Lane A's 4px scale — Lane B's
     names are one step off Lane A's for the same length) ----------------- */
  --mc-s1: var(--space-2);               /* .5rem  = 8px  — identical       */
  --mc-s2: var(--space-4);               /* 1rem   = 16px — identical       */
  --mc-s3: var(--space-5);               /* 1.25rem = 20px — identical
                                            (= --card-pad)                  */
  --mc-s4: var(--space-6);               /* 1.5rem = 24px — identical       */

  /* ---- control heights (Lane A locked heights win) ----------------------- */
  --mc-h-btn: var(--h-btn);              /* 44px — identical                */
  --mc-h-input: var(--h-input);          /* 44px -> 48px                    */
  --mc-h-chip: var(--h-chip);            /* 36px -> 28px                    */
  --mc-h-seg: var(--h-seg);              /* 52px — identical                */
  --mc-h-nav: var(--h-nav);              /* 64px -> 72px                    */

  /* ---- blur (Lane A's three recipe radii) -------------------------------- */
  --mc-blur-pill: var(--blur-pill);      /* 14px — identical                */
  --mc-blur-card: var(--blur-card);      /* 16px -> 18px                    */
  --mc-blur-sheet: var(--blur-sheet);    /* 18px -> 20px                    */

  /* ---- type ---------------------------------------------------------------- */
  --mc-font: var(--font);                /* Lane A system stack (superset)  */
}

/* ============================ PART 2 · CLASS BRIDGE ====================== */

/* Canvas: Lane B painted the field on <body> itself; Lane A's canvas
   recipe (.mcg-canvas) is keyed to a class the app pages do not carry
   and Stage 1 adds no body classes. Same gradients, Lane A tokens. */
body {
  background:
    radial-gradient(120% 60% at 85% -5%,  var(--deep-600) 0%, transparent 55%),
    radial-gradient(90% 50% at -10% 38%,  var(--deep-600) 0%, transparent 50%),
    radial-gradient(140% 90% at 50% 115%, var(--deep-700) 0%, transparent 60%),
    linear-gradient(168deg, var(--deep-800) 0%, var(--deep-900) 46%, var(--deep-950) 100%);
  background-color: var(--deep-950);
}

/* Bottom nav: Lane B put .mcg-nav on the .tabbar element itself; Lane A's
   .mcg-nav is a wrapper whose fill lives on an inner bar element the app
   does not render. The tabbar therefore carries Lane A's card recipe
   directly (same fill, blur, rim and shadow as .mcg-nav__bar). */
.tabbar.mcg-nav {
  background: linear-gradient(165deg, rgba(190,255,245,.36), rgba(95,242,223,.22) 48%, rgba(9,49,61,.42));
  -webkit-backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
  border: 1px solid var(--rim-soft); border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--inset-glass), var(--shadow-m);
}

/* Segmented bar children: Lane B's markup (home feed bar, menu Look
   control) puts bare buttons/links inside .mcg-seg and marks the active
   one .on / aria-current; Lane A's sheet styles named child classes and
   a puck element this markup does not have. Bridge: children are
   transparent segments; the active child carries the puck gradient. */
.mcg-seg > * {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  height: 100%; min-height: var(--touch-min); padding: 0 var(--space-2);
  border: 0; border-radius: var(--radius-pill);
  background: transparent; box-shadow: none;
  color: var(--ink); font: inherit; font-size: var(--text-body);
  font-weight: var(--weight-med); text-decoration: none; cursor: pointer;
}
.mcg-seg > * + * { border-left: 1px solid var(--rim-faint); border-radius: 0; }
.mcg-seg > * + *:last-child { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.mcg-seg > .on, .mcg-seg > [aria-current="true"] {
  /* ITEM 7 (Nov 16, 2026): dark-glass active segment (the bright puck
     gradient is retired under Wayne's button law, Nov 13, 2026). */
  background: linear-gradient(160deg, rgba(190,255,245,.34), rgba(38,140,163,.38) 55%, rgba(9,49,61,.50));
  color: var(--ink); font-weight: var(--weight-bold);
  border-left-color: transparent;
  box-shadow: var(--inset-glass), var(--glow-rim), var(--shadow-s);
}
.mcg-seg > .on + *, .mcg-seg > [aria-current="true"] + * { border-left-color: transparent; }

/* Doors cluster (home): Lane B layout, Lane A spacing. */
.mcg-doors { display: grid; gap: var(--space-3); margin: var(--space-2) 0; }
@media (min-width: 560px) {
  .mcg-doors { grid-template-columns: 1.25fr 1fr; }
  .mcg-doors .mcg-tile:first-child { grid-row: span 2; min-height: 172px; }
}
.mcg-doors .mcg-tile { min-height: 84px; }

/* Tiles: Lane B's single-dash names for Lane A's bright variant and
   subtitle element, plus the <h3> title its markup uses. NOTE the
   two-class selectors: mc-legacy-map.css (kept byte-identical) opens
   with an @import of mc-glass.css, so Lane A's sheet is spliced into
   the cascade a second time AFTER this file — a one-class bridge rule
   would lose the tie to the re-imported .mcg-tile. Two classes win
   regardless of order; verified by computed-style probe (INTEGRATION). */
.mcg-tile.mcg-tile-bright {
  background: linear-gradient(150deg, var(--glass-bright-hi), var(--glass-bright) 45%, rgba(62,201,188,.50));
  color: var(--ink-on-bright);
}
.mcg-tile.mcg-tile-bright h3 { color: var(--ink-on-bright); }
.mcg-tile-sub { display: block; font-size: var(--text-label); color: var(--ink-2); margin: 2px 0 0; }
.mcg-tile.mcg-tile-bright .mcg-tile-sub { color: rgba(6,48,46,.78); }
.mcg-tile h3 {
  font-size: var(--text-tile); font-weight: var(--weight-black);
  letter-spacing: .02em; line-height: var(--leading-tight);
  margin: var(--space-1) 0;
}

/* Camera bubble (home): Lane B's standalone link class. Lane A's bubble
   recipe (in .mcg-nav__cam) is positioned for inside the nav bar; this
   one sits in flow, so it takes the same static iridescent gradient,
   ring and shadows at the same --h-camera size, without the absolute
   positioning. */
.mcg-nav-cam {
  width: var(--h-camera); height: var(--h-camera); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--deep-900); text-decoration: none;
  border: 1px solid rgba(255,255,255,.75);
  background:
    radial-gradient(120% 120% at 28% 22%, var(--ink) 0%, var(--bubble-2) 34%, var(--bubble-1) 62%, var(--bubble-3) 100%);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.85), inset 0 -8px 14px rgba(9,49,61,.28),
              0 10px 22px rgba(0,24,26,.45), 0 0 20px rgba(95,242,223,.35);
}

/* Feed-card pieces Lane B names in home's templates. */
.mcg-kind { align-self: flex-start; text-transform: uppercase; letter-spacing: .06em; }
.mcg-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.mcg-source-inset {
  display: block; margin-top: var(--space-3); padding: var(--space-3);
  border-radius: var(--radius-s); color: var(--ink); text-decoration: none;
  font-size: var(--text-label);
  background: var(--glass-solid); border: 1px solid var(--rim-faint);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), var(--shadow-s);
}
.mcg-source-inset b {
  display: block; color: var(--ink); font-size: var(--text-caption);
  font-weight: var(--weight-bold); letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: var(--space-1);
}

/* Button variants Lane B's glass defined (no page in Stage 1 uses them;
   kept so the name contract Lane B published stays whole). */
.mcg-btn.mcg-btn-ghost {
  background: linear-gradient(160deg, rgba(190,255,245,.42), var(--glass-aqua) 55%, rgba(23,112,104,.22));
  color: var(--ink); border: 1px solid var(--rim-soft);
}
.mcg-btn.mcg-btn-danger {
  background: rgba(224,122,95,.10); color: var(--bad);
  border: 1px solid var(--bad); box-shadow: none;
}
