/* ===== Forge Strategy Lab - Craft Theme Overrides ===== */
/* The full Keenthemes Craft theme is loaded from CDN (plugins.bundle + style.bundle).
   This file contains only Forge Strategy Lab-specific customisations. */

/* KeenIcons fonts - self-hosted because the Keenthemes preview CDN blocks
   font requests cross-origin (CORS). These @font-face rules override the
   ones in style.bundle.css by virtue of being declared later. */
@font-face {
    font-family: 'keenicons-outline';
    src: url('/assets/plugins/keenicons/keenicons-outline.woff') format('woff'),
         url('/assets/plugins/keenicons/keenicons-outline.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'keenicons-duotone';
    src: url('/assets/plugins/keenicons/keenicons-duotone.woff') format('woff'),
         url('/assets/plugins/keenicons/keenicons-duotone.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'keenicons-solid';
    src: url('/assets/plugins/keenicons/keenicons-solid.woff') format('woff'),
         url('/assets/plugins/keenicons/keenicons-solid.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --craft-gold: #D4A843;
    /* Lift "black" across the app to gray-700. Bootstrap's body color,
       .card-title, .fw-bold, and any utility that resolves to gray-900
       all read at the lighter gray-700 shade. Pair with the 30/05/2026
       text-gray-900 sweep: classes gone AND the underlying variable now
       lifted, so nothing in the cascade stays near-black. */
    --bs-gray-900: var(--bs-gray-700);
    /* Craft sets --bs-body-color / --bs-card-color / --bs-table-color
       to a deep navy (#071437) directly, NOT via gray-900. Without
       overriding these three the cascade hits the navy for any cell
       with `color: inherit` (table cells, card bodies). 30/05/2026. */
    --bs-body-color: var(--bs-gray-700);
    --bs-card-color: var(--bs-gray-700);
    --bs-table-color: var(--bs-gray-700);
    /* Page surface tone - visibly grey so white cards lift off it.
       Bootstrap's default gray-100 (#f8f9fa) is so close to white that
       the contrast between page and cards vanishes, and any spot where
       main-content's bg doesn't fully extend looks like a "the page
       went white" bug. Defined as its own semantic var so gray-100
       elsewhere (chip backgrounds, hover states, etc.) stays subtle. */
    --gsl-page-bg: #eef0f5;
}

/* Sitewide root font-size. The Craft bundle pins
   `html { font-size: 13px !important; }`, which makes every fs-* utility
   and component default render ~19% smaller than a stock Bootstrap site.
   We override with !important so the root resolves against the browser
   default (16px on most setups) rather than Craft's 13px clamp. Result:
   every fs-* utility / menu / card body scales up uniformly without
   per-component tweaking. */
html {
    font-size: 100% !important;
}

/* Page surface - apply to html and body so any gap not covered by
   .main-content's bg still picks up the right tone. */
html, body {
    background-color: var(--gsl-page-bg);
}

/* Bootstrap 5.3 utility, missing from the Craft CDN bundle. Required for
   .text-truncate to engage inside flex containers (without min-width:0 on
   the flex child, the child defaults to its content width and never
   shrinks, so long names blow out card boundaries). */
.min-w-0 { min-width: 0 !important; }

/* Sidebar */
.sidebar {
    width: 274px;
    height: 100vh;
    background: #1E2129;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    transition: width 0.3s;
    /* Flex column so the brand pins to the top, the nav takes the remaining
       space and scrolls internally, and .sidebar-footer hugs the bottom and
       stays visible no matter how long the nav is. */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* WebKit/Blink: thin Craft-style scrollbar. Track is invisible, thumb is a
   subtle translucent pill that brightens on hover. Matches Craft's aside
   scroll treatment. Lives on .sidebar-nav now that the nav is the scroll
   container (the sidebar itself no longer scrolls). */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sidebar-brand .brand-icon,
.sidebar-brand .brand-icon i {
    width: 38px;
    height: 38px;
    background: var(--bs-primary);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff !important;
    font-weight: 700;
}

/* Logo-image variant: the brand logo carries its own colours on a
   transparent background, so it sits on the dark sidebar directly, no
   blue tile behind it. */
.sidebar-brand .brand-icon-logo {
    background: transparent;
    border-radius: 0;
}

.sidebar-brand .brand-icon-logo img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.sidebar-brand h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;          /* allow this flex child to shrink so it can scroll */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Version footer: always hugs the bottom of the sidebar, below the scrolling
   nav. Moved here from the topbar version badge. */
.sidebar-footer {
    flex-shrink: 0;
    padding: 12px 20px 14px;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.sidebar-footer a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
}
.sidebar-footer a:hover {
    color: rgba(255,255,255,0.8);
}

.sidebar-nav .nav-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 10px 8px;
    margin-top: 8px;
}

/* Collapsible sections via <details>/<summary>. Strip the native marker,
   keep the existing .nav-label look on <summary>, and add a rotating
   chevron that points down when open, right when closed. */
.sidebar-nav .nav-section { margin: 0; }
.sidebar-nav .nav-section > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
    border-radius: 0.475rem;
    transition: color 0.15s, background 0.15s;
}
.sidebar-nav .nav-section > summary::-webkit-details-marker { display: none; }
.sidebar-nav .nav-section > summary::marker { content: ''; }
.sidebar-nav .nav-section > summary:hover { color: rgba(255,255,255,0.7); }
.sidebar-nav .nav-section > summary .nav-chev {
    font-size: 13px;
    opacity: 0.5;
    transition: transform 0.18s ease;
    transform: rotate(-90deg); /* closed: pointing right */
}
.sidebar-nav .nav-section[open] > summary .nav-chev {
    transform: rotate(0deg); /* open: pointing down */
    opacity: 0.85;
}
.sidebar-nav .nav-section > .nav-items {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 220ms ease;
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-nav .nav-section > .nav-items { transition: none; }
    .sidebar-nav .nav-section > summary .nav-chev { transition: none; }
}

/* The four lifecycle-stage headings (1. Strategies and Portfolios ... 4. Go Live) wear the brand
   blue (same as an active nav link) to mark the strategy spine, while the
   ancillary section headings stay muted grey. Higher specificity than the
   base .nav-label / hover rules, and placed after them, so blue wins. */
.sidebar-nav .nav-section-stage > summary { color: var(--bs-primary); }
.sidebar-nav .nav-section-stage > summary:hover { color: var(--bs-primary); opacity: 0.85; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 0.475rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.sidebar-nav a.active {
    background: rgba(0, 163, 255, 0.1);
    color: var(--bs-primary);
}

.sidebar-nav a i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    opacity: 0.7;
}

.sidebar-nav a.active i { opacity: 1; }

/* Notification badge on a sidebar nav item. Used by the support-ticket
   counter (sidebar.php stamps a 'badge' field on matching items). Pushed
   to the right edge of the row via margin-left:auto so it sits opposite
   the icon regardless of label length. Solid red because the badge means
   "your attention is required", not informational. */
.sidebar-nav a .nav-badge {
    margin-left: auto;
    background: var(--bs-danger, #DC2626);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    padding: 1px 7px;
    border-radius: 9px;
    min-width: 18px;
    text-align: center;
}

/* Main content - override: Craft JS doesn't apply body-bg to our custom
   layout. Uses --gsl-page-bg (a visibly grey tone) so white cards lift
   off; html/body share the same var so any gap stays consistent. */
.main-content {
    margin-left: 265px;
    min-height: 100vh;
    background-color: var(--gsl-page-bg);
}

/* One header height for the top bar AND the sidebar logo block, so their
   bottom rules meet in one line across the app (Mike, 29/09/2026). Desktop
   only: below lg the sidebar is off-canvas and the top bar may wrap. */
:root { --gsl-topbar-h: 76px; }
@media (min-width: 992px) {
    .topbar { height: var(--gsl-topbar-h); padding-top: 0 !important; padding-bottom: 0 !important; }
    .sidebar-brand { height: var(--gsl-topbar-h); padding-top: 0 !important; padding-bottom: 0 !important; }
}

/* Top header bar */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--bs-gray-200);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bs-gray-900);
}

/* One gap value drives the whole right cluster so the spacing reads evenly:
   AI meter <-> icon buttons <-> user menu are all the same distance apart.
   .topbar-badges and .topbar-right must match, otherwise the icon-to-user gap
   (was 16px) looks wider than the meter-to-icon gap (was 8px). */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Topbar notification count badge (the corner dot on the support / queue icon
   buttons). The sitewide `.badge { padding: 6px 10px }` override in this file
   loads after style.bundle.css and would otherwise beat Craft's
   `.badge-circle { padding: 0 }`, inflating the dot into an oval. Scope under
   .topbar to win on specificity and pin it to a tidy ~18px circle. */
.topbar .badge.badge-circle {
    width: 1.15rem;
    height: 1.15rem;
    min-width: 1.15rem;
    padding: 0;
    font-size: .68rem;
    line-height: 1;
}

/* User dropdown in topbar */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--bs-gray-200);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--bs-gray-700);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.topbar-user-btn:hover,
.topbar-user-btn.show {
    background: var(--bs-gray-100);
    border-color: var(--bs-gray-300);
    color: var(--bs-gray-900);
}
.topbar-user-btn::after {
    font-size: 10px;
    vertical-align: middle;
}
.topbar-user-avatar i {
    font-size: 20px;
    color: var(--bs-primary);
}
.topbar-user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Upgrade sparkle (Mike 13/10/2026): the Upgrade Plan item in the user menu is
   the one offer there, so it wears gold and moves. Markup:
   templates/partials/upgrade-menu-item.php. Layers, back to front: a warm wash
   and a light sweep (::after), rising embers (.gsl-upgrade-dust i), popping
   glints (.gsl-upgrade-dust b), mouse-trail sparks (.gsl-upgrade-spark, added
   by the partial's script), then the star and the shimmering gold text. Every
   animation sits in the no-preference block: reduced motion keeps the static
   gold and hides the dust. A closed menu is display:none, so nothing runs. */
.gsl-upgrade-link {
    --gsl-gold-1: #92400e;              /* deep amber: 6.6:1 on the wash */
    --gsl-gold-2: #c2410c;              /* orange: 4.8:1, so the resting word reads */
    --gsl-gold-3: #f59e0b;              /* the highlight that sweeps across */
    --gsl-gold-rgb: 245, 158, 11;
    --gsl-gold-sheen: rgba(255, 240, 200, 0.75);
    /* Craft's hover rule paints these vars: point them at gold, not grey. */
    --bs-menu-link-bg-color-hover: rgba(var(--gsl-gold-rgb), 0.16);
    --bs-menu-link-color-hover: var(--gsl-gold-1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: rgba(var(--gsl-gold-rgb), 0.09);
    box-shadow: inset 0 0 0 1px rgba(var(--gsl-gold-rgb), 0.3);
}
.gsl-upgrade-link:hover {
    box-shadow: inset 0 0 0 1px rgba(var(--gsl-gold-rgb), 0.55), 0 0 18px -4px rgba(var(--gsl-gold-rgb), 0.6);
}
/* Craft zeroes the menu-link outline, so keyboard focus gets a gold ring of its own. */
.gsl-upgrade-link:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(var(--gsl-gold-rgb), 0.9), 0 0 18px -4px rgba(var(--gsl-gold-rgb), 0.6);
}
.gsl-upgrade-link > .menu-icon,
.gsl-upgrade-link > .menu-title { position: relative; z-index: 2; }
.gsl-upgrade-text { font-weight: 700; color: var(--gsl-gold-1); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    /* Gold text: a 300% gradient that repeats seamlessly, so the sweep can loop. */
    .gsl-upgrade-text {
        background-image: linear-gradient(100deg, var(--gsl-gold-2) 0%, var(--gsl-gold-1) 16%, var(--gsl-gold-2) 33%, var(--gsl-gold-3) 50%, var(--gsl-gold-2) 67%, var(--gsl-gold-1) 84%, var(--gsl-gold-2) 100%);
        background-size: 300% 100%;
        background-position: 100% 0;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
.gsl-upgrade-star svg {
    overflow: visible;
    filter: drop-shadow(0 0 3px rgba(var(--gsl-gold-rgb), 0.7));
}
.gsl-upgrade-star path,
.gsl-upgrade-star circle { transform-box: fill-box; transform-origin: center; }
.gsl-upgrade-dust {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.gsl-upgrade-dust i {
    position: absolute;
    bottom: -4px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: radial-gradient(circle, #fff3c4 0%, #fbbf24 45%, #f59e0b 100%);
    box-shadow: 0 0 8px 2px rgba(251, 191, 36, 0.6);
    opacity: 0;
}
.gsl-upgrade-dust i:nth-of-type(1)  { --x: 5%;  --s: 4px; --t: 2.8s; --d: -0.4s; --dx: 5px; }
.gsl-upgrade-dust i:nth-of-type(2)  { --x: 13%; --s: 3px; --t: 3.4s; --d: -1.9s; --dx: -4px; }
.gsl-upgrade-dust i:nth-of-type(3)  { --x: 21%; --s: 5px; --t: 3.0s; --d: -1.1s; --dx: 7px; }
.gsl-upgrade-dust i:nth-of-type(4)  { --x: 30%; --s: 3px; --t: 2.6s; --d: -2.3s; --dx: -6px; }
.gsl-upgrade-dust i:nth-of-type(5)  { --x: 38%; --s: 4px; --t: 3.6s; --d: -0.7s; --dx: 4px; }
.gsl-upgrade-dust i:nth-of-type(6)  { --x: 47%; --s: 3px; --t: 2.9s; --d: -2.8s; --dx: -3px; }
.gsl-upgrade-dust i:nth-of-type(7)  { --x: 55%; --s: 5px; --t: 3.3s; --d: -1.5s; --dx: 6px; }
.gsl-upgrade-dust i:nth-of-type(8)  { --x: 63%; --s: 4px; --t: 2.7s; --d: -0.2s; --dx: -5px; }
.gsl-upgrade-dust i:nth-of-type(9)  { --x: 71%; --s: 3px; --t: 3.5s; --d: -2.1s; --dx: 3px; }
.gsl-upgrade-dust i:nth-of-type(10) { --x: 79%; --s: 5px; --t: 3.1s; --d: -1.3s; --dx: -7px; }
.gsl-upgrade-dust i:nth-of-type(11) { --x: 87%; --s: 4px; --t: 2.8s; --d: -2.6s; --dx: 5px; }
.gsl-upgrade-dust i:nth-of-type(12) { --x: 94%; --s: 3px; --t: 3.2s; --d: -0.9s; --dx: -4px; }
/* Glints: four-point stars that pop and spin in the empty space beside the text. */
.gsl-upgrade-dust b {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    background: linear-gradient(135deg, #fffbeb, #fbbf24 50%, #f97316);
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    opacity: 0;
}
.gsl-upgrade-dust b:nth-of-type(1) { --x: 66%; --y: 16%; --s: 13px; --t: 2.4s; --d: -0.3s; }
.gsl-upgrade-dust b:nth-of-type(2) { --x: 86%; --y: 50%; --s: 11px; --t: 2.9s; --d: -1.6s; }
.gsl-upgrade-dust b:nth-of-type(3) { --x: 76%; --y: 60%; --s: 8px;  --t: 3.3s; --d: -2.4s; }
.gsl-upgrade-dust b:nth-of-type(4) { --x: 93%; --y: 10%; --s: 8px;  --t: 2.6s; --d: -0.9s; }
.gsl-upgrade-spark {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
    background: linear-gradient(135deg, #fffbeb, #fbbf24 50%, #f97316);
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    animation: gslUpgradeSpark .9s ease-out forwards;
}
[data-bs-theme=dark] .gsl-upgrade-link {
    --gsl-gold-1: #f59e0b;
    --gsl-gold-2: #fb923c;
    --gsl-gold-3: #fef3c7;
    --gsl-gold-sheen: rgba(255, 236, 179, 0.22);
    --bs-menu-link-bg-color-hover: rgba(var(--gsl-gold-rgb), 0.18);
    background-color: rgba(var(--gsl-gold-rgb), 0.1);
}
@media (prefers-reduced-motion: no-preference) {
    .gsl-upgrade-star svg { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
    .gsl-upgrade-link:hover .gsl-upgrade-star svg { transform: rotate(90deg) scale(1.15); }
    .gsl-upgrade-text { animation: gslUpgradeShine 4s ease-in-out infinite; }
    .gsl-upgrade-link::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 45%;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(100deg, transparent, var(--gsl-gold-sheen), transparent);
        transform: translateX(-120%) skewX(-20deg);
        animation: gslUpgradeSheen 4s ease-in-out infinite;
    }
    .gsl-upgrade-star-a { animation: gslUpgradeTwinkle 2.4s ease-in-out infinite; }
    .gsl-upgrade-star-b { animation: gslUpgradeTwinkle 2.4s ease-in-out -1.2s infinite; }
    .gsl-upgrade-star-c { animation: gslUpgradeTwinkle 1.8s ease-in-out -0.6s infinite; }
    .gsl-upgrade-dust i { animation: gslUpgradeEmber var(--t) ease-out var(--d) infinite; }
    .gsl-upgrade-dust b { animation: gslUpgradeGlint var(--t) ease-in-out var(--d) infinite; }
}
@media (prefers-reduced-motion: reduce) {
    .gsl-upgrade-dust { display: none; }
}
@keyframes gslUpgradeShine { 0% { background-position: 100% 0; } 45%, 100% { background-position: 0% 0; } }
@keyframes gslUpgradeSheen { 0% { transform: translateX(-120%) skewX(-20deg); } 45%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes gslUpgradeTwinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(0.6) rotate(45deg); opacity: 0.75; }
}
@keyframes gslUpgradeEmber {
    0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
    15% { opacity: 1; }
    65% { opacity: 0.85; }
    100% { transform: translate(var(--dx), -44px) scale(1); opacity: 0; }
}
@keyframes gslUpgradeGlint {
    0%, 55%, 100% { transform: scale(0) rotate(0deg); opacity: 0; }
    70% { transform: scale(1) rotate(45deg); opacity: 1; }
    85% { transform: scale(0.3) rotate(90deg); opacity: 0.6; }
}
@keyframes gslUpgradeSpark {
    0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translate(calc(var(--dx) * 0.4), calc(var(--dy) * 0.4)) scale(1) rotate(70deg); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(180deg); opacity: 0; }
}

/* Cards */
.card {
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.5rem;
    /* NB: these card-cap vars only feed Bootstrap's low-specificity
       `.card-header` rule, which Craft's bundle overrides with a hardcoded
       `.card .card-header { padding: 0 2.25rem }`. The header's real padding
       is therefore set explicitly on `.card .card-header` below, NOT here. */
    --bs-card-cap-padding-y: 1.5rem;
    --bs-card-cap-padding-x: 1.5rem;
}

/* Card-header sizing. Craft's bundle hardcodes `.card .card-header` to
   `padding: 0 2.25rem; min-height: 70px` - ZERO vertical padding, with a
   fixed-height box doing the spacing. That's why a short title sits oddly.
   Override at the SAME specificity (this file loads after the bundle, so it
   wins on source order) to give every header symmetric 1.5rem (pt-4 / pb-4)
   vertical padding and size to its content instead. Horizontal stays at
   2.25rem to line up with `.card .card-body` (padding: 2rem 2.25rem).
   Bespoke headers that set their own pt-*/pb-* utilities still win via
   Bootstrap's !important spacing classes. */
.card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    /* Keep Craft's wrap so multi-child bespoke headers (title + a sibling
       description/toolbar) drop to the next line instead of squashing. */
    flex-wrap: wrap;
    /* No vertical padding by default: a .card-title carries its own 16px
       (see below) so the breathing room hugs the title element, as asked.
       Horizontal stays 2.25rem to line up with .card-body. */
    padding: 0 2.25rem;
}

/* Card-header band (Mike, 29/09/2026): headers were reading as lost, the
   title floating on the same surface as the body. A faint primary tint and a
   hairline rule give every card a clear top edge without spending a colour
   on the title (titles stay text-gray-700, the two-grey rule). color-mix
   keeps it right in both themes. Skipped on the semantic cards (needs-input,
   needs-attention) and sub-area cards, which carry their own tint, and any
   header that sets a bg-* utility (those are !important and win anyway). */
.card:not(.gsl-needs-input):not(.gsl-needs-attention):not(.bg-light-primary) > .card-header {
    background-color: color-mix(in srgb, var(--bs-primary) 4%, var(--bs-card-bg, var(--bs-body-bg)));
    border-bottom: 1px solid var(--bs-gray-200);
}
/* A card nested inside another card's body (Builder indicator rows, sub
   panels) is a row of its parent, not a new section: no band. */
.card-body .card > .card-header {
    background-color: transparent;
    border-bottom: 0;
}

/* Bespoke headers WITHOUT a .card-title (raw <h2>/<h3> on billing,
   divergences, deployment, operations, pricing) can't get their padding from
   .card-title, so give the header itself the 16px vertical. Headers that DO
   have a .card-title are excluded here so the padding isn't doubled. */
.card .card-header:not(:has(.card-title)) {
    padding-top: 16px;
    padding-bottom: 16px;
}

.card-header > .badge {
    align-self: center;
    height: fit-content;
}

/* Bespoke headers that use a raw <h2>/<h3> instead of the canonical
   .card-title (several admin pages: billing, divergences, deployment,
   operations, pricing). Match the canonical card-title size (fs-3 = 1.35rem)
   so heading sizes are consistent sitewide. h3.card-title is excluded: its
   .card-label span already carries fs-3. An inline font-size on the element
   still wins, so deliberate sub-headers keep their size. */
.card-header h2:not(.card-title),
.card-header h3:not(.card-title) {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    color: var(--bs-gray-700);
    display: flex;
    align-items: center;
}

.card-header .card-title {
    display: flex;
    margin: 0;
    /* 16px top/bottom breathing room ON the title element itself (the header
       carries no vertical padding when a .card-title is present). Headers
       without a .card-title get their 16px on the header instead, above. */
    padding: 16px 0;
}

/* Stacked card header (bold title + muted subtitle line). When the title
   uses the canonical .card-label span, stack the subtitle below it and
   left-align. This bakes in what every header used to spell out with the
   `align-items-start flex-column m-0` utility trio, so the markup can just
   be `<h3 class="card-title">`. Keyed on .card-label so single-line / icon
   headers (wiki, help, FAQ) keep the default row layout untouched. The
   specificity (0,3,0 via :has) beats `.card-header h3`'s align-items:center
   so the left-align holds without the utility class. */
.card-header .card-title:has(> .card-label) {
    flex-direction: column;
    align-items: flex-start;
}

.card-header .card-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Breathing room above and below a header button (Mike, 29/09/2026:
       "Open Live Trading" sat hard against the header edges). */
    padding-top: .75rem;
    padding-bottom: .75rem;
}

/* Badge override - increase padding for readability + sitewide font-size.
   font-size overrides Craft's --bs-badge-font-size (0.85rem) so every
   .badge across the app reads at 1rem. */
.badge {
    padding: 6px 10px;
    font-size: 1rem;
}

/* =====================================================================
   Warning colour: orange, not yellow (Mike, 26/09/2026)
   =====================================================================
   The vendor theme ships --bs-warning: #FFC700 on --bs-warning-light:
   #FFF8DD, i.e. yellow text on cream. That is a contrast ratio of 1.47:1,
   which is barely visible on a white page. Mike flagged it against the Gold
   asset badge and the new Marketplace trial badge sitting side by side.

   #E8590C measures 3.24:1 on the badge background and 3.58:1 on white. That
   is deliberately NOT the maximum available: the theme's other badges sit at
   1.92 (success), 2.58 (primary) and 3.44 (danger), so pushing warning to
   4.7:1 would leave it the one heavy badge in a set of pastels. This lands it
   alongside danger, the most legible of the family, so it reads clearly
   without looking like a different design language.

   Overridden here rather than in the vendor bundle so a theme update does not
   quietly undo it. Reaches every warning surface: badges, the favourite star,
   .gsl-needs-attention borders, alert-warning and the idle row highlight, all
   of which were the same washed-out yellow.
   ===================================================================== */
:root,
[data-bs-theme="light"] {
    --bs-warning:            #E8590C;
    --bs-warning-rgb:        232, 89, 12;
    --bs-warning-light:      #FFF1E6;
    --bs-warning-bg-subtle:  #FFF1E6;
    --bs-warning-border-subtle: #FFD5B8;
    --bs-warning-text-emphasis: #7A2E06;
}

/* Admin runs a dark theme. Light text on a dark tint is the mirror of the
   rule above: the tint carries the meaning, the text carries the contrast. */
[data-bs-theme="dark"] {
    --bs-warning:            #FF8A3D;
    --bs-warning-rgb:        255, 138, 61;
    --bs-warning-light:      #3A2416;
    --bs-warning-bg-subtle:  #3A2416;
}

/* =====================================================================
   Success colour: emerald, not the template mint (Mike, 13/10/2026)
   =====================================================================
   The vendor theme ships --bs-success: #50CD89 on --bs-success-light:
   #E8FFF3, the stock Keenthemes mint that every Craft and Metronic demo
   wears. Mike: "the green for success throughout our website looks cheap".
   It measured 2.0:1 on white and 1.9:1 on its own badge tint, so the money
   figures, the one thing on a card that should land, were the faintest
   element on the page.

   #0E8A5F is a blue-leaning bank green: 4.4:1 on white, 4.2:1 on the new
   badge tint #E3F3EA (a greyer tint than the old neon mint), and it sits
   beside the blue primary and the gold offer colour instead of fighting
   them. White on it is 4.4:1, so solid badges and buttons still read.
   Dark theme takes the same hue a step lighter, #12A86E: 5.4:1 as text on
   the dark card and 3.1:1 for white on a solid badge, the two jobs a dark
   success colour has to do at once.

   Two helper tokens for surfaces that do not follow the theme:
     --gsl-success-on-dark   the green for an always-dark surface (the
                             forward and MT5 consoles, their blinking
                             cursor and prompt), the same in both themes.
     --gsl-success-inverse   the green for a surface of the OPPOSITE
                             theme (the chart tooltip on gray-900, which
                             is near-black in light and near-white in
                             dark).

   Craft reads .text-success from a separate --bs-text-success token, so
   that is overridden too; without it the 150-odd text-success usages would
   stay mint. Overridden here rather than in the vendor bundle so a theme
   update does not quietly undo it. Reaches every success surface: badges,
   text, buttons, alerts, KPI borders, the chart family's up colour, the
   lifecycle map and the guide step ticks. auth-dark.css carries literal
   values of the same green because the auth pages do not load this file.
   ===================================================================== */
:root,
[data-bs-theme="light"] {
    --bs-success:               #0E8A5F;
    --bs-success-rgb:           14, 138, 95;
    --bs-success-active:        #0B7A52;
    --bs-success-light:         #E3F3EA;
    --bs-success-bg-subtle:     #E3F3EA;
    --bs-success-border-subtle: #BFE3CF;
    --bs-success-text-emphasis: #0A5C40;
    --bs-success-clarity:       rgba(14, 138, 95, 0.2);
    --bs-success-inverse:       #FFFFFF;
    --bs-text-success:          #0E8A5F;
    --gsl-success-on-dark:      #3BC48E;
    --gsl-success-inverse:      #3BC48E;
}
[data-bs-theme="dark"] {
    --bs-success:               #12A86E;
    --bs-success-rgb:           18, 168, 110;
    --bs-success-active:        #0F9A64;
    --bs-success-light:         #1C3630;
    --bs-success-bg-subtle:     #1C3630;
    --bs-success-border-subtle: #2A5C47;
    --bs-success-text-emphasis: #9FE6C6;
    --bs-success-clarity:       rgba(18, 168, 110, 0.2);
    --bs-success-inverse:       #FFFFFF;
    --bs-text-success:          #12A86E;
    --gsl-success-on-dark:      #3BC48E;
    --gsl-success-inverse:      #0E8A5F;
}
/* =====================================================================
   GSL conventions - sitewide visual rules
   =====================================================================
   Three semantic classes carry the danger / warning / info styles used
   for inline form-state cues and "things you should look at" panels.
   These are sitewide; any page that needs the same look reaches for the
   semantic class rather than memorising the four-utility-class combo.

   Two severity levels:
     .gsl-needs-input     - RED dashed border + light-danger bg. Use for
                            a required-empty field, or for a panel that
                            is blocking save / requires action.
     .gsl-needs-attention - AMBER dashed border + light-warning bg. Use
                            for a soft warning that does NOT block save
                            (e.g. "TP2 empty, will mirror TP1").

   Button conventions (use the existing Bootstrap / Craft classes):
     Primary CTA / Save  → .btn-primary           (solid blue)
     Edit                → .btn-primary           (solid blue)
     Add X               → .btn-primary           (solid blue)
     Remove / Delete     → .btn-light-danger      (soft red)
     Cancel / Secondary  → .btn-light-secondary   (neutral grey)
     Confirm destructive → .btn-danger            (solid red - rare)

   Card conventions:
     Standard card                 → .card
     Validation / blocking-save    → .card.gsl-needs-input
     Soft warning panel            → .card.gsl-needs-attention
     Sub-area card inside a card   → .card.bg-light-primary
                                     .border .border-primary
                                     .border-hover-primary
   ===================================================================== */

/* Kill Bootstrap's .small / <small> shrink sitewide. Both default to
   font-size: 0.875em, and GSL used them almost exclusively for muted
   helper / description text, which combined small size with low-contrast
   grey to produce copy that's too small to read comfortably. Neutralised
   to `inherit` so the token becomes a no-op: such text now takes its
   container's size (body 1rem in the common case). Text that genuinely
   needs to be small should use the fs-* scale (fs-7 / fs-8), never .small.
   Mike directive 05/06/2026. */
.small,
small {
    font-size: inherit;
}

.gsl-needs-input {
    border: 1px dashed var(--bs-danger) !important;
    background-color: var(--bs-danger-bg-subtle, #fdeeee) !important;
}

/* Quick-filter tile (multi-select). A clickable KPI-style mini-card used to
   filter a list pane in place (e.g. the metal filters on /presets.php). Toggle
   .active for the "on" state: solid blue border + faint blue wash, so several
   can read as "selected" at once. Wired by data-listview-metal in
   gsl-list-view.js but the visual is reusable for any tile filter. */
.gsl-filter-tile {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    border: 1px solid var(--bs-gray-300);
    border-radius: .65rem;
    background: var(--bs-body-bg);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
    user-select: none;
}
.gsl-filter-tile:hover { border-color: var(--bs-primary); }
.gsl-filter-tile.active {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle, #e9f3ff);
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

/* Selectable pick-card (single-select). A clickable card used in wizards /
   pickers (e.g. the "Send to Connector" modal). Toggle .active for the chosen
   row: blue border + faint wash + a revealed tick. The tick element carries
   .gsl-pick-tick. */
.gsl-pick-card { cursor: pointer; transition: border-color .15s, background-color .15s; }
.gsl-pick-card:hover { border-color: var(--bs-primary) !important; }
.gsl-pick-card.active {
    border-color: var(--bs-primary) !important;
    background-color: var(--bs-primary-bg-subtle, #e9f3ff);
}
.gsl-pick-card .gsl-pick-tick { opacity: 0; transition: opacity .15s; }
.gsl-pick-card.active .gsl-pick-tick { opacity: 1; }

/* Topbar global search (data-gsl-search). Craft-styled: inline input on md+,
   collapses to a magnifier icon that opens a popover panel on small screens.
   Theme-aware via Bootstrap CSS vars. Behaviour: /assets/js/gsl-header-search.js. */
.gsl-search { position: relative; }
/* Hide the mobile magnifier toggle on md+. Scoped under .gsl-search so this
   reaches specificity (0,2,0) and beats Craft's .btn.btn-icon { display:inline-flex }
   (also (0,2,0)) by load order: craft.css loads after style.bundle.css. Without
   this the toggle leaks onto desktop and stacks above the inline input. */
.gsl-search .gsl-search-toggle { display: none; }
.gsl-search-pop { position: relative; width: 300px; }
.gsl-search-field { position: relative; }
/* Match Craft's header search: solid grey fill, magnifier inset left.
   form-control-solid carries the fill/border; we only add the icon gutter and
   pin the height to the header badge height (~28px) so the search lines up with
   the version / clock / currency chips next to it rather than towering over
   them. min-height beats Bootstrap's form-control min-height. */
.gsl-search-input {
    padding-left: 2.25rem; padding-right: 2.9rem;
    height: 28px; min-height: 28px; font-size: .85rem;
}
.gsl-search-icon {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    color: var(--bs-gray-500); font-size: .95rem; pointer-events: none;
}
.gsl-search-spinner { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); }
.gsl-search-menu {
    position: absolute; top: calc(100% + .5rem); left: 0;
    width: 340px; max-height: 60vh; overflow-y: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    z-index: 1050; padding: .35rem 0;
}

/* Small screens: show only the magnifier icon; the field + results open as a
   single popover panel anchored under the icon (Craft mobile pattern). */
@media (max-width: 767.98px) {
    .gsl-search .gsl-search-toggle { display: inline-flex; }   /* match base specificity to re-show below md */
    .gsl-search-pop {
        display: none; position: absolute; top: calc(100% + .5rem); left: 0;
        width: min(85vw, 320px);
        background: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        border-radius: .75rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
        padding: .5rem; z-index: 1051;
    }
    .gsl-search.is-open .gsl-search-pop { display: block; }
    .gsl-search-menu {
        position: static; width: auto; max-height: 50vh;
        border: 0; box-shadow: none; border-radius: 0; padding: .25rem 0 0; margin-top: .5rem;
    }
}
/* Dashboard Pick up where you left off picture (28/09/2026): the curve SVG is
   stretched to a short 32:9 frame, so keep line widths as drawn and drop the
   end dot, which would stretch into an oval. */
.gsl-resume-visual svg line, .gsl-resume-visual svg polyline, .gsl-resume-visual svg path { vector-effect: non-scaling-stroke; }
.gsl-resume-visual svg circle { display: none; }
.gsl-resume-visual { display: block; min-height: 150px; }
.gsl-resume-visual > svg, .gsl-resume-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Dashboard hero search (28/09/2026): the same widget, full width and tall,
   always inline (never the mobile magnifier popover), results under it. */
.gsl-search-hero .gsl-search-pop {
    display: block !important; position: relative; width: 100%;
    top: auto; left: auto; padding: 0; border: 0; box-shadow: none; background: none;
}
.gsl-search-hero .gsl-search-input {
    height: 64px; min-height: 64px; font-size: 1.15rem;
    padding-left: 3.75rem; padding-right: 3.25rem;
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-gray-200) !important;
    border-radius: 1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.gsl-search-hero .gsl-search-input:focus { border-color: var(--bs-primary) !important; }
.gsl-search-hero .gsl-search-icon { left: 1.5rem; font-size: 1.5rem; color: var(--bs-gray-500); }
.gsl-search-hero .gsl-search-spinner { right: 11rem; }
/* Ask-first bar: an Ask Lyra button inside the field, right-hand end, and the
   leading "Ask Lyra" row tinted so it reads as the primary suggestion. */
/* 28/09/2026 tidy (Mike: "the button looks weird", then "all buttons the same
   padding"): standard .btn size and padding like every other dashboard button,
   only positioned inside the bar, icon and label centred on one line. */
.gsl-search-hero .gsl-search-askbtn {
    /* Flush to the bar's right end, full height, its corner matching the bar
       (Mike, 29/09/2026: the inset button looked cramped). */
    position: absolute; right: 0; top: 0; bottom: 0; height: 100%; transform: none;
    border-radius: 0 1rem 1rem 0 !important; padding-left: 1.75rem; padding-right: 1.75rem;
    display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
}
.gsl-search-hero .gsl-search-askbtn i { font-size: 1.15rem; line-height: 1; color: #fff; }
.gsl-search-hero[data-gsl-ask-first] .gsl-search-input { padding-right: 12rem; }
.gsl-search-ask-lead { background: var(--bs-primary-light); }
.gsl-search-ask-lead .gsl-search-item-icon { background: var(--bs-primary); color: #fff; }
.gsl-search-ask-lead .gsl-search-item-icon i { color: #fff; }
@media (max-width: 575.98px) {
    .gsl-search-hero .gsl-search-askbtn { padding: 0; width: 44px; justify-content: center; }
    .gsl-search-hero .gsl-search-askbtn span { display: none; }
    .gsl-search-hero .gsl-search-askbtn i { font-size: 1.35rem; }
    .gsl-search-hero[data-gsl-ask-first] .gsl-search-input { padding-right: 4.5rem; }
    .gsl-search-hero .gsl-search-spinner { right: 5rem; }
}
.gsl-search-hero .gsl-search-menu {
    position: absolute; top: calc(100% + .5rem); left: 0; width: 100%;
    max-height: 60vh; border: 1px solid var(--bs-border-color);
    border-radius: .75rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: .35rem 0;
}
.gsl-search-group-label {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--bs-gray-500); padding: .6rem 1rem .25rem;
}
.gsl-search-item {
    display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem;
    text-decoration: none;
}
.gsl-search-item:hover, .gsl-search-item.is-active { background: var(--bs-gray-100); }
.gsl-search-item-icon {
    width: 34px; height: 34px; border-radius: .5rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bs-gray-100); color: var(--bs-gray-600); font-size: 1rem;
}
.gsl-search-item.is-active .gsl-search-item-icon,
.gsl-search-item:hover .gsl-search-item-icon { background: var(--bs-gray-200); }
.gsl-search-item-title { font-weight: 600; color: var(--bs-gray-800); font-size: .9rem; }
.gsl-search-item-sub   { font-size: .75rem; color: var(--bs-gray-500); }
.gsl-search-state { padding: 1.25rem 1rem; text-align: center; color: var(--bs-gray-500); font-size: .85rem; }

/* Keyboard-shortcut hint pinned inside the field (right). Hidden while the
   field is focused (the spinner uses the same corner during an active search,
   and the hint has served its purpose once the user is typing). */
.gsl-search-kbd {
    position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
    align-items: center; pointer-events: none;
    font-size: .65rem; font-weight: 600; line-height: 1;
    color: var(--bs-gray-500); background: var(--bs-gray-200);
    border: 1px solid var(--bs-border-color); border-radius: .35rem;
    padding: .15rem .35rem;
}
.gsl-search-field:focus-within .gsl-search-kbd { display: none !important; }

/* Match highlight on result titles. Subtle tinted background, inherits weight. */
.gsl-search-item-title mark {
    background: var(--bs-warning-bg-subtle, rgba(255, 199, 0, .28));
    color: inherit; padding: 0 .1em; border-radius: .2em;
}

/* Empty-state hint line under the quick links. */
.gsl-search-hint {
    padding: .6rem 1rem .5rem; margin-top: .25rem;
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-gray-500); font-size: .7rem;
}
.gsl-search-kbd-inline {
    display: inline-block; font-weight: 600;
    background: var(--bs-gray-200); border: 1px solid var(--bs-border-color);
    border-radius: .3rem; padding: 0 .3rem;
}

/* "Ask <assistant>" hand-off row: a divider then a tinted-icon action. */
.gsl-search-ask-sep { border-top: 1px solid var(--bs-border-color); margin: .35rem 0; }
.gsl-search-ask .gsl-search-item-icon {
    background: var(--bs-primary-bg-subtle, rgba(13, 110, 253, .12));
    color: var(--bs-primary);
}

/* Sidebar command bar: the same search widget pinned under the logo, above the
   scrolling nav. The field fills the rail; the results dropdown is positioned
   fixed by JS (gsl-header-search.js) so it escapes the sidebar's
   overflow:hidden and floats over the page content. Desktop only - below lg the
   sidebar is off-canvas and the header magnifier owns search. */
.gsl-search-sidebar {
    flex-shrink: 0;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.gsl-search-sidebar .gsl-search-pop { width: auto; }
.gsl-search-sidebar .gsl-search-input {
    height: 34px; min-height: 34px;        /* roomier than the cramped header chip */
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    color: #fff;
}
.gsl-search-sidebar .gsl-search-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.gsl-search-sidebar .gsl-search-icon { color: rgba(255, 255, 255, 0.45); }
.gsl-search-sidebar .gsl-search-kbd {
    display: flex;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.12);
}
/* The dropdown is fixed-positioned by JS; it inherits the light .gsl-search-menu
   chrome (it floats over page content, not the dark sidebar). */

/* Page toolbar "Actions" KTMenu dropdown.

   The menu is `display: flex; flex-direction: column` when shown, and the
   inner buttons carry Bootstrap's `w-100` (`width: 100% !important`). With
   no explicit width on the container, that combination expanded the menu
   to fill the viewport. We force the container to shrink-to-fit its widest
   item (with `white-space: nowrap` so labels do not wrap) and clamp with
   sensible min/max widths. The !important is needed because KTMenu / Popper
   can set width inline at positioning time. */
.gsl-actions-menu {
    width: max-content !important;
    min-width: 220px !important;
    max-width: 360px !important;
}
.gsl-actions-menu .menu-link { white-space: nowrap; }
.gsl-needs-attention {
    border: 1px dashed var(--bs-warning) !important;
    background-color: var(--bs-warning-bg-subtle, #fff8e1) !important;
}

/* ---------------------------------------------------------------------------
   Alerts = dashed tinted notices (sitewide).

   Every .alert renders in the canonical /admin/ui-patterns.php notice style:
   a dashed border + light background tint in its semantic colour, gray body
   text, and (in markup) a coloured leading icon. Two reasons this lives here:

   1. The Keenthemes bundle never shipped the alert-light-* variants at all,
      so ~47 of those across the app rendered as flat, borderless text (caught
      on support ticket #31, 07/06/2026). We define them here.
   2. Mike's directive (07/06/2026): every alert should match the dashed
      ui-patterns notice, just colour-swapped. So we also flip the solid
      alert-* variants to the dashed look and unify both naming styles.

   Colour-swap purely by the variant class (alert-warning / alert-danger /
   alert-info / alert-success / alert-primary / alert-secondary). Both
   `alert-x` and `alert-light-x` are accepted and render identically. Values
   are theme variables, so dark mode adapts automatically. Markup keeps full
   control of padding, icon and layout (see ui-patterns.php for the canonical
   icon + heading + body structure). */
/* The hidden attribute must win over the display utilities, whose !important
   otherwise keeps a note on screen that a script meant to hide (an empty red
   box on the credits page, 13/10/2026). */
.d-flex[hidden], .d-inline-flex[hidden], .d-block[hidden], .d-grid[hidden] { display: none !important; }

.alert {
    border-style: dashed !important;
    color: var(--bs-gray-700);
}
.alert-primary,   .alert-light-primary   { background-color: var(--bs-primary-light)   !important; border-color: var(--bs-primary)   !important; }
.alert-info,      .alert-light-info      { background-color: var(--bs-info-light)      !important; border-color: var(--bs-info)      !important; }
.alert-success,   .alert-light-success   { background-color: var(--bs-success-light)   !important; border-color: var(--bs-success)   !important; }
.alert-warning,   .alert-light-warning   { background-color: var(--bs-warning-light)   !important; border-color: var(--bs-warning)   !important; }
.alert-danger,    .alert-light-danger    { background-color: var(--bs-danger-light)    !important; border-color: var(--bs-danger)    !important; }
.alert-secondary, .alert-light-secondary { background-color: var(--bs-secondary-light) !important; border-color: var(--bs-secondary) !important; }

/* Responsive data table -> stacked cards on phones.
   Add .gsl-stack-table to a Bootstrap .table. On each <td> set
   data-label="Column name" to show a muted label pinned left with the
   value to the right on mobile; OMIT data-label (title, badges) to let
   the cell span the card full width left-aligned. Add data-actions to a
   trailing links cell for a divider above it. At >=768px it renders as a
   normal table; below 768px every row becomes a self-contained card so
   there's no horizontal scroll. Sitewide pattern: any dense data table
   reaches for this instead of leaving users to scroll a table sideways
   on a phone. Demoed in /admin/ui-patterns.php. */
@media (max-width: 767.98px) {
    .gsl-stack-table thead { display: none; }
    .gsl-stack-table,
    .gsl-stack-table tbody,
    .gsl-stack-table tr,
    .gsl-stack-table td { display: block; width: 100%; }
    /* Drop any desktop min-width (set inline to stop column crush) so the
       stacked cards never force horizontal scroll on a phone. */
    .gsl-stack-table,
    .gsl-stack-table th,
    .gsl-stack-table td { min-width: 0 !important; }
    .gsl-stack-table tr {
        border: 1px solid var(--bs-gray-200);
        border-radius: 0.65rem;
        padding: 0.85rem 1rem;
        margin-bottom: 0.75rem;
        /* The card's own colour, not #fff: white cards with pale text in dark mode (16/10/2026). */
        background: var(--bs-card-bg, var(--bs-body-bg));
    }
    /* Keenthemes zeroes the first row's left padding and the last row's right
       padding (.table tr:first-child / :last-child), which left the stacked
       cards unevenly inset and clipped a long value (14/10/2026). */
    .table.gsl-stack-table tr:first-child,
    .table.gsl-stack-table tr:last-child { padding-left: 1rem; padding-right: 1rem; }
    /* Neutralise Bootstrap's per-cell borders inside the stacked card. */
    .gsl-stack-table td {
        border: 0 !important;
        padding: 0.25rem 0;
        text-align: left;
    }
    /* A desktop gutter (gs-N) belongs to the table, not to a stacked card.
       Same specificity as Keenthemes' .table.gs-N td:first-child (wins on
       source order) and placed BEFORE the labelled-cell rule below, so a
       labelled cell keeps its 44% label inset. */
    .gsl-stack-table[class*="gs-"] td:first-child { padding-left: 0; }
    .gsl-stack-table[class*="gs-"] td:last-child { padding-right: 0; }
    /* Labelled cells: muted label pinned left, value to the right. The
       label is absolutely positioned so multi-line value content (e.g. a
       delta sub-line) flows cleanly on the right without disturbing it. */
    .gsl-stack-table td[data-label]:not([data-label=""]) {
        position: relative;
        padding-left: 44%;
        text-align: right;
        min-height: 1.5em;
    }
    .gsl-stack-table td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 0.25rem;
        width: 42%;
        text-align: left;
        font-weight: 600;
        color: var(--bs-gray-500);
        white-space: nowrap;
    }
    /* First cell is the card title: give it room before the value rows. */
    .gsl-stack-table tr > td:first-child { margin-bottom: 0.4rem; }
    /* Trailing action-links cell: divider + breathing room. */
    .gsl-stack-table td[data-actions] {
        margin-top: 0.5rem;
        padding-top: 0.6rem;
        border-top: 1px solid var(--bs-gray-100) !important;
    }
}

/* Sitewide favourite-star tint. Uses Bootstrap's warning yellow so the
   star matches the Gold asset badge (badge-light-warning) sat next to
   it on the preset list. Centralised here so all four templates that
   mark a favourite share one rule instead of an inline style. */
.gsl-favourite-star {
    color: var(--bs-warning);
    font-size: 1.1rem;
}

/* Motion jumping-dots loader: sitewide replacement for Bootstrap's
   spinner-border, modelled on motion.dev's jumping dots example. The
   container holds three .gsl-jd-dot children; JS sizes them from
   data-base-size, animates each one's translateY with a per-index
   delay (stagger), and uses repeatType: 'mirror' for the bounce.
   align-items: flex-end keeps the dots on a consistent baseline as
   they translate upward.

   Colour: each dot's background uses currentColor, so the loader
   automatically picks up the surrounding text colour. Drop into any
   element that has the right colour set (white inside btn-primary,
   primary inside btn-light-primary, etc.) and it just works.

   Animation is driven by /assets/js/gsl-jumping-dots.js (or the
   inline equivalent in templates/layout.php for the Lab Assistant
   send button). */
.gsl-jumping-dots {
    display: inline-flex;
    align-items: flex-end;
    line-height: 1;
    vertical-align: middle;
}
.gsl-jd-dot {
    display: inline-block;
    border-radius: 50%;
    background: currentColor;
    will-change: transform;
}

/* Form-row pattern: vertical stack of "label + field + helper" rows
   separated by a divider, no per-row card chrome. The container stays
   one .card; each question wraps in .gsl-form-row, and the adjacent-
   sibling rule paints the dividers between them. First row has no top
   padding so it sits flush with the card's own padding; last row has
   no bottom padding for the same reason. Divider colour uses --bs-gray-300
   (not --bs-border-color, which was too washed out to register against
   the white card background). */
.gsl-form-row {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
}
.gsl-form-row + .gsl-form-row {
    border-top: 1px solid var(--bs-gray-300);
}
.gsl-form-row:first-child { padding-top: 0; }
.gsl-form-row:last-of-type { padding-bottom: 0; }


/* Live row highlight for status tables (MT5 monitor, etc.). Avoids
   Bootstrap's .table-success which hard-codes a light-theme green bg
   that washes out against light text in dark theme. Translucent
   overlay + left border instead, so the row reads as "alive" in
   both light and dark modes without fighting cell text colours. */
tr.gsl-row-live > * {
    background-color: rgba(var(--bs-success-rgb), 0.08) !important;
}
tr.gsl-row-live > td:first-child {
    box-shadow: inset 3px 0 0 0 var(--bs-success);
}

/* Idle row highlight: same recipe as gsl-row-live but in the warning
   colour scheme. Used on status tables to mark rows that are alive but
   not currently active (e.g. an MT5 Connector whose EA is registered
   but hasn't sent a heartbeat in the last 5 minutes). */
tr.gsl-row-idle > * {
    background-color: rgba(var(--bs-warning-rgb), 0.08) !important;
}
tr.gsl-row-idle > td:first-child {
    box-shadow: inset 3px 0 0 0 var(--bs-warning);
}

/* =====================================================================
   Strategy lifecycle strip
   =====================================================================
   Per-preset progress strip rendered at the top of /presets.php?id=N.
   Four nodes joined by horizontal connecting lines, numbered to match the
   sidebar's four stages: 1 Strategy -> 2 Backtest -> 3 Forward Test ->
   4 Go Live (27/09/2026; AI Train left the graph, prop readiness folded
   into Go Live). Each node carries a circle (state
   indicator), a label, a sub-caption, an optional CTA, and an optional
   Ask Lab Assistant link.

   State classes on .lc-step:
     .is-done      - green check filled circle
     .is-line-done - the line out is green: set by the template when this
                     step is done and the next one is done or current, so a
                     line never runs green into a step not reached yet (a
                     forward test with no backtest, 09/10/2026)
     .is-active    - primary-blue filled circle + halo, CTA shown
     .is-blocked   - amber filled circle (prop-firm readiness fail)
     (default)     - hollow grey, pending

   See public/templates/presets/lifecycle.php for the markup contract.
   ===================================================================== */

.gsl-lifecycle {
    --node-size: 44px;
    --line-thickness: 3px;
}
.gsl-lifecycle .lc-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}
.gsl-lifecycle .lc-step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    min-width: 0;
    padding: 0 8px;
}
.gsl-lifecycle .lc-node {
    width: var(--node-size);
    height: var(--node-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
    z-index: 2;
    background: #fff;
    border: 2px solid var(--bs-gray-300);
    color: var(--bs-gray-500);
    transition: transform .15s ease;
}
.gsl-lifecycle .lc-step.is-done .lc-node {
    background: var(--bs-success);
    border-color: var(--bs-success);
    color: #fff;
}
.gsl-lifecycle .lc-step.is-active .lc-node {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(0, 158, 247, 0.18);
}
.gsl-lifecycle .lc-step.is-blocked .lc-node {
    background: var(--bs-warning);
    border-color: var(--bs-warning);
    color: #fff;
}
/* Icons inside a node (the done tick, the blocked shield) take the node's own
   text colour: Keenthemes gives .ki-* icons a grey of their own, so the tick
   on a green node rendered grey (Mike, 28/09/2026). */
.gsl-lifecycle .lc-node i,
.lcm-node i { color: inherit !important; }
.gsl-lifecycle .lc-line {
    position: absolute;
    top: calc(var(--node-size) / 2 - var(--line-thickness) / 2);
    left: 50%;
    width: 100%;
    height: var(--line-thickness);
    background: var(--bs-gray-300);
    z-index: 1;
}
.gsl-lifecycle .lc-step.is-line-done .lc-line {
    background: var(--bs-success);
}
.gsl-lifecycle .lc-label {
    margin-top: 14px;
    font-weight: 700;
    color: var(--bs-gray-800);
    font-size: 0.95rem;
    line-height: 1.3;
    min-height: 1.3em;
}
.gsl-lifecycle .lc-step:not(.is-done):not(.is-active):not(.is-blocked) .lc-label {
    color: var(--bs-gray-500);
    font-weight: 600;
}
.gsl-lifecycle .lc-sub {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--bs-gray-500);
    min-height: 2.8em;
}
/* Subtle emphasis on the current step's label so the stepper indicates
   "you are here" even without per-step CTA buttons. */
.gsl-lifecycle .lc-step.is-current .lc-label {
    color: var(--bs-primary);
}

/* Optional stages (today: AI Evolve) are visually a side path, not a
   gate. Dashed circle border when not yet done + dashed connecting lines
   on both sides communicate "you can skip this and still reach Go Live".
   When the optional stage IS done we keep the solid green circle so the
   user gets the satisfying "completed" cue. The :has() selector picks
   up the line OWNED by the preceding step so the dash treatment covers
   both sides of the optional node. */
.gsl-lifecycle .lc-step.is-optional:not(.is-done) .lc-node {
    border-style: dashed;
    background: #fff;
    color: var(--bs-gray-600);
}
.gsl-lifecycle .lc-step.is-optional .lc-line,
.gsl-lifecycle .lc-step:has(+ .lc-step.is-optional) .lc-line {
    background-color: transparent;
    background-image: linear-gradient(to right, var(--bs-gray-400) 50%, transparent 50%);
    background-size: 10px 100%;
    background-repeat: repeat-x;
}

/* ---------------------------------------------------------------------
   Active-stage focus panel.

   The lifecycle strip used to render a per-step CTA button under every
   stage. With the Lab Assistant drawer pinned by default the content
   area is narrower than the layout was designed for, and CTA buttons
   like "Run first back test" overflowed their flex column into the
   neighbouring step (visually broken, ambiguous click targets).

   Redesign: the stepper above carries pure progress (circles + labels
   + sub-captions). The single next action lives in this dedicated
   panel below, where there is no horizontal budget pressure and the
   user's eye is pulled to one clear thing to do next. Secondary CTAs
   for non-primary-active stages remain reachable via the page's
   Actions dropdown.
   --------------------------------------------------------------------- */
.gsl-lifecycle .lc-active-panel {
    margin-top: 26px;
    padding: 18px 20px;
    background: var(--bs-primary-bg-subtle, #eef6ff);
    border: 1px solid var(--bs-primary-border-subtle, #d6e8ff);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.gsl-lifecycle .lc-active-panel.is-blocked {
    background: var(--bs-warning-bg-subtle, #fff8e1);
    border-color: var(--bs-warning-border-subtle, #ffe0a3);
}
.gsl-lifecycle .lc-active-info {
    flex: 1 1 280px;
    min-width: 0;
}
.gsl-lifecycle .lc-active-step {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.gsl-lifecycle .lc-active-step-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bs-gray-800);
}
.gsl-lifecycle .lc-active-step-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--bs-gray-700);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.gsl-lifecycle .lc-active-sub {
    color: var(--bs-gray-700);
    font-size: 0.875rem;
    line-height: 1.45;
}
.gsl-lifecycle .lc-active-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.gsl-lifecycle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bs-success-bg-subtle, #E3F3EA);
    color: var(--bs-success);
    font-weight: 700;
    font-size: 0.85rem;
}

/* On narrow viewports the horizontal track gets cramped. Drop to a
   vertical stack with connecting lines down the left edge so labels
   keep their full width and the touch targets stay big. */
@media (max-width: 768px) {
    .gsl-lifecycle .lc-track {
        flex-direction: column;
        align-items: stretch;
    }
    .gsl-lifecycle .lc-step {
        flex-direction: row;
        text-align: left;
        gap: 14px;
        padding: 10px 0;
    }
    .gsl-lifecycle .lc-line {
        top: var(--node-size);
        left: calc(var(--node-size) / 2 - var(--line-thickness) / 2);
        width: var(--line-thickness);
        height: calc(100% - var(--node-size));
    }
    .gsl-lifecycle .lc-step .lc-label,
    .gsl-lifecycle .lc-step .lc-sub {
        margin-top: 0;
        text-align: left;
        min-height: 0;
    }
    .gsl-lifecycle .lc-step > div:not(.lc-node):not(.lc-line) {
        flex-grow: 1;
    }
}

/* ---------------------------------------------------------------------
   Strategy Lifecycle MODAL (.lcm-*)

   The richer, vertical "command centre" view of the same lifecycle, grouped
   into the four product phases (Build / Test / Evolve / Trade). Rendered by
   templates/presets/lifecycle-modal-body.php inside the shared lifecycle modal.
   Distinct class prefix (.lcm-) from the horizontal strip (.lc-) so the two
   never collide. See /admin/ui-patterns.php "Strategy lifecycle modal".
   --------------------------------------------------------------------- */
.lcm-phase { border-left: 3px solid var(--bs-gray-200); padding: 0 0 0 1.1rem; margin-bottom: 1.5rem; }
.lcm-phase:last-child { margin-bottom: 0; }
.lcm-phase-done   { border-left-color: var(--bs-success); }
.lcm-phase-active { border-left-color: var(--bs-primary); }
.lcm-phase-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; margin-bottom: .75rem; color: var(--bs-gray-700); }
.lcm-phase-title { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.lcm-phase-blurb { font-size: .8rem; color: var(--bs-gray-500); font-weight: 500; }
.lcm-stage { display: flex; gap: .9rem; padding: .6rem 0; }
.lcm-rail { flex-shrink: 0; }
.lcm-node { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; }
.lcm-node-done    { background: var(--bs-success); color: #fff; }
.lcm-node-active  { background: var(--bs-primary); color: #fff; }
.lcm-node-blocked { background: var(--bs-danger); color: #fff; }
.lcm-node-pending { background: var(--bs-gray-200); color: var(--bs-gray-500); }
.lcm-body { flex-grow: 1; min-width: 0; }
.lcm-stage-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lcm-stage-label { font-size: 1rem; font-weight: 700; color: var(--bs-gray-800); }
.lcm-stage-sub { font-size: .85rem; color: var(--bs-gray-600); margin-top: .15rem; }
.lcm-stage-meta { font-size: .8rem; color: var(--bs-gray-700); margin-top: .35rem; }
.lcm-stage-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.lcm-stage-actions:empty { display: none; }

/* Content area */
.content-wrapper {
    padding: 30px;
}
/* Tighter gutters on phones so content isn't squeezed by 30px each side. */
@media (max-width: 767.98px) {
    .content-wrapper {
        padding: 16px;
    }
}

/* Dry run badge */
.badge-dry-run {
    background-color: rgba(241, 65, 108, 0.08);
    color: var(--bs-danger);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;        /* fs-8 */
}

/* KPI tiles - Craft Store Analytics style (label / big value / supporting line).
   Label/value/sub are standalone classes so they can also be dropped into
   row layouts or single-card status strips outside a .kpi-tile container. */
.kpi-label {
    font-size: 0.85rem;        /* fs-8 - sitewide small-label size */
    font-weight: 600;
    color: var(--bs-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.kpi-value {
    font-size: 1.75rem;        /* display number (28px) */
    font-weight: 700;
    color: var(--bs-gray-900);
    line-height: 1.15;
}
.kpi-sub {
    font-size: 0.95rem;        /* fs-7 - KPI subtitle role per scale */
    font-weight: 500;
    color: var(--bs-gray-600);
    line-height: 1.35;
    margin-top: 2px;
}
.kpi-sub .sep,
.kpi-value .sep {
    color: var(--bs-gray-400);
    margin: 0 4px;
    font-weight: 500;
}
.kpi-tile {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}
.kpi-tile-sm {
    padding: 16px 18px;
    gap: 4px;
}
.kpi-tile-sm .kpi-label { font-size: 0.85rem; }   /* fs-8 */
.kpi-tile-sm .kpi-value { font-size: 1.25rem; }   /* fs-4 (20px) */
/* Value first (Mike, 13/10/2026): the number on top, then the label, then
   the sub-line, so every number in a row of narrow tiles sits on one line
   however the labels wrap (the admin dashboard's six-up row). The markup
   stays label, value, sub, so a screen reader still hears the label first.
   Only for a tile holding one label, one value and an optional sub-line. */
.kpi-tile-value-first > .kpi-value { order: -1; }
/* Under the number the label is the title, so it takes the strong grey and
   the sub-line the soft one (Mike chose this, 13/10/2026). The standard
   tile keeps a soft label over a brighter sub-line. */
.kpi-tile-value-first > .kpi-label { color: var(--bs-gray-700); }
.kpi-tile-value-first > .kpi-sub   { color: var(--bs-gray-500); }

/* Direction accent - left border carries the green/red/amber signal so the
   value text can stay neutral. */
.kpi-card.kpi-pos     { border-left: 4px solid var(--bs-success); }
.kpi-card.kpi-neg     { border-left: 4px solid var(--bs-danger); }
.kpi-card.kpi-warn    { border-left: 4px solid var(--bs-warning); }
.kpi-card.kpi-info    { border-left: 4px solid var(--bs-info); }
.kpi-card.kpi-primary { border-left: 4px solid var(--bs-primary); }

/* Clickable list card lift - shared tactile feedback for the dashboard
   list-page card grids (presets / backtests / forward / trainer). */
.list-card-hover { transition: transform 0.12s ease, box-shadow 0.12s ease; color: inherit; }
.list-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: inherit;
}

/* Config chips - quiet "label: value" pills for strategy settings, run
   parameters, anything that's an informational tag rather than a result
   indicator. All neutral grey, no category colours. */
/* Config chips (spacing model, 26/09/2026): what used to be a strip of
   grey pills is now a glance grid, one tile per setting: uppercase label
   above a bold value, wide gaps, no background. Same markup on the backtest
   run, forward dashboard and preset pages; only the CSS changed, so every
   chip strip sitewide reads like the Marketplace "At a glance" card. The
   :has() rule widens the parent's gap (Safari 15.4+, Chrome 105+; older
   browsers just get tighter tiles). */
.config-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 0;
    background: none;
    min-width: 7.5rem;
    white-space: nowrap;
}
.config-chip .config-chip-label {
    font-size: 0.85rem;        /* fs-8 */
    font-weight: 600;
    color: var(--bs-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.config-chip .config-chip-value {
    font-size: 1.15rem;        /* fs-5 */
    font-weight: 700;
    color: var(--bs-gray-700);
    line-height: 1.3;
}
.config-chip .config-chip-value:only-child { padding-top: 1.35rem; }  /* value-only chips align with the labelled ones */
div:has(> .config-chip) { gap: 1.5rem 2.75rem !important; padding-top: 0.25rem; }

/* Video embed / placeholder - the reusable explainer-video slot rendered by
   templates/partials/video-embed.php. One component for every "watch how"
   slot so dropping a real clip in later is a one-line change (set 'src');
   until then a tidy "coming soon" placeholder holds the space.

   .gsl-video-frame-soon  - 16:9 placeholder (hero / standalone).
   .gsl-video-chip        - slim inline row (sits inside a step without
                            dominating it); the -soon variant is the
                            not-yet-recorded placeholder. */
.gsl-video-frame-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bs-light-primary);
    border: 2px dashed var(--bs-gray-300);
    border-radius: 0.625rem;
    color: var(--bs-gray-500);
    text-align: center;
}
.gsl-video-frame-soon .gsl-video-play {
    font-size: 2.5rem;
    color: var(--bs-primary);
    opacity: 0.65;
}
.gsl-video-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 20px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    font-size: 0.85rem;        /* fs-8 */
    line-height: 1.3;
    text-decoration: none;
    color: var(--bs-gray-700);
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
a.gsl-video-chip:hover {
    background: var(--bs-light-primary);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}
.gsl-video-chip .gsl-video-play { color: var(--bs-primary); }
.gsl-video-chip-soon {
    border-style: dashed;
    color: var(--bs-gray-500);
    cursor: default;
}
.gsl-video-chip-soon .gsl-video-play { opacity: 0.6; }
/* Our own how-to videos, shown the way YouTube shows a video (03/10/2026,
   templates/partials/guide-video-player.php): the thumbnail with a gold play
   button and the length in the corner; once it plays, the native controls.
   --gsl-play-top puts the button in the space that video's thumbnail leaves.
   .gsl-video-card = thumbnail + title under it (the old chip's place);
   .gsl-video-thumb-soon = a chapter not recorded yet. */
.gsl-guide-video-wrap {
    position: relative;
    border-radius: 0.625rem;
    overflow: hidden;
    background: #000;
}
.gsl-guide-video-wrap:not(.is-started) { cursor: pointer; }
.gsl-guide-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}
.gsl-video-bigplay {
    position: absolute;
    left: 50%;
    top: var(--gsl-play-top, 50%);
    transform: translate(-50%, -50%);
    width: clamp(46px, 11%, 84px);
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #E8B13D;
    color: #16130A;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease;
}
.gsl-video-bigplay svg { width: 46%; height: 46%; margin-left: 6%; }
.gsl-guide-video-wrap:hover .gsl-video-bigplay { transform: translate(-50%, -50%) scale(1.08); }
.gsl-video-length {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.85rem;        /* fs-8 */
    font-weight: 600;
    pointer-events: none;
}
.gsl-guide-video-wrap.is-started .gsl-video-bigplay,
.gsl-guide-video-wrap.is-started .gsl-video-length { display: none; }
.gsl-video-sound { position: absolute; top: 12px; right: 12px; }
.gsl-video-card { max-width: 360px; }
.gsl-video-thumb-soon {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0.625rem;
    overflow: hidden;
    background: radial-gradient(120% 90% at 50% 40%, #1B2130 0%, #0C0E13 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    text-align: center;
}
.gsl-video-thumb-soon img { width: 34px; opacity: 0.85; }
.gsl-video-thumb-soon .gsl-video-thumb-title { color: #F5F4F0; font-weight: 700; font-size: 1rem; line-height: 1.3; }

/* Numbered journey path - the "do this, then this" step list used on the
   Getting Started guide. A primary number circle per step with a connector
   line running down to the next, so the sequence reads at a glance. Source:
   templates/guide/page.php. */
.guide-step { position: relative; }
.guide-step-num {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bs-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.15rem; flex-shrink: 0; z-index: 1;
}
.guide-step:not(:last-child) .guide-step-num::after {
    content: ""; position: absolute; top: 44px; bottom: -1.25rem;
    left: 21px; width: 2px; background: var(--bs-gray-300); z-index: 0;
}
/* A step the member has done (the dashboard's "You're new here" card,
   03/10/2026): the number becomes a green tick and the step drops its button. */
.guide-step-done .guide-step-num { background: var(--bs-success); }

/* Card footer override */
.card-footer {
    font-size: 0.85rem;        /* fs-8 */
    background-color: transparent;
    border-top: 1px solid var(--bs-gray-200);
}

/* Section titles inside form */
.form-section-title {
    font-size: 1.15rem !important;   /* fs-5 (18px) */
    font-weight: 700 !important;
    color: var(--bs-gray-900) !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--bs-gray-200) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.card-body > .form-section-title:first-child { margin-top: 0 !important; }

/* Global button rule: never stack icon + text across lines. Buttons
   always render on one line and grow horizontally to fit their label.
   Applies to every .btn (including .btn-sm, icon buttons, table-row
   action buttons in narrow columns, etc.). */
.btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Radio toggle buttons - make unselected state visible */
.btn-check + .btn-outline-primary {
    border: 1px solid var(--bs-gray-300);
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
}

.btn-check + .btn-outline-primary:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: rgba(0, 163, 255, 0.04);
}

.btn-check:checked + .btn-outline-primary {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.btn-check:checked + .btn-outline-primary i {
    color: #fff !important;
}

.form-section-title i {
    color: var(--bs-primary);
    font-size: 16px;
}

/* Form labels - always bold across the app.
   !important needed because Craft's .fw-semibold uses !important at 500. */
.form-label {
    font-weight: 700 !important;
}

/* Tooltip icon on form labels */
.form-label .tt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 11px;
    color: var(--bs-gray-500);
    margin-left: 4px;
    cursor: help;
    vertical-align: middle;
    transition: color 0.15s;
}

.form-label .tt:hover {
    color: var(--bs-primary);
}

/* Alert variants not in Craft bundle */
.alert-danger-light {
    background-color: rgba(241, 65, 108, 0.06);
    border: 1px solid rgba(241, 65, 108, 0.15);
    color: var(--bs-danger);
    border-radius: 0.625rem;
}

.alert-success-light {
    background-color: rgba(var(--bs-success-rgb), 0.06);
    border: 1px solid rgba(var(--bs-success-rgb), 0.15);
    color: var(--bs-success);
    border-radius: 0.625rem;
}

/* Footer */
.main-footer {
    padding: 24px 30px;
    border-top: 1px solid var(--bs-gray-200);
    color: var(--bs-gray-500);
    font-size: 12.5px;
}

/* Date Range Picker - Craft overrides
   The vanilla daterangepicker-3.1.0.css gives the layout but no theming
   (Arial font, plain borders, no primary-colour highlights). These rules
   bring the popover in line with the rest of the Craft / Bootstrap look. */
#kt_daterangepicker,
.gsl-daterange-display {
    cursor: pointer;
    background-color: #fff;
}
/* The wrapper holds two hidden ISO mirrors next to the visible picker
   input; collapse the inline-block default so the visible input claims
   the wrapper's full width and the mirrors don't reserve any space. */
[data-gsl-daterange] {
    display: block;
}

.daterangepicker {
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--bs-gray-300, #E4E6EF);
    border-radius: 0.625rem;
    box-shadow: 0 0 50px 0 rgba(82, 63, 105, 0.15);
    padding: 0.5rem 0;
    color: var(--bs-gray-800, #3F4254);
}
.daterangepicker:before,
.daterangepicker:after {
    display: none;
}

.daterangepicker .calendar-table {
    border: none;
    padding: 0.5rem;
    background-color: transparent;
}
.daterangepicker .calendar-table table {
    border-collapse: separate;
    border-spacing: 2px;
}

.daterangepicker th,
.daterangepicker td {
    border-radius: 0.42rem;
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    font-weight: 500;
    color: var(--bs-gray-700, #5E6278);
    border: none;
}
.daterangepicker th.month {
    font-weight: 600;
    color: var(--bs-gray-900, #181C32);
    font-size: 1rem;
}
.daterangepicker th.prev,
.daterangepicker th.next {
    color: var(--bs-gray-600, #7E8299);
    cursor: pointer;
}
.daterangepicker th.prev:hover,
.daterangepicker th.next:hover {
    background-color: var(--bs-light, #F4F6FA);
    color: var(--bs-primary, #1B84FF);
}

.daterangepicker td.available {
    cursor: pointer;
}
.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    background-color: var(--bs-light, #F4F6FA);
    color: var(--bs-primary, #1B84FF);
}
.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
    background-color: transparent;
    color: var(--bs-gray-400, #B5B5C3);
}
.daterangepicker td.in-range {
    background-color: rgba(27, 132, 255, 0.1);
    color: var(--bs-primary, #1B84FF);
    border-radius: 0;
}
.daterangepicker td.start-date,
.daterangepicker td.end-date,
.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: var(--bs-primary, #1B84FF);
    color: #fff;
}
.daterangepicker td.start-date {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.daterangepicker td.end-date {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.daterangepicker td.start-date.end-date {
    border-radius: 0.42rem;
}
.daterangepicker td.today,
.daterangepicker td.today:not(.start-date):not(.end-date):not(.in-range) {
    background-color: var(--bs-light, #F4F6FA);
    color: var(--bs-primary, #1B84FF);
    font-weight: 600;
}

.daterangepicker .ranges {
    padding: 0.5rem 0;
    margin: 0;
}
.daterangepicker .ranges ul {
    width: 160px;
    padding: 0;
    margin: 0;
}
.daterangepicker .ranges li {
    padding: 0.55rem 1rem;
    color: var(--bs-gray-700, #5E6278);
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
}
.daterangepicker .ranges li:hover {
    background-color: var(--bs-light, #F4F6FA);
    color: var(--bs-primary, #1B84FF);
}
.daterangepicker .ranges li.active {
    background-color: var(--bs-primary, #1B84FF);
    color: #fff;
}

.daterangepicker .drp-buttons {
    border-top: 1px solid var(--bs-gray-200, #E4E6EF);
    padding: 0.65rem 1rem;
}
.daterangepicker .drp-buttons .btn {
    font-weight: 500;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.42rem;
}
.daterangepicker .drp-selected {
    color: var(--bs-gray-700, #5E6278);
    font-size: 0.85rem;
    padding-right: 0.75rem;
}

.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
    color: var(--bs-gray-700, #5E6278);
    border-width: 0 2px 2px 0;
}

/* Min/max time selectors (when daterangepicker has timePicker:true; we
   don't use it yet but theming for free if a future page enables it). */
.daterangepicker select.hourselect,
.daterangepicker select.minuteselect,
.daterangepicker select.ampmselect,
.daterangepicker select.secondselect {
    background-color: var(--bs-light, #F4F6FA);
    border: 1px solid var(--bs-gray-300, #E4E6EF);
    border-radius: 0.42rem;
    padding: 0.2rem 0.4rem;
    color: var(--bs-gray-800, #3F4254);
    margin: 0 2px;
}

/* Burger button: only visible on screens where the sidebar collapses (<=991px).
   Sits as the first child of .topbar so it lines up with the back arrow / badge. */
.topbar-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--bs-gray-200);
    border-radius: 8px;
    background: #fff;
    color: var(--bs-gray-700);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.topbar-burger:hover {
    background: var(--bs-gray-100);
    color: var(--bs-gray-900);
}
.topbar-burger i { font-size: 20px; }

/* Sidebar backdrop: only rendered/visible on mobile when sidebar is open. */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 99;
}
body[data-sidebar-open="1"] .sidebar-backdrop { display: block; }

/* Responsive: collapse sidebar on small screens. Sidebar slides off-screen
   instead of being removed, so the burger button can slide it back in. */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    body[data-sidebar-open="1"] .sidebar { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .topbar-burger { display: inline-flex; }
}

/* MT5 Monitor - heartbeat pulse (lub-dub double beat, 1.2s cycle) */
@keyframes heartbeat-pulse {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.3); }
    28%  { transform: scale(1); }
    42%  { transform: scale(1.2); }
    70%  { transform: scale(1); }
    100% { transform: scale(1); }
}
.heartbeat-pulse {
    display: inline-block;
    color: #f1416c;
    transform-origin: center;
    animation: heartbeat-pulse 1.2s ease-in-out infinite;
    transition: color 0.3s ease;
}
/* When a poll fires we briefly add this class to give a stronger "data received" beat */
@keyframes heartbeat-flash {
    0%   { transform: scale(1); filter: drop-shadow(0 0 0 rgba(241, 65, 108, 0)); }
    50%  { transform: scale(1.5); filter: drop-shadow(0 0 6px rgba(241, 65, 108, 0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(241, 65, 108, 0)); }
}
.heartbeat-pulse.flash {
    animation: heartbeat-flash 0.5s ease-out;
}
/* When polls fail or stop arriving, JS adds .stale - heart goes grey and stops beating */
.heartbeat-pulse.stale {
    color: #a1a5b7;
    animation: none;
    transform: scale(1);
}

/* ===== Dark mode =====
   Bootstrap 5.3 dark mode auto-handles body-bg / body-color / card-bg /
   border-color, but it does NOT invert the --bs-gray-* scale. craft.css
   uses gray-* directly throughout (text colours, borders, subtle
   backgrounds, hover surfaces), so we invert the scale here.

   Surface hierarchy back to front:
     page bg #15181d  ->  sidebar / topbar #1E2129  ->  cards (Bootstrap
     dark default ~#212529). Cards always lift off the page.

   The theme picker is feature-flag gated (templates/partials/theme-picker.php
   bails when gslSystemFlagEnabled('dark_mode_enabled') is false), so these
   rules are inert in prod until the flag is flipped on. Light mode is
   unaffected by anything below. */

[data-bs-theme=dark] {
    /* Inverted gray scale - low numbers stay dark (surfaces), high numbers
       become light (text). Overrides the :root --bs-gray-900 set above. */
    --bs-gray-100: #1f2329;   /* subtle backgrounds (filled inputs, hover, chip bg) */
    --bs-gray-200: #2a2f38;   /* borders, separators, table dividers */
    --bs-gray-300: #3a414d;   /* stronger borders */
    --bs-gray-400: #5b6473;   /* muted icons, KPI value separators */
    --bs-gray-500: #8a92a3;   /* sub-labels, footer copy */
    --bs-gray-600: #a8aebc;   /* muted body text */
    --bs-gray-700: #cdd2dc;   /* medium-emphasis text */
    --bs-gray-800: #e1e4ec;   /* high-emphasis text */
    --bs-gray-900: #f5f6f9;   /* primary text (was #2b2b2b in light) */
    /* Page surface - deepest tone so cards (Bootstrap auto-dark ~#212529)
       lift off. The light-mode .main-content rule already pulls from this
       var, so dark mode just overrides the variable and inherits the rest. */
    --gsl-page-bg: #15181d;
}

/* Topbar - match sidebar for a unified chrome layer. (Hardcoded #fff in light.) */
[data-bs-theme=dark] .topbar {
    background: #1E2129;
}

/* Burger button (mobile <=991px) - sits inside the dark topbar.
   Hover bumps lighter, not darker, since gray-100 is darker than the topbar. */
[data-bs-theme=dark] .topbar-burger {
    background: #1E2129;
}
[data-bs-theme=dark] .topbar-burger:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* User dropdown trigger - same hover-lighter override. */
[data-bs-theme=dark] .topbar-user-btn:hover,
[data-bs-theme=dark] .topbar-user-btn.show {
    background: rgba(255, 255, 255, 0.06);
}

/* Date range picker - was hardcoded #fff. */
[data-bs-theme=dark] #kt_daterangepicker {
    background-color: var(--bs-gray-100);
}

/* Alert tints - bump opacity so the colour reads on a dark surface. */
[data-bs-theme=dark] .alert-danger-light {
    background-color: rgba(241, 65, 108, 0.12);
    border-color: rgba(241, 65, 108, 0.28);
}
[data-bs-theme=dark] .alert-success-light {
    background-color: rgba(var(--bs-success-rgb), 0.12);
    border-color: rgba(var(--bs-success-rgb), 0.28);
    color: var(--bs-success);
}

/* =====================================================================
   Modal motion (3D depth reveal)
   =====================================================================
   Driven by /assets/js/gsl-modal-motion.js using the Motion library.
   perspective on .modal gives the dialog's translateZ real depth.
   We kill Bootstrap's default .modal-dialog transform/transition so
   Motion can drive opacity + transform + filter cleanly. */
.modal {
    perspective: 1200px;
}
.modal.fade .modal-dialog {
    transition: none;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
}

/* =====================================================================
   Lab Assistant drawer (no animation)
   =====================================================================
   Bootstrap's default offcanvas transition is killed so the panel snaps
   in and out instantly. No 3D perspective, no Motion handler; previous
   variants felt aggressive. Restore via git history if a calmer design
   is needed later. */
#laPanel {
    transition: none !important;
}

/* Mobile: the Lab Assistant opens fullscreen (the floating toggle still opens
   it; only pinning is desktop-only). Overrides the inline width:460px/92vw. */
@media (max-width: 767.98px) {
    #laPanel {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Below lg the AI usage pill leaves the header and shows in the user menu
   instead (#gslAiMenuWrap). Desktop keeps the pill (JS controls its display). */
@media (max-width: 991.98px) {
    #gslAiPill {
        display: none !important;
    }
}

/* Phones: ranked rows (Top Performers etc.) stack instead of squeezing the
   name/date to ~1ch while the value+button stay fixed-width on the right. */
@media (max-width: 575.98px) {
    .gsl-rank-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.35rem;
    }
    .gsl-rank-row > * {
        width: 100%;
    }
    .gsl-rank-row .text-end {
        text-align: left !important;
    }
    .gsl-rank-row .flex-shrink-0 {
        justify-content: space-between;
    }
}

/* Mobile: page-toolbar actions (single button, form, or Actions dropdown) drop
   to their own line and go full width, instead of squeezing beside the title. */
@media (max-width: 767.98px) {
    .gsl-toolbar-actions {
        width: 100%;
    }
    .gsl-toolbar-actions > .btn,
    .gsl-toolbar-actions > a.btn,
    .gsl-toolbar-actions > form,
    .gsl-toolbar-actions > form > .btn,
    .gsl-toolbar-actions > .d-inline-block,
    .gsl-toolbar-actions > .d-inline-block > .btn {
        width: 100%;
    }
}

/* Mobile: action buttons in card headers stack full width under the title.
   Covers Craft's standard .card-header > .card-toolbar pattern sitewide, plus
   bespoke header rows tagged .gsl-card-headerrow (the title/actions flex row)
   with .gsl-card-actions (the button container). Icon-only buttons (.btn-icon)
   stay compact so button groups / icon toolbars aren't blown up. */
@media (max-width: 767.98px) {
    .card-header { flex-wrap: wrap; row-gap: 0.75rem; }
    .gsl-card-headerrow { flex-direction: column; align-items: stretch !important; }

    .card-header > .card-toolbar,
    .gsl-card-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .card-header > .card-toolbar > .btn:not(.btn-icon),
    .card-header > .card-toolbar > a.btn:not(.btn-icon),
    .card-header > .card-toolbar > form,
    .card-header > .card-toolbar > form > .btn:not(.btn-icon),
    .gsl-card-actions > .btn:not(.btn-icon),
    .gsl-card-actions > a.btn:not(.btn-icon),
    .gsl-card-actions > form,
    .gsl-card-actions > form > .btn:not(.btn-icon) {
        width: 100%;
    }
}

/* Mobile: cap large/extra-large modals to the viewport so modal-lg/modal-xl
   (~800px/1140px) don't overflow a phone. Bootstrap 5 reads --bs-modal-width.
   Part of the mobile-responsive pass (docs/mobile-responsive-audit.md). */
@media (max-width: 575.98px) {
    .modal-lg,
    .modal-xl {
        --bs-modal-width: 94vw;
    }
}

/* ---------------------------------------------------------------------------
   Marketplace (10/09/2026): listing cards, the view-page hero and star ratings.
   Cards are small (4 across on wide screens): image, title, author, stars,
   risk badge, price and a View button. See "Marketplace listing" on
   /admin/ui-patterns.php.
   --------------------------------------------------------------------------- */
.gsl-mp-visual { background: var(--bs-gray-200); display: block; }
.gsl-mp-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Striped tables (28/09/2026, Mike: rows ran hard against the card edge, Open /
   Remove buttons flush right). Keenthemes zeroes padding on the first and last
   cells of every table, which suits plain lists but leaves striped rows with
   their text touching the stripe's edge. Any striped table that does not set
   its own edge gutter (gs-*) gets gs-5's 1.25rem inset; tables with gs-*
   keep theirs. */
.table.table-striped:not([class*=" gs-"]) > :not(caption) > tr > :first-child { padding-left: 1.25rem; }
.table.table-striped:not([class*=" gs-"]) > :not(caption) > tr > :last-child  { padding-right: 1.25rem; }

/* ---------------------------------------------------------------------------
   GSL page spacing model (26/09/2026). Born on the Marketplace view page,
   which Mike called "how our entire site should be": one full-width column,
   cards stacked with a generous gap, body text with a taller line height,
   badges only ever on a line of their own, facts as a label / value list.
   The typography half applies sitewide; the layout half (.gsl-page-stack)
   has been every page's default since 06/10/2026, see the card-gap block.
   --------------------------------------------------------------------------- */

/* Sitewide: body text inside cards breathes. Buttons, badges and form
   controls keep their own line height; tables get taller rows, which is
   the point. */
.card-body .fs-6:not(.btn):not(.badge):not(.form-control):not(.form-select),
.card-body .fs-7:not(.btn):not(.badge):not(.form-control):not(.form-select),
.card-body p { line-height: 1.7; }
.gsl-prose, .gsl-mp-prose { line-height: 1.75; }

/* Section heading (29/09/2026, Mike: too much text, not enough white space).
   A group of cards opens with a plain fs-2 heading; the space above is the
   separator, no colour, no rule. */
.gsl-section-head { margin-top: 3.5rem; margin-bottom: 1.25rem; }
/* A card body always has room under its header (Mike, 29/09/2026: KPI tiles
   sat hard against the header rule). Beats the pt-0 / pt-1 / pt-2 / pt-3
   utilities (all !important) on any body that directly follows a header,
   including one inside a collapse. Flush bodies (pb-0 too, e.g. a table
   edge to edge) keep their zero. */
.card > .card-header + .card-body:is(.pt-0, .pt-1, .pt-2, .pt-3):not(.pb-0),
.card > .card-header + .collapse > .card-body:is(.pt-0, .pt-1, .pt-2, .pt-3):not(.pb-0) {
    padding-top: 1.5rem !important;
}

/* List-page filter buttons (29/09/2026): plain toggles, solid blue when on. */
.btn.gsl-filter-btn.active { background-color: var(--bs-primary) !important; color: #fff !important; }
/* Sitewide since 29/09/2026 (Mike, after the Marketplace trial: "this is how
   the site needs to follow suit"): the page title and section headings in the
   nav's blue (var(--bs-primary)), and 2.5rem of air under the page header.
   Card titles stay gray-700: blue means page / section level only. */
.page-toolbar { margin-bottom: 2.5rem !important; }
.page-toolbar h1 { color: var(--bs-primary) !important; }
.gsl-section-head h2 { color: var(--bs-primary) !important; }
/* The gap between cards (06/10/2026, Mike: "a bigger bottom margin between
   each card", then "if I want it bigger in the future it should be a one
   place CSS style to update"). ONE token, sitewide: every page (main app and
   admin) sits in a .gsl-page-stack by default, a wrapper holding a column of
   cards inside a page (a tab pane, one column of a two-column layout, a form
   around cards) takes .gsl-stack, and an admin .grid of cards uses it too.
   Change the gap here and nowhere else. */
:root { --gsl-card-gap: 1.75rem; }

.gsl-page-stack, .gsl-stack, .gsl-mp-page { display: flex; flex-direction: column; gap: var(--gsl-card-gap); }
/* The gap is the ONLY space between blocks: an mt-* or mb-* left on a block
   can never add to it. A .row keeps its own pull-up (its columns push back
   down by the same gutter), so its content still sits exactly one gap below. */
:is(.gsl-page-stack, .gsl-stack, .gsl-mp-page) > * { margin-top: 0 !important; margin-bottom: 0 !important; }
:is(.gsl-page-stack, .gsl-stack, .gsl-mp-page) > .row { margin-top: calc(-1 * var(--bs-gutter-y)) !important; }
/* A button or an image sitting straight in a stack keeps its own width
   instead of stretching across the column (a flex column stretches every
   child). A block link such as a.card stays full width. */
:is(.gsl-page-stack, .gsl-stack, .gsl-mp-page) > :is(.btn, button, img) { align-self: flex-start; }
/* An active tab pane that is a stack shows as one (Bootstrap sets it block),
   and an empty stack (a JS mount point with nothing in it yet) takes no room,
   so it can never double the gap. */
.tab-content > .active.gsl-stack { display: flex; }
.gsl-stack:empty { display: none; }
/* A row whose columns are stacks (a two-column layout) uses the gap for its
   gutters too: the same space beside the columns as between the cards, and
   the same at the seam when the columns stack on a phone. */
:is(.gsl-page-stack, .gsl-stack) > .row:has(> .gsl-stack) { --bs-gutter-x: var(--gsl-card-gap); --bs-gutter-y: var(--gsl-card-gap); }
/* A caption or footnote that belongs to the block above it (a note under a
   row of KPI tiles) takes .gsl-attach and sits 0.5rem below that block. */
:is(.gsl-page-stack, .gsl-stack) > .gsl-attach { margin-top: calc(0.5rem - var(--gsl-card-gap)) !important; }
/* Inside a stack the gap already sits around every block: add the same again
   ABOVE a section heading and pull it to 1rem from the block it introduces. */
:is(.gsl-page-stack, .gsl-stack) > .gsl-section-head { margin-top: var(--gsl-card-gap) !important; margin-bottom: calc(1rem - var(--gsl-card-gap)) !important; }
.gsl-page-stack > * > .gsl-section-head:first-child { margin-top: var(--gsl-card-gap); }
.gsl-page-stack > .gsl-shelf { margin-top: var(--gsl-card-gap) !important; }
.gsl-shelf-heading { color: var(--bs-primary); }
@media (max-width: 767.98px) {
    .gsl-page-stack .card-body, .gsl-mp-page .card-body { padding: 1.5rem; }
}

/* Glance grid: label / value / sub-line tiles in a row, with vertical air. */
.gsl-glance, .gsl-mp-glance { row-gap: 2rem; }

/* Glance columns: one column per settings group (When it trades / Each
   trade / Daily limits / Account), a dashed divider between columns, the
   chips stacked inside each column under an fs-4 group heading. Stacks
   into rows with a dashed rule between groups on phones. Mike, 27/09/2026,
   on the forward session header: "we need dividers or something and maybe
   four columns". Live: forward session header, preset "How it trades". */
.gsl-glance-cols { display: flex; align-items: stretch; }
.gsl-glance-cols > .gsl-glance-col { flex: 1 1 0; min-width: 0; padding: 0 1.75rem; border-left: 1px dashed var(--bs-gray-300); }
.gsl-glance-cols > .gsl-glance-col:first-child { padding-left: 0; border-left: 0; }
.gsl-glance-cols > .gsl-glance-col:last-child { padding-right: 0; }
.gsl-glance-cols .config-chip { white-space: normal; }
@media (max-width: 767.98px) {
    .gsl-glance-cols { flex-direction: column; }
    .gsl-glance-cols > .gsl-glance-col { padding: 1.5rem 0; border-left: 0; border-top: 1px dashed var(--bs-gray-300); }
    .gsl-glance-cols > .gsl-glance-col:first-child { padding-top: 0; border-top: 0; }
}

/* Definition list: 140px uppercase label, a full sentence beside it, a
   dashed rule between rows. Risk levels and the like are WORDS here, never
   a badge beside a sentence. */
.gsl-dl-row, .gsl-mp-dl-row { display: flex; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px dashed var(--bs-gray-300); }
.gsl-dl-row:first-child, .gsl-mp-dl-row:first-child { padding-top: 0; }
.gsl-dl-row:last-child, .gsl-mp-dl-row:last-child { border-bottom: 0; padding-bottom: 0; }
.gsl-dl-label, .gsl-mp-dl-label { flex: 0 0 140px; font-size: 0.85rem; font-weight: 600; color: var(--bs-gray-500); text-transform: uppercase; letter-spacing: 0.4px; padding-top: 0.2rem; }  /* fs-8 */
.gsl-dl-value, .gsl-mp-dl-value { font-size: 1.075rem; color: var(--bs-gray-700); line-height: 1.7; }  /* fs-6 */
@media (max-width: 575.98px) {
    .gsl-dl-row, .gsl-mp-dl-row { flex-direction: column; gap: 0.25rem; }
    .gsl-dl-label, .gsl-mp-dl-label { flex-basis: auto; }
}

/* Marketplace view page specifics. */
.gsl-mp-hero .gsl-mp-hero-visual { height: 360px; }
@media (max-width: 767.98px) {
    .gsl-mp-hero .gsl-mp-hero-visual { height: 200px; }
}
.gsl-mp-track-toggle .gsl-collapse-chevron { transition: transform .2s ease; }
.gsl-mp-track-toggle.collapsed .gsl-collapse-hide, .gsl-mp-track-toggle:not(.collapsed) .gsl-collapse-show { display: none; }
.gsl-mp-track-toggle:not(.collapsed) .gsl-collapse-chevron { transform: rotate(180deg); }
.gsl-stars { white-space: nowrap; letter-spacing: 1px; }
.gsl-star-on { color: #D4AF37; }
.gsl-star-off { color: var(--bs-gray-300); }
.gsl-rate-star {
    cursor: pointer; background: none; border: 0; padding: 0 2px; line-height: 1;
    font-size: 1.75rem; color: var(--bs-gray-300); transition: color .1s, transform .1s;
}
.gsl-rate-star:hover { transform: scale(1.1); }
.gsl-rate-star.is-on { color: #D4AF37; }

/* Marketplace extras (10/09/2026): team pick badge over the card image. */
.gsl-mp-card { position: relative; }
.gsl-mp-featured { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 2; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }

/* Marketplace shelf (26/09/2026): the Apple TV style poster row. One
   snap-scrolling track, posters 3:2 with the picture filling the card, a
   gradient at the foot carrying title, author, stars, risk badge and price.
   Chevrons page the row and hide when it fits. See "Marketplace shelf" on
   /admin/ui-patterns.php; source templates/partials/marketplace-shelf.php. */
.gsl-shelf-track {
    display: flex; gap: 1rem; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; outline: none;
    padding: 0.5rem 0.25rem 0.75rem; margin: -0.5rem -0.25rem -0.75rem;
}
.gsl-shelf-track::-webkit-scrollbar { display: none; }
.gsl-shelf-item { flex: 0 0 auto; width: 78%; scroll-snap-align: start; }
@media (min-width: 576px)  { .gsl-shelf-item { width: calc((100% - 1rem) / 2); } }
@media (min-width: 992px)  { .gsl-shelf-item { width: calc((100% - 2rem) / 3); } }
@media (min-width: 1400px) { .gsl-shelf-item { width: calc((100% - 3rem) / 4); } }
.gsl-shelf-visual { --bs-aspect-ratio: 66.67%; background: var(--bs-gray-200); }
.gsl-shelf-card {
    position: relative; overflow: hidden; border: 0; color: #fff;
    background: #12121c; border-radius: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gsl-shelf-card:hover,
.gsl-shelf-card:focus-visible {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    color: #fff; z-index: 2;
}
.gsl-shelf-visual .gsl-mp-img { transition: transform 0.5s ease; }
.gsl-shelf-card:hover .gsl-mp-img { transform: scale(1.06); }
/* Dark at the top behind the name and type, clear through the middle so the
   curve reads, dark again at the foot behind the badges and price (03/10/2026). */
.gsl-shelf-fade {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 8, 16, 0.92) 0%, rgba(8, 8, 16, 0.6) 24%, rgba(8, 8, 16, 0) 42%, rgba(8, 8, 16, 0) 48%, rgba(8, 8, 16, 0.82) 68%, rgba(8, 8, 16, 0.96) 100%);
}
.gsl-shelf-head { position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: 0.9rem 1rem 0; }
.gsl-shelf-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0.9rem 1rem; }
.gsl-shelf-title { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.gsl-shelf-meta  { color: rgba(255, 255, 255, 0.85); }
.gsl-shelf-dim   { color: rgba(255, 255, 255, 0.6); }
.gsl-shelf-price { color: #fff; }
.gsl-shelf-card .gsl-star-off { color: rgba(255, 255, 255, 0.3); }
.gsl-shelf-more { background: var(--bs-card-bg); border: 1px dashed var(--bs-gray-300); color: inherit; }
.gsl-shelf-more:hover, .gsl-shelf-more:focus-visible { color: inherit; border-color: var(--bs-primary); }
.gsl-shelf-more-body {
    position: absolute; inset: 0; z-index: 2; padding: 1rem; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gsl-shelf-nav:disabled { opacity: 0.35; }

/* Equity curve widget (03/10/2026): templates/partials/equity-curve.php, data
   from includes/equity_curve.php. One backtest's balance in the admin Growth
   map style: hairline frame, uppercase labels, the line blue above the start
   and red below it, the deepest drawdown shaded, a pulsing latest point and a
   crosshair readout. Plot space is a stretched 1000 x 1000 viewBox, so strokes
   are non-scaling and every dot and label is HTML positioned in percent.
   Canonical render: "Equity curve" on /admin/ui-patterns.php. */
.gsl-eq { border: 1px solid var(--bs-gray-200); border-radius: 0.85rem; background: var(--bs-card-bg, var(--bs-body-bg)); }
.gsl-eq-head { padding: 1.5rem 1.75rem 0; }
.gsl-eq-figure { margin-top: 0.25rem; color: var(--bs-gray-700); }
.gsl-eq-figure.is-up { color: var(--bs-success); }
.gsl-eq-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.85rem; padding: 0.75rem 1.75rem 1.25rem 1.25rem; }
.gsl-eq-yaxis { position: relative; min-width: 2.75rem; }
.gsl-eq-yaxis span, .gsl-eq-xaxis span {
    position: absolute; white-space: nowrap; font-size: 0.85rem; /* fs-8 */
    color: var(--bs-gray-500); font-variant-numeric: tabular-nums;
}
.gsl-eq-yaxis span { right: 0; transform: translateY(-50%); }
.gsl-eq-xaxis { position: relative; height: 1.4rem; margin-top: 0.6rem; }
.gsl-eq-xaxis span { top: 0; transform: translateX(-50%); }
.gsl-eq-plot { position: relative; height: 240px; outline: none; cursor: crosshair; touch-action: pan-y; }
.gsl-eq-plot:focus-visible { box-shadow: 0 0 0 2px var(--bs-primary); border-radius: 4px; }
.gsl-eq-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gsl-eq-plot svg path, .gsl-eq-plot svg line { vector-effect: non-scaling-stroke; }
.gsl-eq-gridline { stroke: var(--bs-gray-200); stroke-width: 1; }
.gsl-eq-gridline.is-zero { stroke: var(--bs-gray-400); }
.gsl-eq-band { fill: var(--bs-danger); fill-opacity: 0.07; }
.gsl-eq-stop-up { stop-color: var(--bs-primary); }
.gsl-eq-stop-down { stop-color: var(--bs-danger); }
.gsl-eq-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.gsl-eq-line.is-up { stroke: var(--bs-primary); }
.gsl-eq-line.is-down { stroke: var(--bs-danger); }
.gsl-eq-ddlabel {
    position: absolute; top: 0; display: flex; align-items: center; gap: 0.4rem; white-space: nowrap;
    font-size: 0.85rem; /* fs-8 */ color: var(--bs-gray-500); pointer-events: none;
}
.gsl-eq-ddlabel::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--bs-danger); opacity: 0.3; }
.gsl-eq-ddlabel.is-end { transform: translateX(-100%); }
/* Kept inside the plot: charts.php sets max-width to the room on the label's side,
   and on a phone the words drop so the figure alone fits (14/10/2026). */
.gsl-eq-ddlabel { overflow: hidden; }
.gsl-eq-ddlabel::before, .gsl-eq-ddfig { flex: none; }
.gsl-eq-ddword { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) { .gsl-eq-ddword { display: none; } }
.gsl-eq-end, .gsl-eq-hover {
    position: absolute; width: 10px; height: 10px; border-radius: 50%; pointer-events: none;
    background: var(--bs-primary); box-shadow: 0 0 0 2px var(--bs-card-bg, var(--bs-body-bg));
    transform: translate(-50%, -50%);
}
.gsl-eq-end.is-down, .gsl-eq-hover.is-down { background: var(--bs-danger); }
.gsl-eq-end::after {
    content: ""; position: absolute; inset: -7px; border-radius: 50%;
    border: 2px solid var(--bs-primary); opacity: 0;
}
.gsl-eq-end.is-down::after { border-color: var(--bs-danger); }
.gsl-eq-cross { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--bs-gray-400); pointer-events: none; }
.gsl-eq-cross, .gsl-eq-hover, .gsl-eq-tip { opacity: 0; transition: opacity 0.12s ease; }
.gsl-eq-plot.is-hovering .gsl-eq-cross,
.gsl-eq-plot.is-hovering .gsl-eq-hover,
.gsl-eq-plot.is-hovering .gsl-eq-tip { opacity: 1; }
.gsl-eq-tip {
    position: absolute; z-index: 3; padding: 0.5rem 0.75rem; border-radius: 0.5rem; white-space: nowrap;
    background: var(--bs-gray-900); color: var(--bs-gray-100); line-height: 1.4; pointer-events: none;
}
.gsl-eq-tip strong { display: block; font-size: 1.15rem; /* fs-5 */ }
.gsl-eq-tip span { display: block; font-size: 0.85rem; /* fs-8 */ opacity: 0.8; }
.gsl-eq-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--bs-gray-200); }
.gsl-eq-stats > div { padding: 1.1rem 1.75rem; display: flex; flex-direction: column; gap: 4px; }
.gsl-eq-stats > div + div { border-left: 1px solid var(--bs-gray-200); }
.gsl-eq-stats .kpi-value { font-size: 1.25rem; /* fs-4 */ color: var(--bs-gray-700); }
@media (prefers-reduced-motion: no-preference) {
    .gsl-eq-data { animation: gslEqReveal 1.2s cubic-bezier(0.33, 1, 0.68, 1) both; }
    .gsl-eq-end { animation: gslEqFade 0.3s ease 1.1s both; }
    .gsl-eq-end::after { animation: gslEqPulse 2.4s ease-out 1.4s infinite; }
    /* A chart a live poll swapped in (/prop-account.php) shows at once: no draw-in every minute. */
    [data-gsl-swapped] .gsl-eq-data, [data-gsl-swapped] .gsl-eq-end { animation: none; }
}
@keyframes gslEqReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes gslEqFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gslEqPulse { 0% { transform: scale(0.4); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (max-width: 767px) {
    /* Four or more day labels (a run under two months) do not fit abreast: every other one. */
    .gsl-eq-xaxis.is-days span:first-child:nth-last-child(n+4) ~ span:nth-child(even) { display: none; }
    /* Seven or more category labels (hours of the day) on a phone: every other one. */
    .gsl-eq-xaxis.is-cats span:first-child:nth-last-child(n+7) ~ span:nth-child(even) { display: none; }
    .gsl-eq-head { padding: 1.25rem 1.25rem 0; }
    .gsl-eq-chart { padding: 0.5rem 1.25rem 1rem 0.75rem; }
    .gsl-eq-plot { height: 190px; }
    .gsl-eq-stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
    .gsl-eq-stats > div { padding: 1rem 1.25rem; }
    .gsl-eq-stats > div:nth-child(odd) { border-left: 0; }
    .gsl-eq-stats > div:nth-child(n+3) { border-top: 1px solid var(--bs-gray-200); }
}

/* Chart family (07/10/2026): includes/charts.php draws every chart in the
   equity curve's markup (gslChartLineHtml for one or several balances,
   gslChartBarsHtml, gslChartSparkHtml); assets/js/gsl-charts.js adds the
   hover. Mike: "All charts on our site need to be like this". */
.gsl-eq.is-bare { border: 0; border-radius: 0; background: transparent; }
.gsl-eq.is-bare .gsl-eq-chart { padding: 0.25rem 0 0; }
.gsl-eq.is-bare .gsl-eq-legend { padding: 0 0 0.5rem; }
.gsl-eq-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; padding: 1.25rem 1.75rem 0; }
.gsl-eq-legend span { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.95rem; /* fs-7 */ color: var(--bs-gray-700); }
/* The series colour is on a swatch; the name stays grey (amber or teal text would not read). */
.gsl-eq-legend i, .gsl-eq-tip i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; background: currentColor; }
.gsl-eq-tip i { margin-right: 0.45rem; vertical-align: middle; }
/* Series colours: the lead (a portfolio's combined line) in ink, then eight. */
.gsl-eq .is-lead { color: var(--bs-gray-900); }
.gsl-eq .is-s1 { color: var(--bs-primary); }
.gsl-eq .is-s2 { color: var(--bs-danger); }
.gsl-eq .is-s3 { color: var(--bs-success); }
.gsl-eq .is-s4 { color: #F6B100; }
.gsl-eq .is-s5 { color: #7239EA; }
.gsl-eq .is-s6 { color: #13C2C2; }
.gsl-eq .is-s7 { color: #D63384; }
.gsl-eq .is-s8 { color: #FD7E14; }
.gsl-eq-line.is-lead, .gsl-eq-line[class*="is-s"] { stroke: currentColor; stroke-width: 1.75; }
.gsl-eq-line.is-lead { stroke-width: 2.75; }
.gsl-eq-hover.is-lead, .gsl-eq-hover[class*="is-s"] { background: currentColor; }
.gsl-eq-tip span span { display: block; font-size: inherit; opacity: 1; }
.gsl-eq-tip i.is-lead { color: var(--bs-gray-100); }
.gsl-eq-marker { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--bs-danger); pointer-events: none; }
.gsl-eq-marker span {
    position: absolute; top: 0; left: 0.35rem; padding: 0.1rem 0.45rem; border-radius: 4px; white-space: nowrap;
    font-size: 0.85rem; /* fs-8 */ color: #fff; background: var(--bs-danger);
}
.gsl-eq-marker.is-end span { left: auto; right: 0.35rem; }
/* Bars: green up, red down, the hovered bar a shade stronger; no crosshair. */
.gsl-eq.is-bars .gsl-eq-plot { cursor: default; }
.gsl-eq-bar { transition: opacity 0.12s ease; }
.gsl-eq-bar.is-up { fill: var(--bs-success); }
.gsl-eq-bar.is-down { fill: var(--bs-danger); }
.gsl-eq-plot.is-hovering .gsl-eq-bar { opacity: 0.55; }
.gsl-eq-plot.is-hovering .gsl-eq-bar.is-active { opacity: 1; }
.gsl-eq-gridline.is-solid { stroke-dasharray: none; }
/* Sparkline: no frame, no axes, a light wash; it fills the box it is given. */
.gsl-spark, .gsl-spark .gsl-eq-plot { position: relative; height: 100%; min-height: inherit; }
.gsl-spark .gsl-eq-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gsl-spark .gsl-eq-plot svg path { vector-effect: non-scaling-stroke; }
.gsl-spark-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gsl-spark-area { fill: currentColor; fill-opacity: 0.1; stroke: none; }
.gsl-spark.is-up { color: var(--bs-success); }
.gsl-spark.is-down { color: var(--bs-danger); }
.gsl-spark.is-flat { color: var(--bs-gray-500); }
.gsl-spark .gsl-eq-hover { background: currentColor; }
/* Value charts (gslChartValuesHtml): a shaded range, dashed lines, dots by sign,
   click-through. The muted tone is the range and the "typical" line. */
.gsl-eq .is-muted, .gsl-eq .is-range { color: var(--bs-gray-500); }
.gsl-eq-range { fill: currentColor; fill-opacity: 0.16; stroke: none; }
[data-bs-theme="dark"] .gsl-eq-range { fill-opacity: 0.26; }
.gsl-eq-legend i.is-range { height: 10px; opacity: 0.45; }
.gsl-eq-tip i.is-range { height: 8px; }
.gsl-eq-line.is-muted { stroke: currentColor; stroke-width: 1.75; }
.gsl-eq-line.is-dash { stroke-dasharray: 5 5; }
.gsl-eq.is-values .gsl-eq-line.is-s1 { stroke-width: 2.5; }
.gsl-eq.is-tall .gsl-eq-plot { height: 320px; }
@media (max-width: 767px) { .gsl-eq.is-tall .gsl-eq-plot { height: 240px; } }
.gsl-eq-hover.is-muted { background: currentColor; }
.gsl-eq-dot {
    position: absolute; width: 10px; height: 10px; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 0 2px var(--bs-card-bg, var(--bs-body-bg)); transform: translate(-50%, -50%);
}
.gsl-eq-dot.is-up { background: var(--bs-success); }
.gsl-eq-dot.is-down { background: var(--bs-danger); }
.gsl-eq-plot.has-links { cursor: pointer; }
.gsl-eq-tip span.is-hint { opacity: 0.65; margin-top: 0.15rem; }
.gsl-eq-xcaption { margin-top: 0.15rem; text-align: right; font-size: 0.85rem; /* fs-8 */ color: var(--bs-gray-500); }
/* Phase 3 (07/10/2026): counts and callouts. A wash under a line, a callout
   on one point ("peak 12"), one-colour bars for counts with highlighted ones
   labelled, a dashed reference line, and charts with no value axis. */
.gsl-eq-wash { fill: currentColor; fill-opacity: 0.1; stroke: none; }
.gsl-eq-flag {
    position: absolute; transform: translate(-50%, calc(-100% - 8px)); white-space: nowrap; pointer-events: none;
    font-size: 0.85rem; /* fs-8 */ font-weight: 700; color: var(--bs-gray-700);
}
.gsl-eq-flag.is-end { transform: translate(-100%, calc(-100% - 8px)); }
.gsl-eq-flag.is-start { transform: translate(0, calc(-100% - 8px)); }
.gsl-eq.has-flags .gsl-eq-chart { padding-top: 1.75rem; }
.gsl-eq-bar.is-neutral { fill: var(--bs-primary); fill-opacity: 0.55; }
.gsl-eq-bar.is-neutral.is-hot { fill-opacity: 1; }
.gsl-eq-barlabel {
    position: absolute; transform: translate(-50%, calc(-100% - 4px)); white-space: nowrap; pointer-events: none;
    font-size: 0.85rem; /* fs-8 */ font-weight: 700; color: var(--bs-gray-700);
}
.gsl-eq-ref { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--bs-gray-500); pointer-events: none; }
.gsl-eq-ref span {
    position: absolute; right: 0; bottom: 0.25rem; padding: 0 0.3rem;
    font-size: 0.85rem; /* fs-8 */ color: var(--bs-gray-500); background: var(--bs-card-bg, var(--bs-body-bg));
}
.gsl-eq.no-yaxis .gsl-eq-chart { grid-template-columns: 0 minmax(0, 1fr); column-gap: 0; }
.gsl-eq.no-yaxis .gsl-eq-yaxis { visibility: hidden; min-width: 0; }

/* Session candle chart in the chart family (assets/js/gsl-candles.js,
   templates/partials/session-candle-chart.php). Mike chose it over the
   ApexCharts chart on 08/10/2026. */
.gsl-cv-plot { height: 380px; cursor: crosshair; touch-action: pan-y; user-select: none; }
/* Drag to zoom is a mouse gesture: no hint where there is no mouse. */
@media (hover: none) { .gsl-cv-hint { display: none; } }
/* It redraws on every toggle and zoom: no draw-in animation. */
.gsl-cv .gsl-eq-data { animation: none; }
@media (max-width: 767px) { .gsl-cv-plot { height: 300px; } }
.gsl-cv-wick { fill: none; stroke-width: 1; }
.gsl-cv-wick.is-up { stroke: var(--bs-success); }
.gsl-cv-wick.is-down { stroke: var(--bs-danger); }
.gsl-cv-body.is-up { fill: var(--bs-success); }
.gsl-cv-body.is-down { fill: var(--bs-danger); }
.gsl-cv-box { fill: #7239EA; fill-opacity: 0.06; }
.gsl-cv-zone { fill-opacity: 0.12; stroke: none; }
.gsl-cv-zone.is-up { fill: var(--bs-success); }
.gsl-cv-zone.is-down { fill: var(--bs-danger); }
.gsl-cv-zone.is-mitigated { fill-opacity: 0.05; }
.gsl-cv-zone.is-market { fill-opacity: 0.06; }
.gsl-cv-band { fill: none; stroke-width: 2; }
.gsl-cv-band.is-up { stroke: var(--bs-primary); }
.gsl-cv-band.is-down { stroke: var(--bs-danger); }
.gsl-cv-band.is-market { stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.6; }
.gsl-cv-hline { position: absolute; left: 0; right: 0; border-top: 1px solid currentColor; pointer-events: none; }
.gsl-cv-hline.is-dashed { border-top-style: dashed; }
.gsl-cv-hline.is-round { border-top: 1px dotted var(--bs-gray-300); }
.gsl-cv-plot .is-box { color: #7239EA; }
.gsl-cv-plot .is-entry { color: var(--bs-primary); }
.gsl-cv-plot .is-closed, .gsl-cv-plot .is-level { color: var(--bs-gray-500); }
.gsl-cv-plot .is-up { color: var(--bs-success); }
.gsl-cv-plot .is-down { color: var(--bs-danger); }
.gsl-cv-plot .is-anchor { color: #F6B100; }
.gsl-cv-plot .is-band-up { color: var(--bs-primary); }
/* Tags down the right edge: white text on the line's colour. */
.gsl-cv-tag {
    position: absolute; right: 0.25rem; transform: translateY(-50%); z-index: 2; pointer-events: none; white-space: nowrap;
    padding: 0.05rem 0.4rem; border-radius: 4px; font-size: 0.85rem; /* fs-8 */ font-weight: 600; line-height: 1.5; color: #fff;
}
.gsl-cv-tag.t-box { background: #7239EA; }
.gsl-cv-tag.t-entry { background: var(--bs-primary); }
.gsl-cv-tag.t-closed, .gsl-cv-tag.t-level { background: var(--bs-gray-600); }
.gsl-cv-tag.t-up { background: var(--bs-success); }
.gsl-cv-tag.t-down { background: var(--bs-danger); }
.gsl-cv-tag.t-anchor { background: #F6B100; }
.gsl-cv-tag.is-soft { opacity: 0.8; }
/* The tags sit in a gutter right of the plot, so they never cover the latest
   candles: the whole label from 1200px, below that a short code and the price
   (BH 4,095.04, E, SL, TP, X for exit); the full label is the tag's title. */
.gsl-cv .gsl-eq.is-bare .gsl-eq-chart { padding-right: 225px; }
.gsl-cv-tag { right: auto; left: calc(100% + 8px); max-width: 215px; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; cursor: default; }
.gsl-cv-tag-code { display: none; }
@media (max-width: 1199.98px) {
    .gsl-cv .gsl-eq.is-bare .gsl-eq-chart { padding-right: 92px; }
    .gsl-cv-tag { left: calc(100% + 4px); max-width: 88px; padding: 0.05rem 0.25rem; font-size: 0.75rem; }
    .gsl-cv-tag.has-price .gsl-cv-tag-name { display: none; }
    .gsl-cv-tag-code { display: inline; }
}
.gsl-cv-mark {
    position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); z-index: 2; pointer-events: none;
    --cv-tone: var(--bs-gray-600); background: var(--cv-tone); box-shadow: 0 0 0 2px var(--bs-card-bg, var(--bs-body-bg));
}
.gsl-cv-mark.is-up { --cv-tone: var(--bs-success); }
.gsl-cv-mark.is-down { --cv-tone: var(--bs-danger); }
.gsl-cv-mark.is-band-up { --cv-tone: var(--bs-primary); }
.gsl-cv-mark.is-square { border-radius: 2px; }
/* Marker labels: small pills in the marker's colour, like the tags. */
.gsl-cv-mark > span {
    position: absolute; left: 50%; bottom: calc(100% + 5px); transform: translateX(-50%); white-space: nowrap;
    padding: 0 0.35rem; border-radius: 4px; font-size: 0.85rem; /* fs-8 */ font-weight: 600; line-height: 1.5;
    color: #fff; background: var(--cv-tone);
}
.gsl-cv-select { position: absolute; top: 0; bottom: 0; display: none; background: var(--bs-primary); opacity: 0.12; pointer-events: none; }
.gsl-cv-plot .gsl-eq-tip span span.is-up { color: var(--gsl-success-inverse); }
.gsl-cv-plot .gsl-eq-tip span span.is-down { color: #F8285A; }
.gsl-cv-swatch { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: currentColor; }
.gsl-cv-swatch.is-box { color: #7239EA; }
.gsl-cv-swatch.is-trades { color: var(--bs-primary); }
.gsl-cv-swatch.is-anchor { color: #F6B100; }
.gsl-cv-swatch.is-rounds, .gsl-cv-swatch.is-levels { color: var(--bs-gray-500); }
.gsl-cv-swatch.is-band { color: var(--bs-primary); }
.gsl-cv-swatch.is-signals { color: var(--bs-danger); }
.gsl-cv-swatch.is-zones { color: var(--bs-warning); }
.gsl-cv-swatch.is-market { color: var(--bs-info); }
.btn-primary .gsl-cv-swatch { color: #fff; }

/* Dashboard hero (13/10/2026, Mike: "like Apple TV"): one slide at a time,
   rotating by itself, dots beneath, arrows at the sides on hover. Markup in
   templates/partials/dashboard-hero.php, pattern on /admin/ui-patterns.php. */
.gsl-hero .carousel { position: relative; }
.gsl-hero-slide { display: flex; align-items: center; gap: 2rem; padding: 2.5rem 4.5rem 3.25rem; min-height: 220px; }
.gsl-hero-words { flex: 1 1 auto; max-width: 720px; }
.gsl-hero-title { font-size: 2rem; line-height: 1.2; }
.gsl-hero-media { flex: 0 0 38%; }
.gsl-hero-media img { width: 100%; height: auto; border-radius: 0.75rem; display: block; }
.gsl-hero-dots { position: absolute; bottom: 0.9rem; margin: 0; }
.gsl-hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--bs-gray-400); border: 0; opacity: 1; }
.gsl-hero-dots button.active { background: var(--bs-primary); }
.gsl-hero-arrow { width: 3.5rem; opacity: 0; transition: opacity 0.2s; }
.gsl-hero-arrow i { color: var(--bs-gray-700); }
.gsl-hero:hover .gsl-hero-arrow, .gsl-hero-arrow:focus-visible { opacity: 1; }
@media (max-width: 767.98px) {
    .gsl-hero-slide { flex-direction: column; align-items: flex-start; padding: 1.75rem 1.25rem 2.75rem; min-height: 0; }
    .gsl-hero-title { font-size: 1.5rem; }
    .gsl-hero-media { flex-basis: auto; width: 100%; }
    .gsl-hero-arrow { display: none; }
}
