/* ==========================================================================
   EQUITYMARKER — INSTITUTIONAL DESIGN SYSTEM
   Derived from the RSK brand system (navy / orange / Inter), adapted for a
   dense equity-administration application.

   LOAD ORDER: this file must load AFTER Bootstrap and Font Awesome.
   It is injected into <head> by the navigation user controls
   (see Navigation_*.ascx.cs -> RegisterSharedAssets).

   SECTIONS
     1. Tokens
     2. Base & typography
     3. Editorial primitives (eyebrow, rule, lead, pull-quote)
     4. Layout (container, section, grids)
     5. Buttons
     6. Bootstrap re-skin (forms, tables, cards, badges, modals, tabs...)
     7. Application components (kpi, panel, data table, glyph, empty state)
     8. Marketing components (hero, flat panel, timeline, pipeline)
     9. Legacy compatibility layer  <-- keeps not-yet-migrated pages coherent
    10. Busy / double-click state
    11. Utilities
    12. Responsive
    13. Motion & print
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
    /* Structure — RSK institutional navy. Carries the weight of the design:
       hero grounds, sidebar, panel top-borders, headings. */
    --em-navy: #002855;
    --em-navy-deep: #001733;
    --em-navy-mid: #013A76;

    /* Accent — taken from the EquityMarker logo.
       The mark is an azure gradient #1058F8 -> #1090F8 (centre ~#1070F8) beside
       a #404040 charcoal wordmark. The raw logo azure is NOT used directly:
       against white it gives white-on-blue 4.47:1, just under the 4.5 needed
       for the bold 13px uppercase button labels, so the accent is stepped one
       notch darker to #0D66E8 (5.14:1 in both directions).

       The accent needs TWO steps because it is used on opposite grounds:
         --em-accent          on white/gray  -> 5.14:1
         --em-accent-on-dark  on navy        -> 5.92:1
       The single-step version failed badly on navy (logo azure on --em-navy is
       only 3.27:1), which is why hero eyebrows and the sidebar active state
       use the lighter step. */
    --em-accent: #0D66E8;
    --em-accent-hover: #0A4FB8;
    --em-accent-on-dark: #5CA8FF;
    --em-accent-soft: #EAF2FE;
    --em-logo-charcoal: #404040;

    /* Neutrals */
    --em-white: #FFFFFF;
    --em-canvas: #F5F7FA;
    --em-gray-soft: #F5F7FA;
    --em-gray-100: #F9FAFB;
    --em-gray-200: #F3F4F6;
    --em-gray-border: #E5E7EB;
    --em-gray-border-strong: #D1D5DB;
    --em-text-dark: #111827;
    --em-text-muted: #5B6472;  /* 4.95:1 even on a 10% tint; #6B7280 fell to 4.00 */
    --em-text-on-navy: #A0AABF;
    --em-list-on-navy: #D1D5DB;

    /* Semantic — muted, institutional, never candy-bright */
    --em-success: #15803D;
    --em-success-soft: #ECFDF3;
    --em-warning: #B45309;
    --em-warning-soft: #FFFBEB;
    --em-danger: #B91C1C;
    --em-danger-soft: #FEF2F2;
    --em-info: #002855;
    --em-info-soft: #EEF3F9;

    /* Type */
    --em-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --em-font-mono: 'SFMono-Regular', ui-monospace, Menlo, Consolas, 'Liberation Mono', monospace;

    /* Geometry — institutional: near-square, hairline, restrained shadow */
    --em-radius: 2px;
    --em-radius-lg: 4px;
    --em-hairline: 1px solid var(--em-gray-border);
    --em-shadow-sm: 0 1px 2px rgba(0, 23, 51, 0.04);
    --em-shadow: 0 4px 14px rgba(0, 23, 51, 0.06);
    --em-shadow-lg: 0 16px 40px rgba(0, 23, 51, 0.10);

    /* Chrome metrics */
    --em-sidebar-w: 264px;
    --em-topbar-h: 64px;

    /* Bootstrap 5.3 theme bridge */
    --bs-primary: #002855;
    --bs-primary-rgb: 0, 40, 85;
    --bs-link-color: #002855;
    --bs-link-color-rgb: 0, 40, 85;
    --bs-link-hover-color: #0D66E8;
    --bs-link-hover-color-rgb: 13, 102, 232;
    --bs-body-font-family: var(--em-font);
    --bs-body-color: #111827;
    --bs-body-color-rgb: 17, 24, 39;
    --bs-border-color: #E5E7EB;
    --bs-border-radius: 2px;
    --bs-border-radius-sm: 2px;
    --bs-border-radius-lg: 4px;
    --bs-border-radius-xl: 4px;
    --bs-focus-ring-color: rgba(13, 102, 232, 0.25);
}


/* ==========================================================================
   2. BASE & TYPOGRAPHY
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--em-font) !important;
    color: var(--em-text-dark);
    background-color: var(--em-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.em-app {
    background-color: var(--em-canvas);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--em-font);
    color: var(--em-navy-deep);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Financial figures must align in columns. */
.em-num,
.em-table td.em-num,
.em-table th.em-num,
.em-kpi__value,
.em-stat__value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

a {
    color: var(--em-navy);
    text-decoration: none;
    transition: color 0.15s ease;
}

    a:hover {
        color: var(--em-accent);
    }

hr {
    border-color: var(--em-gray-border);
    opacity: 1;
}

::selection {
    background: var(--em-navy);
    color: #fff;
}

/* A bare <canvas> defaults to 300x150 and can overflow its container in the
   window before Chart.js sizes it. */
canvas {
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

:focus-visible {
    outline: 2px solid var(--em-accent);
    outline-offset: 2px;
}


/* ==========================================================================
   3. EDITORIAL PRIMITIVES
   ========================================================================== */
.em-eyebrow {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--em-accent);
    margin-bottom: 14px;
}

/* On a navy ground the accent must step lighter or it drops to ~3.3:1. */
.em-bg-navy .em-eyebrow,
.em-bg-navy-deep .em-eyebrow,
.em-hero .em-eyebrow,
.em-on-navy .em-eyebrow {
    color: var(--em-accent-on-dark);
}

.em-eyebrow--navy {
    color: var(--em-navy);
}

.em-rule {
    width: 40px;
    height: 3px;
    background: var(--em-accent);
    border: 0;
    margin: 0 0 24px;
    opacity: 1;
}

.em-rule--center {
    margin-left: auto;
    margin-right: auto;
}

.em-h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--em-navy-deep);
    margin-bottom: 20px;
}

.em-h3 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--em-navy-deep);
    margin-bottom: 14px;
}

.em-lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--em-navy);
}

.em-muted {
    color: var(--em-text-muted);
}

/* Orange left-border key statement */
.em-key-statement {
    border-left: 3px solid var(--em-accent);
    padding: 4px 0 4px 20px;
    margin: 28px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--em-navy-deep);
    line-height: 1.5;
}

.em-pull-quote {
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--em-navy-deep);
    max-width: 900px;
    margin: 0 auto;
}

/* Arrow list — RSK signature */
.em-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .em-list li {
        position: relative;
        padding-left: 24px;
        margin-bottom: 12px;
        color: var(--em-text-muted);
    }

        .em-list li::before {
            content: '\2192';
            position: absolute;
            left: 0;
            top: 0;
            color: var(--em-accent);
            font-weight: 700;
        }

.bg-navy .em-list li,
.em-on-navy .em-list li {
    color: var(--em-list-on-navy);
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */
.em-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.em-section {
    padding: 96px 0;
}

.em-section--tight {
    padding: 64px 0;
}

.em-bg-gray {
    background-color: var(--em-gray-soft);
}

.em-bg-navy {
    background-color: var(--em-navy);
    color: #fff;
}

.em-bg-navy-deep {
    background-color: var(--em-navy-deep);
    color: #fff;
}

    .em-bg-navy h1, .em-bg-navy h2, .em-bg-navy h3, .em-bg-navy h4, .em-bg-navy h5,
    .em-bg-navy-deep h1, .em-bg-navy-deep h2, .em-bg-navy-deep h3, .em-bg-navy-deep h4, .em-bg-navy-deep h5 {
        color: #fff;
    }

    .em-bg-navy p, .em-bg-navy-deep p {
        color: var(--em-text-on-navy);
    }

.em-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.em-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.em-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.em-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}


/* ==========================================================================
   5. BUTTONS
   Uppercase, letter-spaced, square. Orange = primary action. Navy = structure.
   ========================================================================== */
.em-btn,
.btn.em-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    font-family: var(--em-font);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--em-radius);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

.em-btn-primary {
    background-color: var(--em-accent);
    border-color: var(--em-accent);
    color: #fff !important;
}

    .em-btn-primary:hover,
    .em-btn-primary:focus {
        background-color: var(--em-accent-hover);
        border-color: var(--em-accent-hover);
        color: #fff !important;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(13, 102, 232, 0.28);
    }

.em-btn-navy {
    background-color: var(--em-navy);
    border-color: var(--em-navy);
    color: #fff !important;
}

    .em-btn-navy:hover,
    .em-btn-navy:focus {
        background-color: var(--em-navy-deep);
        border-color: var(--em-navy-deep);
        color: #fff !important;
        transform: translateY(-1px);
    }

.em-btn-outline {
    background-color: transparent;
    border-color: var(--em-navy);
    color: var(--em-navy) !important;
}

    .em-btn-outline:hover,
    .em-btn-outline:focus {
        background-color: var(--em-navy);
        color: #fff !important;
    }

.em-btn-light {
    background-color: transparent;
    border-color: #fff;
    color: #fff !important;
}

    .em-btn-light:hover,
    .em-btn-light:focus {
        background-color: #fff;
        color: var(--em-navy-deep) !important;
    }

.em-btn-ghost {
    background: transparent;
    border-color: var(--em-gray-border);
    color: var(--em-text-muted) !important;
}

    .em-btn-ghost:hover {
        border-color: var(--em-navy);
        color: var(--em-navy) !important;
        background: var(--em-gray-100);
    }

.em-btn-sm {
    padding: 8px 16px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.em-btn-lg {
    padding: 17px 38px;
    font-size: 0.95rem;
}

.em-btn-block {
    width: 100%;
}

.em-btn-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* --- Bootstrap button re-skin (covers every un-migrated asp:Button) --- */
.btn {
    font-family: var(--em-font);
    font-weight: 600;
    border-radius: var(--em-radius);
    letter-spacing: 0.01em;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
    --bs-btn-bg: var(--em-accent);
    --bs-btn-border-color: var(--em-accent);
    --bs-btn-hover-bg: var(--em-accent-hover);
    --bs-btn-hover-border-color: var(--em-accent-hover);
    --bs-btn-active-bg: var(--em-accent-hover);
    --bs-btn-active-border-color: var(--em-accent-hover);
    --bs-btn-disabled-bg: var(--em-accent);
    --bs-btn-disabled-border-color: var(--em-accent);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: #fff;
}

.btn-secondary {
    --bs-btn-bg: var(--em-navy);
    --bs-btn-border-color: var(--em-navy);
    --bs-btn-hover-bg: var(--em-navy-deep);
    --bs-btn-hover-border-color: var(--em-navy-deep);
    --bs-btn-active-bg: var(--em-navy-deep);
    --bs-btn-active-border-color: var(--em-navy-deep);
    --bs-btn-disabled-bg: var(--em-navy);
    --bs-btn-disabled-border-color: var(--em-navy);
}

.btn-outline-primary {
    --bs-btn-color: var(--em-navy);
    --bs-btn-border-color: var(--em-navy);
    --bs-btn-hover-bg: var(--em-navy);
    --bs-btn-hover-border-color: var(--em-navy);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--em-navy);
    --bs-btn-active-border-color: var(--em-navy);
}

.btn-outline-secondary {
    --bs-btn-color: var(--em-text-muted);
    --bs-btn-border-color: var(--em-gray-border-strong);
    --bs-btn-hover-bg: var(--em-navy);
    --bs-btn-hover-border-color: var(--em-navy);
    --bs-btn-hover-color: #fff;
}

.btn-success {
    --bs-btn-bg: var(--em-success);
    --bs-btn-border-color: var(--em-success);
    --bs-btn-hover-bg: #126A33;
    --bs-btn-hover-border-color: #126A33;
}

.btn-danger {
    --bs-btn-bg: var(--em-danger);
    --bs-btn-border-color: var(--em-danger);
    --bs-btn-hover-bg: #9B1717;
    --bs-btn-hover-border-color: #9B1717;
}

.btn-link {
    --bs-btn-color: var(--em-navy);
    --bs-btn-hover-color: var(--em-accent);
    text-decoration: none;
    font-weight: 600;
}

.btn-check:focus + .btn,
.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(13, 102, 232, 0.25);
}


/* ==========================================================================
   6. BOOTSTRAP RE-SKIN
   ========================================================================== */

/* --- Forms --- */
.form-label,
.em-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--em-text-muted);
    margin-bottom: 6px;
}

.form-control,
.form-select,
.input-group-text {
    font-family: var(--em-font);
    font-size: 0.925rem;
    color: var(--em-text-dark);
    background-color: #fff;
    border: 1px solid var(--em-gray-border-strong);
    border-radius: var(--em-radius);
    padding: 0.55rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--em-navy);
        box-shadow: 0 0 0 3px rgba(0, 40, 85, 0.10);
    }

    .form-control::placeholder {
        color: #9CA3AF;
    }

    .form-control:disabled,
    .form-control[readonly],
    .form-select:disabled {
        background-color: var(--em-gray-100);
        color: var(--em-text-muted);
    }

.input-group-text {
    background-color: var(--em-gray-100);
    color: var(--em-text-muted);
    font-weight: 600;
}

/* ==================================================================================================
   THE DOUBLE CHECKBOX

   <asp:CheckBox CssClass="form-check-input" /> does NOT put that class on the <input>. When a
   CheckBox has a CssClass, Text, or any attribute, ASP.NET wraps it:

       <span class="form-check-input"><input type="checkbox" ... /></span>

   So Bootstrap draws its 1em bordered box on the WRAPPER, and the browser draws a native checkbox
   for the input inside it — two boxes, one control. It is in the markup on 16 checkboxes across four
   pages: the permission matrix (5), plan features (9), the export options (1) and the Investor Center
   configuration (1).

   Fixed here rather than in the markup on purpose: the alternative is CssClass -> InputAttributes in
   code-behind on every instance, and several are inside Repeaters where that means new ItemDataBound
   handlers on the permission matrix — a screen with a history of subtle breakage. One rule reaches
   every instance and cannot alter postback behaviour. Controls NOT inside a Repeater set
   InputAttributes["class"] from Page_Load instead and never produce the wrapper at all: see the
   signup channel radios and the two directory switches.

   The wrapper is stripped back to an inert inline box; the real <input> inside it is then styled
   with the same shape and brand colour Bootstrap would have given it.

   THE .form-switch SELECTOR IS WHY THE RESET IS LISTED TWICE BELOW. Bootstrap's
   `.form-switch .form-check-input` is (0,2,0) and it happily matches a <span> — it outranks a bare
   `span.form-check-input` at (0,1,1) and would put the switch's 2em pill and background-image back on
   the wrapper. The second selector raises this to (0,2,1) so the reset wins wherever the wrapper
   appears. (The :checked and :focus rules further down need no such treatment: those pseudo-classes
   never match a span.)
   ================================================================================================== */
span.form-check-input,
.form-switch span.form-check-input {
    /* Undo everything Bootstrap's .form-check-input applied to the wrapper. */
    display: inline;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    vertical-align: baseline;
    -webkit-appearance: none;
    appearance: none;
    print-color-adjust: unset;
}

    /* accent-color styles the native control's checked fill and is honoured by every browser this
       application supports, which avoids reimplementing Bootstrap's SVG tick. */
    span.form-check-input > input[type="checkbox"],
    span.form-check-input > input[type="radio"] {
        width: 1em;
        height: 1em;
        margin: 0;
        vertical-align: -0.125em;
        accent-color: var(--em-navy);
        cursor: pointer;
    }

    span.form-check-input > input[type="checkbox"]:focus-visible,
    span.form-check-input > input[type="radio"]:focus-visible {
        outline: 2px solid var(--em-navy);
        outline-offset: 1px;
    }

    /* A .form-check gives its input a negative left margin to hang in the gutter; with the wrapper
       neutralised that margin has to move to the inner input or the box overlaps its label. */
    .form-check span.form-check-input {
        float: left;
        margin-left: -1.5em;
    }

/* ==================================================================================================
   SCREENSHOT LIGHTBOX

   Product screenshots on the marketing pages render a few hundred pixels wide, which is too small to
   read the interface they are selling. Wrapping one in .em-shot makes it clickable; the handler in
   equitymarker.js opens it full size.

   THE WRAPPER ALREADY EXISTED. Every platform page already framed its screenshots in .em-shot (see
   "Product screenshot figure" further down, which owns the border, background and shadow). This block
   adds only the INTERACTION, so no markup changed and all 42 existing screenshots became clickable at
   once. Keep the two blocks separate but do not redefine the figure's own properties here.

   tabindex and role are applied by equitymarker.js, not written into the markup. The lightbox needs
   that script to exist at all, so a focusable wrapper with no script behind it would be a keyboard
   trap leading nowhere — better that the affordance appears only when it works.
   ================================================================================================== */
.em-shot {
    position: relative;
    cursor: zoom-in;
}

    .em-shot:focus-visible {
        outline: 3px solid var(--em-accent);
        outline-offset: 3px;
    }

    /* A small magnifier badge, so the image reads as interactive before it is hovered. Pointer-events
       none: it must never intercept the click the wrapper is listening for. */
    .em-shot::after {
        content: "\f00e";               /* Font Awesome magnifying-glass-plus */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        right: 10px;
        bottom: 10px;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(0, 40, 85, 0.82);
        color: #fff;
        font-size: 0.9rem;
        opacity: 0;
        transform: translateY(4px);
        transition: opacity 0.18s ease, transform 0.18s ease;
        pointer-events: none;
    }

    .em-shot:hover::after,
    .em-shot:focus-visible::after {
        opacity: 1;
        transform: translateY(0);
    }

/* Stops the page behind the overlay scrolling. */
.em-lightbox-lock {
    overflow: hidden;
}

/* VISIBILITY DOES NOT DEPEND ON THE ANIMATION. The overlay is opaque as soon as [hidden] comes off;
   the fade is an ANIMATION, whose end state is simply this rule, so an environment that skips or never
   advances it still shows a usable dialog.

   The first attempt transitioned opacity from 0 to 1 on a class the script added. That fails badly in
   any context that is not compositing — a background tab, some embedded webviews — because the
   transition never advances and you are left with a fully transparent element covering the viewport
   and swallowing every click. Invisible and modal is the worst possible combination; there is no
   affordance to escape something you cannot see. */
.em-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;                      /* above the sticky nav */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 23, 51, 0.88);
    opacity: 1;
    animation: em-lightbox-in 0.18s ease;
}

    /* [hidden] needs the !important: the display:flex above is more specific than the UA default and
       would otherwise keep a "hidden" overlay visible. */
    .em-lightbox[hidden] {
        display: none !important;
    }

@keyframes em-lightbox-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.em-lightbox__frame {
    max-width: min(1400px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.em-lightbox__img {
    /* Caps on BOTH axes: a tall screenshot must not run off the viewport, and a wide one must not
       overflow it. object-fit keeps the aspect ratio while both apply. */
    max-width: 100%;
    max-height: calc(100vh - 128px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--em-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    background: #fff;
}

.em-lightbox__caption {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
    text-align: center;
}

.em-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;                        /* 44px: the minimum comfortable touch target */
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

    .em-lightbox__close:hover {
        background: rgba(255, 255, 255, 0.26);
    }

    .em-lightbox__close:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 2px;
    }

@media (max-width: 767.98px) {
    .em-lightbox {
        padding: 12px;
    }

    .em-lightbox__img {
        max-height: calc(100vh - 96px);
    }
}

/* Someone who asked for less motion still gets the overlay, just without the fade. Safe precisely
   because the overlay's visible state is its normal state, not the animation's end state. */
@media (prefers-reduced-motion: reduce) {
    .em-lightbox {
        animation: none;
    }

    .em-shot::after {
        transition: none;
    }
}

/* ==================================================================================================
   SMS CONSENT BLOCK

   The 10DLC disclosure panel. Shared by the signup form and both profile screens, because the
   disclosure text itself is shared (Security\TwoFactor.SmsConsentFinePrint) and a consent screen that
   looks like an afterthought on one page and a considered notice on another is the kind of difference
   an auditor notices. Page-local copies of these rules were the reason the profile version rendered
   unstyled.
   ================================================================================================== */
.sms-consent {
    border: 1px solid var(--em-gray-border);
    border-left: 3px solid var(--em-accent);
    background: var(--em-gray-soft);
    padding: 14px 16px;
}

    .sms-consent .form-check-label {
        font-size: 0.88rem;
        line-height: 1.5;
        color: var(--em-navy-deep);
    }

.sms-consent__heading {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--em-text-muted);
}

.sms-consent__fine {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--em-text-muted);
    margin-top: 9px;
}

.form-check-input {
    border-color: var(--em-gray-border-strong);
    border-radius: var(--em-radius);
}

    .form-check-input:checked {
        background-color: var(--em-navy);
        border-color: var(--em-navy);
    }

    .form-check-input:focus {
        border-color: var(--em-navy);
        box-shadow: 0 0 0 3px rgba(0, 40, 85, 0.10);
    }

.form-switch .form-check-input:checked {
    background-color: var(--em-accent);
    border-color: var(--em-accent);
}

.form-text {
    font-size: 0.8rem;
    color: var(--em-text-muted);
}

/* Chrome paints autofilled inputs with its own pale-blue wash; repaint it so
   a restored login form still matches the palette. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    -webkit-text-fill-color: var(--em-text-dark) !important;
    caret-color: var(--em-text-dark);
    transition: background-color 5000s ease-in-out 0s;
}

/* ASP.NET validators */
.field-validation-error,
span[id*="rfv"],
span[id*="Validator"],
.em-validation {
    color: var(--em-danger);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 4px;
}

/* --- Tables --- */
.table {
    --bs-table-color: var(--em-text-dark);
    --bs-table-border-color: var(--em-gray-border);
    --bs-table-hover-bg: var(--em-gray-100);
    font-size: 0.9rem;
    margin-bottom: 0;
}

    .table > thead > tr > th,
    .table thead th {
        background-color: var(--em-gray-soft);
        color: var(--em-navy);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        padding: 0.7rem 1rem;
        border-bottom: 1px solid var(--em-gray-border);
        white-space: nowrap;
        vertical-align: middle;
    }

    .table > tbody > tr > td,
    .table tbody td {
        padding: 0.75rem 1rem;
        vertical-align: middle;
        color: var(--em-text-dark);
        border-bottom: 1px solid var(--em-gray-200);
    }

    .table > tbody > tr:last-child > td {
        border-bottom: 0;
    }

.table-hover > tbody > tr:hover > * {
    background-color: var(--em-gray-100);
}

/* ASP.NET GridView / DataList emit plain tables — cover them too */
table.em-table,
.em-panel table {
    width: 100%;
    border-collapse: collapse;
}

/* --- Cards --- */
.card {
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-radius: var(--em-radius-lg);
    box-shadow: none;
}

.card-header {
    background-color: var(--em-gray-soft);
    border-bottom: 1px solid var(--em-gray-border);
    font-weight: 700;
    color: var(--em-navy);
    font-size: 0.95rem;
}

.card-footer {
    background-color: var(--em-gray-100);
    border-top: 1px solid var(--em-gray-border);
}

/* --- Badges --- */
.badge {
    font-family: var(--em-font);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--em-radius);
    padding: 0.35em 0.6em;
}

/* --- Bootstrap colour utilities ---------------------------------------------
   Re-point these through Bootstrap's *-rgb custom properties, NOT with flat
   `background-color: ... !important` overrides.

   Bootstrap composes these utilities as
       rgba(var(--bs-primary-rgb), var(--bs-bg-opacity))
   so a flat !important override silently destroys the whole opacity system:
   `.bg-primary.bg-opacity-10`, which should be a 10% tint behind dark text,
   collapses to a SOLID block and the text on it becomes unreadable. That is
   exactly what happened to the "Granting To:" panel on the option-grant page
   and to 25 other tinted panels across the app.

   Setting the -rgb variables gives solid fills AND correct tints, and fixes
   .border-* and .text-* opacity variants at the same time. */
:root {
    --bs-primary-rgb: 0, 40, 85;        /* navy      #002855 */
    --bs-secondary-rgb: 91, 100, 114;   /* muted     #5B6472 */
    --bs-success-rgb: 21, 128, 61;      /* success   #15803D */
    --bs-danger-rgb: 185, 28, 28;       /* danger    #B91C1C */
    --bs-warning-rgb: 180, 83, 9;       /* warning   #B45309 */
    --bs-info-rgb: 1, 58, 118;          /* navy-mid  #013A76 */
    --bs-light-rgb: 245, 247, 250;      /* gray-soft #F5F7FA */
    --bs-dark-rgb: 0, 23, 51;           /* navy-deep #001733 */
}

/* .text-dark / .text-black are plain colour utilities with no rgb composition
   in Bootstrap 5.3, so they do need an explicit re-point. */
.text-dark { color: var(--em-navy-deep) !important; }
.text-black { color: var(--em-navy-deep) !important; }
.text-white-50 { color: var(--em-text-on-navy) !important; }
.text-muted { color: var(--em-text-muted) !important; }

/* --- Dropdowns --- */
.dropdown-menu {
    border: 1px solid var(--em-gray-border);
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow);
    padding: 6px;
    font-size: 0.9rem;
}

.dropdown-item {
    border-radius: var(--em-radius);
    padding: 0.5rem 0.75rem;
    color: var(--em-text-dark);
    font-weight: 500;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: var(--em-gray-soft);
        color: var(--em-navy);
    }

    .dropdown-item.active,
    .dropdown-item:active {
        background-color: var(--em-navy);
        color: #fff;
    }

.dropdown-divider {
    border-top-color: var(--em-gray-border);
}

/* --- Modals --- */
.modal-content {
    border: 0;
    border-top: 4px solid var(--em-navy);
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow-lg);
}

.modal-header {
    background-color: var(--em-gray-soft);
    border-bottom: 1px solid var(--em-gray-border);
    padding: 1rem 1.5rem;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--em-navy-deep);
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background-color: var(--em-gray-100);
    border-top: 1px solid var(--em-gray-border);
    padding: 0.9rem 1.5rem;
}

/* --- Tabs / pills --- */
.nav-tabs {
    border-bottom: 1px solid var(--em-gray-border);
    gap: 4px;
}

    .nav-tabs .nav-link {
        border: 0;
        border-bottom: 3px solid transparent;
        border-radius: 0;
        color: var(--em-text-muted);
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 0.7rem 1.1rem;
    }

        .nav-tabs .nav-link:hover {
            color: var(--em-navy);
            border-bottom-color: var(--em-gray-border-strong);
            background: transparent;
        }

        .nav-tabs .nav-link.active {
            color: var(--em-navy);
            background: transparent;
            border-bottom-color: var(--em-accent);
        }

.nav-pills .nav-link {
    border-radius: var(--em-radius);
    color: var(--em-text-muted);
    font-weight: 600;
}

    .nav-pills .nav-link.active {
        background-color: var(--em-navy);
        color: #fff;
    }

/* --- Alerts --- */
.alert {
    border-radius: var(--em-radius);
    border: 1px solid var(--em-gray-border);
    border-left-width: 3px;
    font-size: 0.9rem;
    padding: 0.85rem 1.1rem;
}

.alert-success { background: var(--em-success-soft); border-left-color: var(--em-success); color: #14532D; }
.alert-danger  { background: var(--em-danger-soft);  border-left-color: var(--em-danger);  color: #7F1D1D; }
.alert-warning { background: var(--em-warning-soft); border-left-color: var(--em-warning); color: #78350F; }
.alert-info    { background: var(--em-info-soft);    border-left-color: var(--em-navy);    color: var(--em-navy-deep); }
.alert-primary { background: var(--em-info-soft);    border-left-color: var(--em-navy);    color: var(--em-navy-deep); }

/* --- Progress --- */
.progress {
    height: 6px;
    border-radius: 0;
    background-color: var(--em-gray-200);
}

.progress-bar {
    background-color: var(--em-navy);
    border-radius: 0;
}

.progress-bar.bg-orange,
.progress-bar.em-progress-accent {
    background-color: var(--em-accent);
}

/* --- Pagination --- */
.page-link {
    color: var(--em-navy);
    border-color: var(--em-gray-border);
    border-radius: 0 !important;
    font-size: 0.85rem;
    font-weight: 600;
}

    .page-link:hover {
        background-color: var(--em-gray-soft);
        color: var(--em-accent);
    }

.page-item.active .page-link {
    background-color: var(--em-navy);
    border-color: var(--em-navy);
    color: #fff;
}

/* --- Accordion --- */
.accordion-item {
    border-color: var(--em-gray-border);
    border-radius: 0;
}

.accordion-button {
    font-weight: 600;
    color: var(--em-navy-deep);
    background: #fff;
    border-radius: 0 !important;
}

    .accordion-button:not(.collapsed) {
        background-color: var(--em-gray-soft);
        color: var(--em-navy);
        box-shadow: none;
    }

    .accordion-button:focus {
        box-shadow: none;
        border-color: var(--em-gray-border);
    }

/* --- Tooltips / popovers --- */
.tooltip-inner {
    background-color: var(--em-navy-deep);
    border-radius: var(--em-radius);
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
}

.popover {
    border-color: var(--em-gray-border);
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow);
}

/* --- List group --- */
.list-group-item {
    border-color: var(--em-gray-border);
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
}

    .list-group-item.active {
        background-color: var(--em-navy);
        border-color: var(--em-navy);
    }


/* ==========================================================================
   7. APPLICATION COMPONENTS
   ========================================================================== */

/* --- App shell --- */
.em-shell {
    margin-left: var(--em-sidebar-w);
    padding: 32px;
    min-height: 100vh;
}

/* --- Page header --- */
.em-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--em-gray-border);
}

.em-page-head__title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--em-navy-deep);
    margin: 0 0 4px;
}

.em-page-head__sub {
    font-size: 0.925rem;
    color: var(--em-text-muted);
    margin: 0;
}

.em-page-head__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Breadcrumb */
.em-crumbs {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--em-text-muted);
    margin-bottom: 10px;
}

    .em-crumbs a {
        color: var(--em-text-muted);
    }

        .em-crumbs a:hover {
            color: var(--em-accent);
        }

    .em-crumbs span + span::before {
        content: '/';
        margin: 0 8px;
        color: var(--em-gray-border-strong);
    }

/* --- Panel: the workhorse surface --- */
.em-panel {
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-top: 3px solid var(--em-navy);
    border-radius: var(--em-radius-lg);
    margin-bottom: 24px;
}

.em-panel--plain {
    border-top-color: var(--em-gray-border);
}

.em-panel--accent {
    border-top-color: var(--em-accent);
}

.em-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--em-gray-border);
}

.em-panel__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--em-navy);
    margin: 0;
}

    .em-panel__title i {
        color: var(--em-accent);
        font-size: 0.9rem;
    }

.em-panel__body {
    padding: 20px;
}

.em-panel__body--flush {
    padding: 0;
}

.em-panel__foot {
    padding: 14px 20px;
    border-top: 1px solid var(--em-gray-border);
    background: var(--em-gray-100);
}

/* --- KPI tile --- */
.em-kpi {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-top: 3px solid var(--em-navy);
    border-radius: var(--em-radius-lg);
    padding: 20px;
    height: 100%;
    transition: border-top-color 0.2s ease, box-shadow 0.2s ease;
}

    .em-kpi:hover {
        border-top-color: var(--em-accent);
        box-shadow: var(--em-shadow-sm);
    }

.em-kpi__glyph {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--em-gray-border);
    border-radius: var(--em-radius);
    color: var(--em-navy);
    font-size: 1rem;
    background: var(--em-gray-soft);
}

.em-kpi__body {
    min-width: 0;
}

.em-kpi__label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--em-text-muted);
    margin: 0 0 6px;
    line-height: 1.3;
}

.em-kpi__value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--em-navy-deep);
    margin: 0;
    line-height: 1.1;
}

.em-kpi__meta {
    font-size: 0.78rem;
    color: var(--em-text-muted);
    margin: 4px 0 0;
}

/* --- Institutional glyph tile (square, hairline, stroke-forward) --- */
.em-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--em-gray-border-strong);
    border-radius: var(--em-radius);
    color: var(--em-navy);
    font-size: 1.15rem;
    background: #fff;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.em-glyph--accent {
    color: var(--em-accent);
    border-color: var(--em-accent);
    background: var(--em-accent-soft);
}

.em-glyph--navy {
    background: var(--em-navy);
    border-color: var(--em-navy);
    color: #fff;
}

.em-glyph--sm { width: 34px; height: 34px; font-size: 0.85rem; }
.em-glyph--lg { width: 60px; height: 60px; font-size: 1.5rem; }

a:hover > .em-glyph,
.em-flat-panel:hover .em-glyph {
    border-color: var(--em-accent);
    color: var(--em-accent);
}

/* --- Data table wrapper (horizontal scroll on small screens) --- */
.em-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.em-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .em-table thead th {
        background: var(--em-gray-soft);
        color: var(--em-navy);
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        text-align: left;
        padding: 0.7rem 1rem;
        border-bottom: 1px solid var(--em-gray-border);
        white-space: nowrap;
    }

    .em-table tbody td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--em-gray-200);
        vertical-align: middle;
    }

    .em-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .em-table tbody tr:hover td {
        background: var(--em-gray-100);
    }

    .em-table .em-num,
    .em-table .text-end {
        text-align: right;
    }

/* --- Status pill --- */
.em-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 4px 9px;
    border-radius: var(--em-radius);
    border: 1px solid transparent;
    white-space: nowrap;
}

.em-status--ok      { background: var(--em-success-soft); color: var(--em-success); border-color: #BBF7D0; }
.em-status--pending { background: var(--em-warning-soft); color: var(--em-warning); border-color: #FDE68A; }
.em-status--danger  { background: var(--em-danger-soft);  color: var(--em-danger);  border-color: #FECACA; }
.em-status--neutral { background: var(--em-gray-soft);    color: var(--em-text-muted); border-color: var(--em-gray-border); }
.em-status--navy    { background: var(--em-info-soft);    color: var(--em-navy);    border-color: #C7D6E6; }

/* --- Empty state --- */
.em-empty {
    text-align: center;
    padding: 56px 24px;
    color: var(--em-text-muted);
}

.em-empty__glyph {
    font-size: 1.6rem;
    color: var(--em-gray-border-strong);
    margin-bottom: 14px;
}

.em-empty__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--em-navy);
    margin-bottom: 6px;
}

.em-empty__text {
    font-size: 0.9rem;
    max-width: 420px;
    margin: 0 auto 20px;
}

/* --- Definition rows (label / value pairs) --- */
.em-defs {
    margin: 0;
}

.em-def {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid var(--em-gray-200);
}

    .em-def:last-child {
        border-bottom: 0;
    }

.em-def__k {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--em-text-muted);
}

.em-def__v {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--em-navy-deep);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* --- Auth card (login / signup / invitation) --- */
.em-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--em-gray-soft);
}

/* Auth page with site chrome. .em-auth assumes it owns the viewport; these pages carry the site
   navigation and footer, so the FORM is the flex column and the card sits in the middle cell that
   takes up the slack. Every auth and invitation page previously repeated this as a page-level
   <style> block — it lives here now so there is one copy. Put .em-auth-shell on <form runat=server>
   and .em-auth-shell__body on the wrapper around the card. */
.em-auth-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--em-gray-soft);
}

.em-auth-shell__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 16px;
}

.em-auth__card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-top: 4px solid var(--em-accent);
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow);
    padding: 40px;
}

/* The branch screen and the details form need more room than a 440px login box. */
.em-auth__card--wide { max-width: 640px; }
.em-auth__card--branch { max-width: 760px; }

.em-auth__logo {
    height: 38px;
    width: auto;
    margin-bottom: 26px;
}

.em-auth__title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--em-navy-deep);
    margin-bottom: 6px;
}

.em-auth__sub {
    font-size: 0.92rem;
    color: var(--em-text-muted);
    margin-bottom: 28px;
}

/* --- Step indicator (multi-page signup / invitation flows) --- */
.em-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
}

.em-step {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--em-text-muted);
}

.em-step__dot {
    width: 26px;
    height: 26px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--em-gray-border-strong);
    border-radius: var(--em-radius);
    background: #fff;
    font-size: 0.72rem;
    color: var(--em-text-muted);
    position: relative;
    z-index: 2;
}

.em-step::before {
    content: '';
    position: absolute;
    top: 13px;
    left: 0;
    right: 50%;
    height: 1px;
    background: var(--em-gray-border);
    z-index: 1;
}

.em-step::after {
    content: '';
    position: absolute;
    top: 13px;
    left: 50%;
    right: 0;
    height: 1px;
    background: var(--em-gray-border);
    z-index: 1;
}

.em-step:first-child::before,
.em-step:last-child::after {
    display: none;
}

.em-step--done .em-step__dot {
    background: var(--em-navy);
    border-color: var(--em-navy);
    color: #fff;
}

.em-step--current .em-step__dot {
    background: var(--em-accent);
    border-color: var(--em-accent);
    color: #fff;
}

.em-step--current,
.em-step--done {
    color: var(--em-navy);
}


/* ==========================================================================
   8. MARKETING COMPONENTS
   ========================================================================== */
.em-hero {
    background: var(--em-navy);
    color: #fff;
    padding: 130px 0 100px;
    position: relative;
    overflow: hidden;
}

.em-hero__h1 {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: #fff;
    margin-bottom: 22px;
}

.em-hero__lead {
    font-size: 1.35rem;
    font-weight: 500;
    /* sits on the navy hero — lighter step */
    color: var(--em-accent-on-dark);
    margin-bottom: 18px;
    line-height: 1.4;
}

.em-hero__body {
    font-size: 1.05rem;
    color: var(--em-text-on-navy);
    max-width: 640px;
    margin-bottom: 34px;
}

/* Flat panel — RSK signature card: navy top border → orange on hover */
.em-flat-panel {
    display: block;
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-top: 4px solid var(--em-navy);
    border-radius: 0;
    padding: 32px 28px;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: border-top-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

    .em-flat-panel:hover {
        border-top-color: var(--em-accent);
        box-shadow: var(--em-shadow);
        transform: translateY(-3px);
        color: inherit;
    }

.em-flat-panel__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--em-navy-deep);
    margin: 16px 0 10px;
    letter-spacing: -0.015em;
}

.em-flat-panel:hover .em-flat-panel__title {
    color: var(--em-accent);
}

.em-flat-panel__text {
    font-size: 0.95rem;
    color: var(--em-text-muted);
    margin: 0;
}

/* Numbered vertical timeline */
.em-timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

    .em-timeline::before {
        content: '';
        position: absolute;
        left: 21px;
        top: 8px;
        bottom: 8px;
        width: 1px;
        background: var(--em-gray-border);
    }

.em-timeline__step {
    position: relative;
    display: flex;
    gap: 26px;
    margin-bottom: 38px;
}

    .em-timeline__step:last-child {
        margin-bottom: 0;
    }

.em-timeline__num {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--em-navy);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--em-radius);
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--em-gray-border);
    z-index: 2;
}

.em-timeline__step:last-child .em-timeline__num {
    background: var(--em-accent);
}

/* Shorter hero for section pages — the overview hero at full height would make five
   platform pages read like five home pages */
.em-hero--sub {
    padding: 84px 0 64px;
}

/* Product screenshot figure: hairline frame with a slim window bar, used across the
   platform pages so every screen renders the same way.

   The CLICK-TO-ENLARGE behaviour lives in the "SCREENSHOT LIGHTBOX" block above — position, cursor,
   focus ring and the magnifier badge. Keep appearance here and interaction there; the border-radius
   and overflow below are here because the badge needs the frame to clip it. */
.em-shot {
    border: 1px solid var(--em-gray-border);
    background: #fff;
    box-shadow: 0 18px 44px rgba(0, 23, 51, 0.12);
    border-radius: var(--em-radius);
    overflow: hidden;
}

.em-shot__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--em-gray-soft);
    border-bottom: 1px solid var(--em-gray-border);
}

.em-shot__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--em-gray-border-strong);
}

    .em-shot__dot:first-child {
        background: var(--em-accent);
    }

.em-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.em-shot--soft {
    box-shadow: 0 10px 26px rgba(0, 23, 51, 0.08);
}

/* Tick list for feature points */
.em-ticks {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .em-ticks li {
        position: relative;
        padding-left: 30px;
        margin-bottom: 12px;
        font-size: 0.97rem;
        color: var(--em-text-dark);
    }

        .em-ticks li:last-child {
            margin-bottom: 0;
        }

        .em-ticks li::before {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            left: 0;
            top: 3px;
            font-size: 0.78rem;
            color: var(--em-accent);
        }

        .em-ticks li strong {
            color: var(--em-navy-deep);
            font-weight: 700;
        }

.em-bg-navy .em-ticks li,
.em-bg-navy-deep .em-ticks li {
    color: var(--em-text-on-navy);
}

    .em-bg-navy .em-ticks li strong,
    .em-bg-navy-deep .em-ticks li strong {
        color: #fff;
    }

/* Horizontal step pipeline */
.em-pipeline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.em-pipeline__step {
    flex: 1 1 160px;
    border: 1px solid var(--em-gray-border);
    border-top: 3px solid var(--em-navy);
    background: #fff;
    padding: 20px 18px;
}

    .em-pipeline__step:last-child {
        background: var(--em-navy);
        border-top-color: var(--em-accent);
    }

        .em-pipeline__step:last-child .em-pipeline__label,
        .em-pipeline__step:last-child .em-pipeline__text {
            color: #fff;
        }

.em-pipeline__label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--em-accent);
    margin-bottom: 8px;
}

.em-pipeline__text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--em-navy-deep);
}

/* Compliance / disclaimer band */
.em-disclaimer {
    border: 1px solid var(--em-gray-border);
    padding: 28px 32px;
    background: #fff;
}

.em-disclaimer__title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--em-navy);
    margin-bottom: 12px;
}

.em-disclaimer__text {
    font-size: 0.88rem;
    color: var(--em-text-muted);
    text-align: justify;
    margin: 0;
}

/* Reveal-on-scroll.

   THIS FAILS SAFE, AND IT USED NOT TO. The hidden state was previously unconditional: .em-reveal was
   opacity:0 until equitymarker.js added .em-in. Every section of the marketing site below the hero
   carries .em-reveal, so any failure to run that one file — a network blip on a phone, a caching
   error, a script error thrown earlier in the bundle, a blocked request — left the entire page blank
   below the fold with no error and nothing to click. On the site's own paid traffic, which is mostly
   mobile, that is a silent total loss with no trace in any log.

   The default is now VISIBLE. The animation only arms itself once the script has run far enough to
   put .em-js on <html>, which it does as its first statement. No script, no hiding. */
.em-reveal {
    opacity: 1;
    transform: none;
}

html.em-js .em-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

    html.em-js .em-reveal.em-in {
        opacity: 1;
        transform: none;
    }

.em-delay-1 { transition-delay: 0.09s; }
.em-delay-2 { transition-delay: 0.18s; }
.em-delay-3 { transition-delay: 0.27s; }
/* -4 exists for the fifth pricing card. A missing delay class is silent — the element still
   reveals, just in lockstep with its neighbour — so add one when a row grows. */
.em-delay-4 { transition-delay: 0.36s; }


/* ==========================================================================
   8b. SITE CHROME
   Header, footer, application sidebar and section sub-navigation.
   Defined here so the user controls stay markup-only.
   ========================================================================== */

/* --------------------------------------------------------- public header */
.em-topnav {
    background: #fff;
    border-bottom: 1px solid var(--em-gray-border);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 12px rgba(0, 23, 51, 0.04);
}

.em-topnav__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.em-topnav__logo img {
    height: 42px;
    width: auto;
    display: block;
}

/* The nav wrapper must itself be a flex ROW on desktop. Left as a plain block, its two children —
   the link list and the actions group — render as two stacked rows. The collapsed-menu rules in
   the media query below still win at mobile widths: they come later in the file at equal
   specificity, so display:none / .is-open apply there unchanged. */
.em-topnav__nav {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Six links plus the actions get tight just above the collapse breakpoint */
    .em-topnav__links { gap: 18px; }
    .em-topnav__actions { gap: 12px; padding-left: 14px; }
}

.em-topnav__links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.em-topnav__link {
    display: inline-flex;
    align-items: center;
    height: 78px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--em-navy);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

    .em-topnav__link:hover,
    .em-topnav__link.active {
        color: var(--em-accent);
        border-bottom-color: var(--em-accent);
    }

.em-topnav__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    padding-left: 22px;
    border-left: 1px solid var(--em-gray-border);
}

.em-topnav__toggle {
    display: none;
    background: none;
    border: 1px solid var(--em-gray-border-strong);
    border-radius: var(--em-radius);
    width: 44px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--em-navy);
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .em-topnav__inner { min-height: 64px; }

    .em-topnav__logo img { height: 34px; }

    .em-topnav__toggle { display: inline-flex; }

    .em-topnav__nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #fff;
        border-bottom: 1px solid var(--em-gray-border);
        box-shadow: var(--em-shadow);
        padding: 10px 24px 22px;
    }

        .em-topnav__nav.is-open { display: block; }

    .em-topnav__links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .em-topnav__link {
        height: auto;
        padding: 14px 0;
        border-bottom: 1px solid var(--em-gray-200);
        border-left: 3px solid transparent;
    }

        .em-topnav__link:hover,
        .em-topnav__link.active {
            border-bottom-color: var(--em-gray-200);
            border-left-color: var(--em-accent);
            padding-left: 12px;
        }

    .em-topnav__actions {
        margin: 18px 0 0;
        padding: 0;
        border-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

        .em-topnav__actions .em-btn { width: 100%; }
}

/* --------------------------------------------------------- public footer */
.em-footer {
    background: var(--em-navy-deep);
    color: var(--em-text-on-navy);
    padding: 72px 0 28px;
    font-size: 0.92rem;
}

    .em-footer h5,
    .em-footer .em-footer__head {
        color: #fff;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.11em;
        margin-bottom: 20px;
    }

    .em-footer a {
        color: var(--em-text-on-navy);
        transition: color 0.15s ease;
    }

        .em-footer a:hover {
            /* deep-navy ground — lighter step */
            color: var(--em-accent-on-dark);
        }

    .em-footer p {
        color: var(--em-text-on-navy);
    }

.em-footer__logo {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

.em-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .em-footer__links li {
        margin-bottom: 11px;
    }

.em-footer__rule {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 46px 0 24px;
    opacity: 1;
}

.em-footer__social {
    display: flex;
    gap: 8px;
}

.em-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--em-radius);
    color: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

    .em-footer__social a:hover {
        background: var(--em-accent);
        border-color: var(--em-accent);
        color: #fff;
    }

.em-footer__legal {
    font-size: 0.82rem;
    color: #8494AC;
}

/* ---------------------------------------------------- application sidebar */
.em-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--em-sidebar-w);
    height: 100vh;
    background: var(--em-navy-deep);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform 0.25s ease;
}

.em-sidebar__brand {
    display: block;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

    .em-sidebar__brand img {
        height: 30px;
        width: auto;
        display: block;
        filter: brightness(0) invert(1);
    }

.em-sidebar__selectors {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.em-sidebar__label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7A8BA6;
    margin-bottom: 5px;
}

.em-sidebar__select {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--em-radius);
    padding: 9px 11px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

    .em-sidebar__select:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--em-accent-on-dark);
        color: #fff;
    }

    .em-sidebar__select:disabled,
    .em-sidebar__select[disabled] {
        opacity: 0.45;
        cursor: not-allowed;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .em-sidebar__select i {
        color: #7A8BA6;
        font-size: 0.7rem;
    }

    /* The selector supplies its own caret glyph — suppress Bootstrap's. */
    .em-sidebar__select.dropdown-toggle::after {
        display: none;
    }

.em-sidebar__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}

    .em-sidebar__scroll::-webkit-scrollbar { width: 6px; }
    .em-sidebar__scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }

.em-sidebar__group {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: #6B7C97;
    padding: 20px 20px 8px;
}

.em-sidebar__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #C3CDDC;
    border-left: 3px solid transparent;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

    .em-sidebar__link i {
        width: 18px;
        text-align: center;
        font-size: 0.9rem;
        color: #7A8BA6;
        transition: color 0.15s ease;
    }

    .em-sidebar__link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

        .em-sidebar__link:hover i { color: var(--em-accent-on-dark); }

    .em-sidebar__link.active {
        color: #fff;
        font-weight: 600;
        background: rgba(92, 168, 255, 0.14);
        border-left-color: var(--em-accent-on-dark);
    }

        .em-sidebar__link.active i { color: var(--em-accent-on-dark); }

.em-sidebar__chevron {
    margin-left: auto;
    font-size: 0.68rem;
    transition: transform 0.2s ease;
}

.em-sidebar__link:not(.collapsed) .em-sidebar__chevron {
    transform: rotate(180deg);
}

.em-sidebar__submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.18);
}

    .em-sidebar__submenu .em-sidebar__link {
        padding-left: 52px;
        font-size: 0.83rem;
        padding-top: 7px;
        padding-bottom: 7px;
    }

.em-sidebar__foot {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 0;
}

.em-sidebar__link--danger {
    color: #F0A9A9;
}

    .em-sidebar__link--danger i { color: #F0A9A9; }

    .em-sidebar__link--danger:hover {
        color: #fff;
        background: rgba(185, 28, 28, 0.25);
    }

/* Mobile drawer */
.em-navtoggle {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1050;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--em-navy);
    border: 1px solid var(--em-gray-border-strong);
    border-radius: var(--em-radius);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--em-shadow-sm);
}

.em-navscrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 23, 51, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1035;
    display: none;
}

    .em-navscrim.show { display: block; }

@media (max-width: 991.98px) {
    .em-sidebar { transform: translateX(-100%); }

        .em-sidebar.mobile-open { transform: translateX(0); }

    .em-navtoggle { display: inline-flex; }

    body.em-nav-open { overflow: hidden; }
}

/* ------------------------------------------------- section sub-navigation */
.em-subnav {
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-radius: var(--em-radius-lg);
    margin-bottom: 26px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .em-subnav::-webkit-scrollbar { display: none; }

.em-subnav__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0 4px;
    list-style: none;
}

.em-subnav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--em-text-muted);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

    .em-subnav__link i {
        font-size: 0.85rem;
        opacity: 0.75;
    }

    .em-subnav__link:hover {
        color: var(--em-navy);
    }

        .em-subnav__link:hover i { opacity: 1; }

    .em-subnav__link.active {
        color: var(--em-navy);
        border-bottom-color: var(--em-accent);
    }

        .em-subnav__link.active i {
            color: var(--em-accent);
            opacity: 1;
        }


/* ==========================================================================
   9. LEGACY COMPATIBILITY LAYER
   Restyles the class names already used by pages that have not yet been
   migrated, so the whole app stays visually coherent during a staged rollout.
   Remove a block once every page using it has been converted.
   ========================================================================== */

/* Old dashboard shell.
   Scoped to a sibling sidebar on purpose: six auth pages (website_login,
   website_investor_login, invitation_accept_login, ...) reuse the same
   .main-content class as a flex centering wrapper with no sidebar, and must
   not be given a left offset. */
.em-sidebar ~ .main-content {
    margin-left: var(--em-sidebar-w);
    padding: 32px;
}

/* Old KPI card */
.kpi-card {
    background: #fff;
    border: 1px solid var(--em-gray-border) !important;
    border-top: 3px solid var(--em-navy) !important;
    border-radius: var(--em-radius-lg) !important;
    box-shadow: none !important;
    padding: 20px !important;
    transition: border-top-color 0.2s ease, box-shadow 0.2s ease;
}

    .kpi-card:hover {
        transform: none !important;
        border-top-color: var(--em-accent) !important;
        box-shadow: var(--em-shadow-sm) !important;
    }

.kpi-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: var(--em-radius) !important;
    border: 1px solid var(--em-gray-border);
    background: var(--em-gray-soft) !important;
    color: var(--em-navy) !important;
    font-size: 1rem !important;
    margin-right: 1rem !important;
}

/* Neutralise the old pastel icon tints into the institutional palette */
.icon-blue, .icon-green, .icon-purple, .icon-orange {
    background-color: var(--em-gray-soft) !important;
    color: var(--em-navy) !important;
}

.icon-orange {
    color: var(--em-accent) !important;
    background-color: var(--em-accent-soft) !important;
}

.kpi-details h6 {
    font-size: 0.68rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em !important;
    color: var(--em-text-muted) !important;
    margin-bottom: 6px !important;
}

.kpi-details h3 {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    color: var(--em-navy-deep) !important;
    font-variant-numeric: tabular-nums;
}

/* Old content card */
.content-card {
    background: #fff;
    border: 1px solid var(--em-gray-border) !important;
    border-top: 3px solid var(--em-navy) !important;
    border-radius: var(--em-radius-lg) !important;
    box-shadow: none !important;
    padding: 20px !important;
}

.content-card-title {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--em-navy) !important;
    padding-bottom: 14px;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--em-gray-border);
}

    .content-card-title i {
        color: var(--em-accent);
    }

/* Page titles inside the application shell */
.em-sidebar ~ .main-content h2,
.em-shell h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--em-navy-deep);
}

.em-sidebar ~ .main-content h5,
.em-shell h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--em-navy);
}

/* Stat tiles used across the ledger pages */
.card-stat,
.form-card {
    border: 1px solid var(--em-gray-border) !important;
    border-top: 3px solid var(--em-navy) !important;
    border-radius: var(--em-radius-lg) !important;
    box-shadow: none !important;
    background: #fff;
    transition: border-top-color 0.2s ease, box-shadow 0.2s ease;
}

    .card-stat:hover {
        transform: none !important;
        border-top-color: var(--em-accent) !important;
        box-shadow: var(--em-shadow-sm) !important;
    }

.stat-label {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.09em !important;
    color: var(--em-text-muted) !important;
}

.stat-value {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    color: var(--em-navy-deep) !important;
    font-variant-numeric: tabular-nums;
}

.stat-sub {
    font-size: 0.78rem !important;
    color: var(--em-text-muted) !important;
}

/* Ledger table shell */
.ledger-table {
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-top: 3px solid var(--em-navy);
    border-radius: var(--em-radius-lg) !important;
    box-shadow: none !important;
    overflow: hidden;
}

    .ledger-table th {
        background-color: var(--em-gray-soft) !important;
        color: var(--em-navy) !important;
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em;
        padding: 0.7rem 1rem !important;
    }

    .ledger-table td {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }

/* Section / card headers */
.card-header-custom,
.section-header {
    background-color: var(--em-gray-soft) !important;
    border-bottom: 1px solid var(--em-gray-border) !important;
    color: var(--em-navy) !important;
    font-weight: 700;
}

/* Label / value read-only rows */
.view-data-row {
    border-bottom: 1px solid var(--em-gray-200) !important;
}

.view-data-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.07em !important;
    color: var(--em-text-muted) !important;
}

.view-data-value {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: var(--em-navy-deep) !important;
}

/* Row action links */
.action-link {
    color: var(--em-navy) !important;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

    .action-link:hover {
        color: var(--em-accent) !important;
    }

.btn-soft,
.btn-action {
    border-radius: var(--em-radius) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Status chips */
.status-badge {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--em-radius) !important;
    padding: 0.35em 0.6em !important;
}

.status-pending {
    background: var(--em-warning-soft) !important;
    color: var(--em-warning) !important;
}

.filter-bar {
    background: #fff;
    border: 1px solid var(--em-gray-border) !important;
    border-radius: var(--em-radius-lg) !important;
    box-shadow: none !important;
}

.doc-icon {
    color: var(--em-navy) !important;
}

/* Old marketing classes on website_home */
.hero-section {
    background: var(--em-navy) !important;
    color: #fff;
}

    .hero-section h1,
    .hero-section .display-4 {
        color: #fff !important;
        font-weight: 800;
        letter-spacing: -0.035em;
    }

    .hero-section .lead {
        color: var(--em-text-on-navy) !important;
    }

    .hero-section.text-dark h1,
    .hero-section h1.text-dark {
        color: #fff !important;
    }

.card-feature {
    border: 1px solid var(--em-gray-border) !important;
    border-top: 4px solid var(--em-navy) !important;
    border-radius: 0 !important;
    transition: border-top-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

    .card-feature:hover {
        border-top-color: var(--em-accent) !important;
        box-shadow: var(--em-shadow) !important;
        transform: translateY(-3px);
    }

.feature-icon {
    color: var(--em-accent) !important;
    font-size: 1.5rem !important;
}

.footer {
    background-color: var(--em-navy-deep) !important;
    color: var(--em-text-on-navy) !important;
}

    .footer h5 {
        color: #fff !important;
        font-size: 0.78rem !important;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    .footer a {
        color: var(--em-text-on-navy);
    }

        .footer a:hover {
            color: var(--em-accent);
        }

/* Old auth shell (login / investor login / OTP / invitation accept).
   These pages share one markup skeleton, so restyling the legacy class names
   converts all of them at once. */
.login-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 0 15px;
}

.login-card {
    background: #fff;
    border: 1px solid var(--em-gray-border) !important;
    border-top: 4px solid var(--em-accent) !important;
    border-radius: var(--em-radius-lg) !important;
    box-shadow: var(--em-shadow) !important;
    padding: 38px 34px !important;
}

.header-text {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    color: var(--em-navy-deep) !important;
    margin-bottom: 1.25rem !important;
}

.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--em-accent) !important;
    border: 2px solid var(--em-accent) !important;
    color: #fff !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em !important;
    border-radius: var(--em-radius) !important;
    padding: 13px 28px !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

    .btn-brand:hover {
        background-color: var(--em-accent-hover) !important;
        border-color: var(--em-accent-hover) !important;
        color: #fff !important;
        transform: none !important;
        box-shadow: 0 6px 16px rgba(13, 102, 232, 0.28) !important;
    }

/* Signup / invitation wizard card — same treatment as the login card */
.signup-card {
    background: #fff;
    border: 1px solid var(--em-gray-border) !important;
    border-top: 4px solid var(--em-accent) !important;
    border-radius: var(--em-radius-lg) !important;
    box-shadow: var(--em-shadow) !important;
    padding: 38px 34px !important;
}

.sub-header-text {
    color: var(--em-text-muted) !important;
    font-size: 0.95rem !important;
}

/* Wizard step indicator — squared off to match the rest of the system */
.step-circle {
    border-radius: var(--em-radius) !important;
    border: 1px solid var(--em-gray-border-strong) !important;
    color: var(--em-text-muted) !important;
    font-weight: 700;
}

.step.active .step-circle,
.step.completed .step-circle {
    background-color: var(--em-accent) !important;
    border-color: var(--em-accent) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.step.completed .step-circle {
    background-color: var(--em-navy) !important;
    border-color: var(--em-navy) !important;
}

.step-label {
    font-size: 0.66rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.step.active .step-label {
    color: var(--em-navy) !important;
}

/* Choice cards (e.g. "company or investor?") */
.card-option {
    border: 1px solid var(--em-gray-border) !important;
    border-top: 4px solid var(--em-navy) !important;
    border-radius: 0 !important;
    padding: 2.5rem 2rem !important;
    transition: border-top-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

    .card-option:hover {
        border-top-color: var(--em-accent) !important;
        box-shadow: var(--em-shadow) !important;
        transform: translateY(-3px);
    }

.card-icon {
    font-size: 2.2rem !important;
    color: var(--em-navy) !important;
    margin-bottom: 1.1rem !important;
}

.card-option:hover .card-icon {
    color: var(--em-accent) !important;
}

/* Informational callout */
.info-box {
    background-color: var(--em-gray-soft) !important;
    border: 1px solid var(--em-gray-border) !important;
    border-left: 3px solid var(--em-navy) !important;
    border-radius: var(--em-radius) !important;
    color: var(--em-text-dark) !important;
}

.divider-text {
    color: var(--em-text-muted) !important;
    letter-spacing: 0.09em !important;
    font-weight: 700 !important;
}

.success-icon {
    color: var(--em-success) !important;
}

/* One-time-code field */
.code-input {
    text-align: center;
    font-size: 1.6rem !important;
    font-weight: 700;
    letter-spacing: 0.5em !important;
    text-indent: 0.5em; /* keeps the glyphs optically centred despite tracking */
    padding: 0.7rem 0.5rem !important;
    font-variant-numeric: tabular-nums;
}

/* The legacy pages force a blue focus ring with !important; override it. */
.login-card .form-control:focus,
.form-control:focus {
    border-color: var(--em-navy) !important;
    background-color: #fff !important;
    color: var(--em-text-dark) !important;
    box-shadow: 0 0 0 3px rgba(0, 40, 85, 0.10) !important;
}

/* Old brand button */
.btn-primary-brand {
    background-color: var(--em-accent) !important;
    color: #fff !important;
    border: 2px solid var(--em-accent) !important;
    border-radius: var(--em-radius) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 11px 24px !important;
}

    .btn-primary-brand:hover {
        background-color: var(--em-accent-hover) !important;
        border-color: var(--em-accent-hover) !important;
        color: #fff !important;
    }


/* ==========================================================================
   10. BUSY / DOUBLE-CLICK STATE
   Applied by assets/js/equitymarker.js. Deliberately does NOT use the
   `disabled` attribute — that would strip the control from the WebForms
   postback payload and kill the server-side Click event.
   ========================================================================== */
.em-busy {
    pointer-events: none !important;
    cursor: progress !important;
    opacity: 0.6;
    position: relative;
    user-select: none;
}

/* Spinner on locked submit controls that are wide enough to show one */
.em-busy.em-busy--spin::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 13px;
    height: 13px;
    margin-top: -7px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: em-spin 0.65s linear infinite;
    opacity: 0.9;
}

@keyframes em-spin {
    to { transform: rotate(360deg); }
}

/* Whole-page submitting affordance */
body.em-submitting {
    cursor: progress;
}

.em-progress-top {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--em-accent);
    z-index: 2147483647;
    transition: width 0.35s ease;
    pointer-events: none;
}

body.em-submitting .em-progress-top {
    width: 82%;
    transition: width 8s cubic-bezier(0.1, 0.6, 0.2, 1);
}


/* ==========================================================================
   11. UTILITIES
   ========================================================================== */
.em-hairline-t { border-top: 1px solid var(--em-gray-border); }
.em-hairline-b { border-bottom: 1px solid var(--em-gray-border); }

.em-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.72rem;
}

.em-accent { color: var(--em-accent) !important; }
.em-navy   { color: var(--em-navy) !important; }

.em-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .em-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991.98px) {
    /* Sidebar collapses to an off-canvas drawer; content goes full width. */
    .em-shell,
    .em-sidebar ~ .main-content {
        margin-left: 0;
        padding: 20px 16px;
        padding-top: 72px; /* clear the fixed mobile toggle */
    }

    .em-hero {
        padding: 80px 0 64px;
    }

    .em-hero__h1 { font-size: 2.5rem; }
    .em-hero__lead { font-size: 1.15rem; }

    .em-h2 { font-size: 2rem; }

    .em-section { padding: 64px 0; }

    .em-grid-3,
    .em-grid-4 { grid-template-columns: repeat(2, 1fr); }

    .em-split,
    .em-grid-2 {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .em-page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .em-page-head__actions {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .em-grid-2,
    .em-grid-3,
    .em-grid-4 { grid-template-columns: 1fr; }

    .em-hero__h1 { font-size: 2.05rem; }

    .em-h2 { font-size: 1.7rem; }

    .em-pull-quote { font-size: 1.25rem; }

    .em-section { padding: 48px 0; }

    .em-panel__body,
    .em-panel__head { padding: 16px; }

    .em-auth__card { padding: 28px 22px; }

    .em-page-head__title { font-size: 1.3rem; }

    /* Tables must never blow out the viewport. The wrapper's own overflow-x
       does the work — do not try to full-bleed it with negative margins, which
       overshoots once the wrapper is nested inside a bordered panel. */
    .em-table-wrap,
    .table-responsive {
        max-width: 100%;
    }

    .em-table,
    .table {
        font-size: 0.82rem;
    }

        .em-table thead th,
        .table thead th,
        .em-table tbody td,
        .table tbody td {
            padding: 0.6rem 0.7rem;
        }

    .em-btn-group { width: 100%; }

    .em-btn-group > .em-btn,
    .em-page-head__actions > .em-btn,
    .em-page-head__actions > .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .em-steps { gap: 0; }

    .em-step { font-size: 0.58rem; }

    .em-timeline__step { gap: 16px; }

    .em-timeline::before { left: 17px; }

    .em-timeline__num { width: 36px; height: 36px; font-size: 0.85rem; }
}

@media (max-width: 575.98px) {
    .em-container { padding: 0 16px; }

    .em-kpi { padding: 16px; gap: 12px; }

    .em-kpi__value { font-size: 1.25rem; }

    .em-disclaimer { padding: 20px; }

    .em-disclaimer__text { text-align: left; }
}


/* ==========================================================================
   13. MOTION & PRINT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .em-reveal {
        opacity: 1;
        transform: none;
    }
}


/* ==========================================================================
   DESIGN PARTNER LOGO STRIP
   Home page, directly under the hero. Quiet by design: a logo row that shouts
   competes with the headline it is meant to support, and over-styling a short
   list makes a short list more obvious, not less.
   ========================================================================== */
.em-partners__band {
    background: #fff;
    border-top: 1px solid var(--em-gray-border);
    border-bottom: 1px solid var(--em-gray-border);
    padding-top: 44px;
    padding-bottom: 44px;
}

.em-partners__head {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--em-text-muted);
    margin: 0 0 22px;
}

.em-partners {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px 56px;
}

    /* Greyscale at rest, colour on hover. Mixed brand palettes side by side read
       as clutter; one tone reads as a set. It also neutralises the white boxes on
       the three logos that have no transparency.

       NO height HERE — it is set per logo inline from website_home.aspx.cs, because
       these marks range from 5.23:1 to 2.03:1 and one shared height makes the
       compact ones look half the size of the long ones. */
    .em-partners img {
        width: auto;
        object-fit: contain;
        filter: grayscale(1);
        opacity: 0.62;
        transition: filter 0.2s ease, opacity 0.2s ease;
    }

        .em-partners img:hover {
            filter: none;
            opacity: 1;
        }

.em-partners__note {
    text-align: center;
    font-size: 0.74rem;
    color: var(--em-text-muted);
    margin: 22px auto 0;
    max-width: 620px;
    line-height: 1.55;
}

/* Testimonial cards. Unused until the quotes are real — see website_home.aspx. */
.em-quote {
    background: #fff;
    border: 1px solid var(--em-gray-border);
    border-top: 3px solid var(--em-accent);
    padding: 28px 26px 22px;
    margin: 0;
}

.em-quote__text {
    margin: 0 0 18px;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--em-navy-deep);
}

    .em-quote__text::before { content: '\201C'; }
    .em-quote__text::after  { content: '\201D'; }

.em-quote__by {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.em-quote__name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--em-navy-deep);
}

.em-quote__role {
    font-size: 0.78rem;
    color: var(--em-text-muted);
}

/* Phones. Scaled proportionally rather than to a flat height so the per-logo
   balance set in the code-behind survives — 78% of each inline height. */
@media (max-width: 575px) {
    .em-partners { gap: 22px 30px; }
    .em-partners img { transform: scale(0.78); transform-origin: center; margin: -6px -12px; }
}

@media print {
    .dashboard-nav,
    .em-sidebar,
    .mobile-toggle-btn,
    .em-page-head__actions,
    .footer,
    .em-progress-top {
        display: none !important;
    }

    .em-shell,
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .em-panel,
    .content-card,
    .em-kpi,
    .kpi-card {
        border: 1px solid #999 !important;
        break-inside: avoid;
    }

    body {
        background: #fff !important;
    }
}
