/* RAVEN Navy Luxe palette overlay for Cinny v4.11.1
   Reskinned 2026-05-25 to canonical "Navy Luxe" / L1 Midnight Pearl
   (_CANON/brand/tokens.css v2). Was the warm "fortress" overlay (backup:
   raven-fortress.css.bak.2026-05-25). Variable NAMES kept (--rv-*) so this
   stays a clean drop-in swap of the same structure — only the hex values
   were remapped to the navy roles. Loaded after Cinny's bundled CSS via
   index.html <link> injection.
   Goal: light Navy-Luxe feel, NOT a redesign. */

:root, .light-theme, .dark-theme {
  --rv-fortress-deep:   #122c4f;  /* --deep   (deep navy)        */
  --rv-fortress-mid:    #1b3a66;  /* --deep-2 (navy hover)       */
  --rv-fortress-bright: #5b88b2;  /* --mid    (ocean accent)     */
  --rv-stone-dark:      #14171f;  /* --text   (ink, body text)   */
  --rv-stone-mid:       #5b6473;  /* --muted                     */
  --rv-stone-light:     #9aa6b8;  /* dim                         */
  --rv-stone-pale:      #e7e3d3;  /* --line   (warm pearl line)  */
  --rv-parchment:       #fbf9e4;  /* --page   (pearl)            */
}

/* Cinny exposes a small set of color vars; override the primary
   accent + surface tones with Navy-Luxe equivalents. We only override
   the obvious top-level tokens — no per-component micro-tuning. */
.light-theme {
  --bg-surface:         var(--rv-parchment);
  --bg-surface-low:     #ffffff;
  --bg-surface-hover:   var(--rv-stone-pale);
  --bg-surface-active:  #f2ead7;   /* --surface-2 (pearl tint)   */

  --bg-primary:         var(--rv-fortress-deep);
  --bg-primary-hover:   var(--rv-fortress-mid);
  --bg-primary-active:  var(--rv-fortress-mid);

  /* Cinny's primary action color (Login button, links, send) */
  --ac-primary-300:     var(--rv-fortress-bright);
  --ac-primary-400:     var(--rv-fortress-deep);
  --ac-primary-500:     var(--rv-fortress-deep);
  --ac-primary-600:     var(--rv-fortress-mid);
  --bg-primary-low:     var(--rv-stone-pale);

  --tc-surface-high:    var(--rv-stone-dark);
  --tc-surface-normal:  var(--rv-stone-dark);
  --tc-surface-low:     var(--rv-stone-mid);

  --tc-primary-high:    #ffffff;
  --tc-primary-normal:  #ffffff;

  --bg-tooltip:         var(--rv-fortress-deep);
}

/* Sidebar tint — deep-navy navigation, like Slack's left rail.
   White text on #122c4f = ~13:1 (AAA). */
.cinny-sidebar,
nav[aria-label="navigation"],
[class*="Sidebar"] {
  background-color: var(--rv-fortress-deep) !important;
  color: #ffffff;
}
.cinny-sidebar a,
.cinny-sidebar button,
[class*="Sidebar"] a,
[class*="Sidebar"] button {
  color: #e7e3d3;   /* pearl line on navy = ~11:1 (AAA) */
}

/* Brand wordmark — replace any "Cinny" with RAVEN via attribute selector
   where possible; logo image override left to favicon swap. */

/* Compact message density — Slack-ish, not Element-ish */
[class*="MessageBase"], [class*="Message_"] {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

/* Identity floor (D006 2026-08-10 RYAN): hide the cosmetic in-client Register
   affordance. Self-registration is already SSO-gated server-side (Synapse login
   advertises only m.login.sso/token/appservice; no m.login.password) + nginx 302s
   /register -> signup.myauthid.com. This removes the visual "Do not have an account?
   Register" link so the identity floor is clean in the UI too. href-based (build-stable). */
a[href^="/register"] { display: none !important; }
p:has(> a[href^="/register"]) { display: none !important; }

/* ===== 2026-08-12 RYAN: ART GMX8 brand-skin deploy (login targets from LIVE DOM capture) =====
   Reversible; backup /root/raven-web-bak/raven-fortress.css.pre-brand-*. Selectors verified against
   the deployed Cinny v4.11.1 bundle DOM (build-coupled hashed classes; re-verify after any rebuild). */

/* [operator #1] Homeserver box removal: hide the pinned "Homeserver" label+field block.
   Structural :has on the homeserver input component (div > div > input._1rrvnjm*). The SSO
   "Continue with GMA Daisy" is a direct /login/sso/redirect href -> works with the box gone = one tap. */
div:has(> div > input[class*="_1rrvnjm"]) { display: none !important; }

/* [operator #3] Footer de-brand: strip version / Twitter / Powered-by-Matrix; KEEP About (AGPL surface). */
a[href*="github.com/ajbura"],
a[href="https://twitter.com/cinnyapp"],
a[href="https://matrix.org"] { display: none !important; }

/* [operator #4] SSO CTA -> navy filled, pearl label (kills grey-on-white) */
a[href*="/login/sso/redirect"] {
  background-color: #122c4f !important;
  color: #fbf9e4 !important;
  border-color: #122c4f !important;
}
a[href*="/login/sso/redirect"] * { color: #fbf9e4 !important; }

/* Login splash ground = pearl (kills dotted/grey Cinny login bg) */
body, #root { background-color: #fbf9e4; }

/* Navy underlined links (institutional, FP #1) */
a { text-decoration-color: #122c4f; }

/* Light-surface DEFENCE (FOUNDATIONAL #1): force pearl/ink even if dark-theme ever active -> no reverse type ships */
.dark-theme {
  --bg-surface: var(--rv-parchment); --bg-surface-low: #ffffff;
  --bg-surface-hover: var(--rv-stone-pale); --bg-surface-active: #f2ead7;
  --bg-primary: var(--rv-fortress-deep); --bg-primary-hover: var(--rv-fortress-mid);
  --ac-primary-300: var(--rv-fortress-bright); --ac-primary-400: var(--rv-fortress-deep);
  --ac-primary-500: var(--rv-fortress-deep); --ac-primary-600: var(--rv-fortress-mid);
  --tc-surface-high: var(--rv-stone-dark); --tc-surface-normal: var(--rv-stone-dark);
  --tc-surface-low: var(--rv-stone-mid); --tc-primary-high: #ffffff; --tc-primary-normal: #ffffff;
}

/* iOS phone-first (ART section 8a): safe-area insets + dynamic viewport + no zoom-on-focus */
body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
@supports (height: 100dvh) { html, body, #root { min-height: 100dvh; } }
input, textarea, select { font-size: 16px; }
