/* Ronin Pay: night black, washi cream and the red sun (after the logo).
   The mood layer over the shared skin, loaded last in every panel and on
   the standalone pages: palette tokens, the room behind every page, type,
   the hull (sidebar / top bar), cards, buttons and inputs.
   Our own drawings only (images/brand/ronin-*.svg).
   Bump ?v= in BrandTheme::skin() when it changes. */

:root {
    /* the red sun */
    --rn-red: 227, 20, 31;
    --rn-red-hi: 255, 52, 62;
    --rn-red-deep: 140, 10, 18;
    /* washi cream */
    --rn-cream: 242, 235, 221;
    --rn-cream-dim: 168, 160, 150;
    --rn-cream-faint: 120, 114, 107;
    /* sumi black */
    --rn-ink: 11, 11, 12;
    --rn-s1: 18, 17, 18;
    --rn-s2: 24, 22, 23;
    --rn-s3: 33, 30, 31;
    --rn-line: rgba(242, 235, 221, .08);
    --rn-line-strong: rgba(242, 235, 221, .16);

    --mn-primary: var(--rn-red); --mn-primary-2: var(--rn-red-hi); --mn-accent: var(--rn-red);
    --mi-brass: var(--rn-red); --mi-champagne: var(--rn-red-hi); --mi-terracotta: var(--rn-red);
    --mn-chrome: var(--rn-cream); --mn-chrome-hi: 255, 248, 238; --mn-chrome-mid: var(--rn-red); --mn-chrome-lo: var(--rn-cream-dim);
    --mn-ink-on-primary: 255, 248, 238;
    --mi-hall: var(--rn-ink); --mi-velvet: 14, 13, 14; --mi-seat: var(--rn-s1); --mi-seat-hi: var(--rn-s2);
    --mn-concrete-950: var(--rn-ink); --mn-concrete-900: var(--rn-s1); --mn-concrete-800: var(--rn-s2); --mn-concrete-700: var(--rn-s3);
    --y: rgb(var(--rn-red)); --y2: rgb(var(--rn-red-hi)); --ink: #fff8ee;
    --s1: rgb(var(--rn-s1)); --s2: rgb(var(--rn-s2)); --s3: rgb(var(--rn-s3));
    --t1: rgb(var(--rn-cream)); --t2: rgb(var(--rn-cream-dim)); --t3: rgb(var(--rn-cream-faint));
    --ep-holo: var(--rn-red);
    --ep-glow: 0 0 18px rgba(var(--rn-red), .55);
    --ep-hud: rgba(var(--rn-red), .35);
    --mn-hairline: var(--rn-line);
    --mn-hairline-strong: var(--rn-line-strong);
    --mn-focus-ring: 0 0 0 3px rgba(var(--rn-red), .22);
    --mn-font-display: 'Montserrat', 'Manrope', sans-serif;
    --mn-r-card: 1rem; --mn-r-panel: .875rem; --mn-r-control: .75rem;
    --rn-seigaiha: url("/images/brand/ronin-seigaiha.svg");
    --rn-flow: url("/images/brand/ronin-flow.svg");
}
::selection { background: rgb(var(--rn-red)); color: #fff8ee; }

/* ---------- The room: night, a red sun low in the corner, waves ---------- */
html, body, .fi-body { background-color: rgb(var(--rn-ink)) !important; color: rgb(var(--rn-cream)); }
.mn-room {
    background:
        radial-gradient(720px 520px at 104% -8%, rgba(var(--rn-red), .16), transparent 62%),
        radial-gradient(560px 420px at -8% 108%, rgba(var(--rn-red), .07), transparent 70%),
        rgb(var(--rn-ink)) !important;
}
.mn-room::before, .mn-room::after {
    content: '' !important; position: absolute; pointer-events: none; transform: none !important;
    clip-path: none !important; filter: none !important; animation: none !important;
}
/* seigaiha in the lower-right corner, fading out */
.mn-room::before {
    inset: auto 0 0 auto !important; width: 34rem !important; height: 20rem !important; top: auto !important;
    background: var(--rn-seigaiha) right bottom / 80px 40px repeat !important;
    opacity: .07; -webkit-mask-image: radial-gradient(closest-side at 100% 100%, #000, transparent);
    mask-image: radial-gradient(closest-side at 100% 100%, #000, transparent);
}
.mn-room::after { display: none !important; }
.bn-city, .bn-skyline { display: none !important; }

/* ---------- Type: Montserrat for headings and figures ---------- */
.fi-header-heading, .fi-section-header-heading, .bp-head h3, .bp-hello h2, .mn-login-heading,
.fi-modal-heading, .mx-eyebrow, .fi-wi-stats-overview-stat-value, .fi-ta-header-heading {
    font-family: var(--mn-font-display) !important; letter-spacing: -.01em;
}
.fi-header-heading.fi-header-heading { text-transform: none; letter-spacing: -.02em; font-weight: 800 !important; }
.fi-sidebar-group-label { font-family: var(--mn-font-display) !important; letter-spacing: .18em !important; color: rgb(var(--rn-cream-faint)) !important; font-size: .68rem !important; }

/* the eyebrow: a short red rule, then small spaced caps (as on the site) */
.rn-eyebrow { display: inline-flex; align-items: center; gap: .7rem; font: 700 .7rem/1 var(--mn-font-display); letter-spacing: .22em; text-transform: uppercase; color: rgb(var(--rn-cream-dim)); }
.rn-eyebrow::before { content: ''; width: 1.75rem; height: 2px; border-radius: 2px; background: rgb(var(--rn-red)); }

/* ---------- Hull: sidebar and top bar ---------- */
@media (min-width: 1024px) {
    .fi-sidebar.fi-sidebar.fi-sidebar {
        background: linear-gradient(180deg, #121011, #0b0a0b 70%) !important;
        border-inline-end: 1px solid var(--rn-line) !important;
        box-shadow: none !important;
    }
}
.fi-sidebar-header.fi-sidebar-header { background: none !important; border-bottom: 1px solid var(--rn-line); }
.fi-topbar, .fi-topbar > nav { background: rgba(11, 11, 12, .86) !important; backdrop-filter: blur(12px); border-bottom: 1px solid var(--rn-line) !important; }

/* active nav item: red tint, red icon, a red blade on the edge */
.fi-sidebar-item-active > .fi-sidebar-item-button, .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background: linear-gradient(90deg, rgba(var(--rn-red), .20), rgba(var(--rn-red), .04)) !important; position: relative;
}
.fi-sidebar-item-active > .fi-sidebar-item-button .fi-sidebar-item-icon,
.fi-sidebar-item.fi-active > .fi-sidebar-item-button .fi-sidebar-item-icon { color: rgb(var(--rn-red-hi)) !important; }
.fi-sidebar-item-active > .fi-sidebar-item-button .fi-sidebar-item-label { color: rgb(var(--rn-cream)) !important; }
.fi-sidebar-item-active > .fi-sidebar-item-button::before, .fi-sidebar-item.fi-active > .fi-sidebar-item-button::before {
    content: '' !important; position: absolute; inset-block: 20%; inset-inline-start: 0; width: 3px; border-radius: 2px;
    background: rgb(var(--rn-red)); box-shadow: var(--ep-glow);
}
.fi-topbar-item-active > a, .fi-topbar-item.fi-active > a, .fi-topbar-item-active > button { color: rgb(var(--rn-cream)) !important; }
.fi-topbar-item-active .fi-topbar-item-icon { color: rgb(var(--rn-red-hi)) !important; }

/* ---------- Cards: dark lacquer, a hairline, a faint red bloom ---------- */
.bp-card, .bp-tile, .fi-section, .fi-wi-stats-overview-stat, .mx-card, .pc-card, .fi-ta-ctn {
    border-color: var(--rn-line) !important;
    background-color: rgb(var(--rn-s1)) !important;
    background-image: linear-gradient(180deg, rgba(255, 248, 238, .02), transparent 45%) !important;
}
.bp-card::after, .fi-section::after, .mx-card::after, .pc-card::after { display: none !important; content: none !important; }
@media (hover: hover) { .bp-tile:hover, .bp-card:hover { border-color: rgba(var(--rn-red), .35) !important; } }

/* the balance card: the red sun rising behind lacquer, flowing red lines */
.bp-hero, .op-hero, .mx-vault--main {
    color: #fff8ee !important; position: relative; overflow: hidden;
    background:
        var(--rn-flow) right -2rem bottom -1rem / 70% 75% no-repeat,
        radial-gradient(70% 120% at 100% 0%, rgba(var(--rn-red), .28), transparent 60%),
        linear-gradient(160deg, #1d1718, #110f10 60%, #0c0b0c) !important;
    border: 1px solid rgba(var(--rn-red), .22) !important;
    box-shadow: 0 24px 60px -28px rgba(var(--rn-red), .45), inset 0 1px 0 rgba(255, 248, 238, .06) !important;
}
.bp-hero *, .op-hero *, .mx-vault--main * { color: inherit; }
.bp-hero::after, .op-hero.op-hero::after, .mx-vault.mx-vault--main::after { display: none !important; }
.bp-hero-actions a, .bp-hero .bp-btn { background: rgb(var(--rn-red)) !important; color: #fff8ee !important; border: 0 !important; }

/* ---------- Buttons: red pills; secondary is a cream outline pill ---------- */
.fi-btn, .mn-btn, .fi-ac-btn-action { border-radius: 999px !important; font-weight: 700 !important; letter-spacing: .005em; }
.fi-btn.fi-color-primary:not(.fi-btn-outlined), .mn-btn, .fi-ac-btn-action.fi-color-primary:not(.fi-btn-outlined) {
    background: rgb(var(--rn-red)) !important; color: #fff8ee !important; text-shadow: none !important;
    box-shadow: 0 10px 26px -12px rgba(var(--rn-red), .85), inset 0 1px 0 rgba(255, 255, 255, .16) !important; border: 0 !important;
}
.fi-btn.fi-color-primary:not(.fi-btn-outlined):hover, .mn-btn:hover { background: rgb(var(--rn-red-hi)) !important; filter: none; }
.fi-btn.fi-color-primary:not(.fi-btn-outlined) .fi-icon, .fi-btn.fi-color-primary:not(.fi-btn-outlined) svg, .mn-btn svg { color: #fff8ee !important; }
.fi-btn.fi-color-primary.fi-btn-outlined { color: rgb(var(--rn-cream)) !important; box-shadow: inset 0 0 0 1px rgba(var(--rn-red), .7) !important; background: transparent !important; }
.fi-btn.fi-color-gray { box-shadow: inset 0 0 0 1px var(--rn-line-strong) !important; background: rgba(255, 248, 238, .03) !important; color: rgb(var(--rn-cream)) !important; }
.fi-btn.fi-color-gray:hover { box-shadow: inset 0 0 0 1px rgba(242, 235, 221, .35) !important; }
.fi-link.fi-color-primary, a.fi-link { color: rgb(var(--rn-red-hi)) !important; }

/* inputs: lacquer wells with a red focus line */
.fi-input-wrp { background: rgb(var(--rn-ink)) !important; border-radius: .75rem !important; }
.fi-input-wrp:focus-within, .mn-input:focus { border-color: rgba(var(--rn-red), .85) !important; box-shadow: 0 0 0 3px rgba(var(--rn-red), .18) !important; }
.fi-toggle.fi-toggle-on, .fi-checkbox-input:checked, .fi-radio-input:checked { background-color: rgb(var(--rn-red)) !important; border-color: rgb(var(--rn-red)) !important; color: #fff8ee !important; }

/* badges and tabs */
.fi-badge.fi-color-primary { background: rgba(var(--rn-red), .14) !important; color: rgb(var(--rn-red-hi)) !important; box-shadow: inset 0 0 0 1px rgba(var(--rn-red), .35) !important; }
.fi-tabs-item-active, .fi-tabs-item.fi-active { color: rgb(var(--rn-cream)) !important; box-shadow: inset 0 -2px 0 rgb(var(--rn-red)) !important; background: transparent !important; }
.fi-topbar .fi-badge, .fi-sidebar-item-badge, .fi-topbar-item .fi-badge { background: rgb(var(--rn-red)) !important; color: #fff8ee !important; }
.fi-pagination-item-active .fi-pagination-item-button, .fi-pagination-item.fi-active .fi-pagination-item-button { background: rgb(var(--rn-red)) !important; color: #fff8ee !important; }

/* ---------- Logo: the lockup is wide (about 4.5:1), never squeeze it ---------- */
.fi-sidebar-header .mn-logo { height: auto !important; width: min(12.5rem, 100%) !important; max-height: 3.4rem !important; object-fit: contain; }
.fi-topbar .mn-logo { height: auto !important; width: auto !important; max-height: 2.1rem !important; max-width: 10.5rem !important; object-fit: contain; }
.mn-lockup { overflow: visible !important; }
.mi-hero-logo { width: min(30rem, 82%) !important; max-width: none !important; height: auto !important; filter: drop-shadow(0 20px 40px rgba(var(--rn-red), .25)) !important; }

@media (prefers-reduced-motion: reduce) { .mn-room::after { animation: none !important; } }
.fi-pagination-item-active .fi-pagination-item-label, .fi-pagination-item.fi-active .fi-pagination-item-label { color: #fff8ee !important; }

/* ---------- Charts: red bars, the current one lit ---------- */
.bp-bars i, .pc-column-bar i, .mh-chart-bar i, .mh-chart-bar.is-weekend i, .mh-chart-bar.is-peak i, .mh-pulse-bars i, .mh-ladder-bar i, .m-bar b {
    background: linear-gradient(180deg, rgba(var(--rn-red), .85), rgba(var(--rn-red), .35)) !important; box-shadow: none !important;
}
.bp-bars .is-now i, .mh-chart-bar:last-child i, .mh-chart-bar:hover i, .bp-bars > span:hover i, .pc-column.is-today .pc-column-bar i { background: rgb(var(--rn-red-hi)) !important; box-shadow: 0 0 18px -4px rgba(var(--rn-red), .8) !important; }
.mh-plate-bar i b { background: rgb(var(--rn-red)) !important; }
/* the filled tiles of the old gold skin become lacquer with a red edge */
.bp-tile--fill { background: linear-gradient(160deg, #241617, #141112) !important; border: 1px solid rgba(var(--rn-red), .3) !important; color: rgb(var(--rn-cream)) !important; }
.bp-tile--fill .bp-label { color: rgb(var(--rn-cream-dim)) !important; } .bp-tile--fill .bp-tile-icon { background: rgb(var(--rn-red)) !important; color: #fff8ee !important; }
