/* ===================================================
   ByteTrader Portal – Global Custom Styles
   =================================================== */

/* Fully hide the native Blazor Server reconnect modal — reconnection is handled
   silently/fast via wwwroot/js/blazor-reconnect.js (manual Blazor.start with
   maxRetries + 0ms interval). */
#components-reconnect-modal {
    display: none !important;
}

/* --- MudText Color.Secondary override ---
   The Secondary brand color (#FF4DA6 pink) is reserved for buttons, chips, and badges.
   MudText using Color.Secondary is typically descriptive/subtitle text and should
   render as muted TextSecondary instead of brand pink. Buttons/Chips have their own
   classes (mud-button-* / mud-chip-*) so they keep the pink. */
.mud-typography.mud-secondary-text,
p.mud-typography.mud-secondary-text,
span.mud-typography.mud-secondary-text,
h1.mud-typography.mud-secondary-text,
h2.mud-typography.mud-secondary-text,
h3.mud-typography.mud-secondary-text,
h4.mud-typography.mud-secondary-text,
h5.mud-typography.mud-secondary-text,
h6.mud-typography.mud-secondary-text {
    color: var(--mud-palette-text-secondary) !important;
}


/* --- Screen-reader-only text (e.g. section headings that keep the page
   outline correct without adding visible chrome) --- */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Page heading focus ---
   FocusOnNavigate (Routes.razor) moves focus to each page's h1 so screen readers
   announce the new page. The heading is not a control, so it needs no focus ring;
   phone browsers otherwise draw one around the whole hero heading. */
h1[tabindex="-1"]:focus {
    outline: none;
}

/* --- Gradient text utility --- */
.gradient-text {
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- AI spotlight: full-width hero band on Home + Features ---
   A full-bleed section (not a card) — 135° gradient base + soft corner blobs,
   the same hero language used by .hero-section / .cta-banner. */
.ai-band {
    position: relative;
    overflow: hidden;
    padding: 40px 0 88px;
    border-top: 1px solid var(--mud-palette-lines-default);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
}

.ai-band > * { position: relative; z-index: 1; }

/* Example "prompt" quote inside the AI band — spaced well clear of the CTA. */
.ai-prompt {
    border-left: 3px solid var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 9%, transparent);
    border-radius: 0 10px 10px 0;
    padding: 12px 18px;
    margin: 20px 0 52px;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--mud-palette-text-secondary);
}

/* --- AI control "terminal" — JS-driven working transcript (ai-transcript.js) --- */
.ai-term {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    background: var(--mud-palette-surface);
    overflow: hidden;
    box-shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.55);
}
.ai-term__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface));
}
.ai-term__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mud-palette-lines-default);
}
.ai-term__title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    font-size: 0.72rem;
    letter-spacing: 1.2px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}
.ai-term__title svg {
    width: 14px;
    height: 14px;
    color: var(--mud-palette-primary);
}
.ai-term__body {
    position: relative;
    padding: 16px 20px 18px;
    max-height: 440px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--mud-palette-primary) 38%, transparent) transparent;
    scroll-behavior: smooth;
}
.ai-term__body::-webkit-scrollbar { width: 8px; }
.ai-term__body::-webkit-scrollbar-track { background: transparent; }
.ai-term__body::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--mud-palette-primary) 32%, transparent);
    border-radius: 4px;
}
.ai-term__body::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 50%, transparent);
}

/* Typed prompt */
.ai-term__prompt {
    border-left: 3px solid var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 9%, transparent);
    border-radius: 0 10px 10px 0;
    padding: 10px 14px;
    margin-bottom: 14px;
    min-height: calc(1.5em * 2 + 20px);
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
    color: var(--mud-palette-text-secondary);
}
.ai-term__you {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 8px;
    border-radius: 20px;
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
    color: var(--mud-palette-primary);
    vertical-align: middle;
}
.ai-term__caret {
    display: none; /* shown by JS only while typing */
    width: 7px;
    height: 1.05em;
    vertical-align: text-bottom;
    margin-left: 2px;
    border-radius: 1px;
    background: var(--mud-palette-primary);
    animation: aiCaret 1s steps(1) infinite;
}
@keyframes aiCaret { 50% { opacity: 0; } }

/* Working indicator */
.ai-term__thinking {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 4px;
    font-size: 0.82rem;
    color: var(--mud-palette-text-secondary);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .3s ease, transform .3s ease;
}
.ai-term__thinking.is-visible { opacity: 1; transform: none; }
.ai-term__spinner {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--mud-palette-primary) 28%, transparent);
    border-top-color: var(--mud-palette-primary);
    animation: aiSpin .7s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-term__dots i { animation: aiBlink 1.4s infinite both; }
.ai-term__dots i:nth-child(2) { animation-delay: .2s; }
.ai-term__dots i:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* Phases + step lines — visible by default (no-JS fallback); the JS sets the
   [data-ai-anim] attribute on the root to hide them, then reveals each with
   .is-visible.  NOTE: this MUST be a data-attribute, not a class — Blazor owns
   the root's `class` attribute and rewrites it on any re-render (theme toggle,
   breakpoint cascade), which would silently strip a JS-added class and un-gate
   the whole transcript mid-animation.  Blazor leaves unmanaged data-attrs alone. */
.ai-term__phase {
    margin: 16px 0 4px;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.66rem;
    color: var(--mud-palette-primary);
    transition: opacity .35s ease, transform .35s ease;
}
.ai-term__line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--mud-palette-text-primary);
    transition: opacity .35s ease, transform .35s ease;
}
.ai-term[data-ai-anim] .ai-term__phase,
.ai-term[data-ai-anim] .ai-term__line {
    opacity: 0;
    transform: translateY(4px);
}
.ai-term[data-ai-anim] .ai-term__phase.is-visible,
.ai-term[data-ai-anim] .ai-term__line.is-visible {
    opacity: 1;
    transform: none;
}
.ai-term__line code {
    font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 0.82em;
    padding: 1px 5px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-text-primary);
}
.ai-term__status {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}
.ai-term__status.is-spinner {
    border: 2px solid color-mix(in srgb, var(--mud-palette-primary) 28%, transparent);
    border-top-color: var(--mud-palette-primary);
    color: transparent;
    animation: aiSpin .7s linear infinite;
}
.ai-term__status.is-ok { background: var(--mud-palette-success); }
.ai-term__status.is-error { background: var(--mud-palette-warning); }

.ai-term__done {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--mud-palette-lines-default);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    transition: opacity .35s ease, transform .35s ease;
}
.ai-term[data-ai-anim] .ai-term__done { opacity: 0; transform: translateY(4px); }
.ai-term[data-ai-anim] .ai-term__done.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .ai-term__caret,
    .ai-term__spinner,
    .ai-term__status.is-spinner,
    .ai-term__dots i { animation: none; }
}

/* --- Monospace "data" eyebrow (pro-terminal accent) --- */
.mono-eyebrow {
    font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace !important;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.mono-eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--mud-palette-primary);
    border-radius: 1px;
}

/* --- Hero: simulated BTDashboard window (dashboard-sim.js) --- */
/* Replicates BTDashboard's real MudBlazor theme. Light values are the default;
   `.bts-dark` (toggled from _isDarkMode) swaps in the dark palette so the "live
   app" matches whichever theme the marketing site is in. Mirrors PaletteLight /
   PaletteDark in DashboardLayout.razor. Sans-serif (Segoe UI/Roboto) — the app
   is NOT monospace. Semantic success/error are shared across both themes. */
/* Scale-to-fit wrapper for the BTDashboard sims. The sim renders at a fixed
   design width (set by sim-fit.js from data-sim-w) and is uniformly scaled to
   fill this responsive wrapper — so on narrow screens the whole sim shrinks
   instead of its internal panels squishing. */
/* min-width:0 lets the wrapper shrink below the design-width sim's content size
   when it sits inside a flex container (e.g. the hero's d-flex MudItem) —
   otherwise it measures the full design width and never scales down. */
.sim-fit { width: 100%; min-width: 0; overflow: hidden; }

.bt-sim {
    /* light (default) — mirrors PaletteLight */
    --bts-bg: #EAE4F5;
    --bts-surface: #FFFFFF;
    --bts-gray: #F5F5F5; /* neutral — MudBlazor PaletteLight default BackgroundGray (not purple) */
    --bts-primary: #7C3AED;
    --bts-secondary: #E63F8A;
    --bts-text: #2D2040;
    --bts-text2: #6B6183;
    --bts-lines: rgba(45, 32, 64, 0.13);
    --bts-success: #26A69A;
    --bts-error: #EF5350;
    --bts-shadow: 0 22px 54px -32px rgba(45, 32, 64, 0.45);
    width: 100%;
    border: 1px solid var(--bts-lines);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bts-bg);
    color: var(--bts-text);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: var(--bts-shadow);
    user-select: none;
}
.bt-sim.bts-dark {
    --bts-bg: #08080A;
    --bts-surface: #111114;
    --bts-gray: #0C0C0F;
    --bts-primary: #8B5CF6;
    --bts-text: #CBCAE3;
    --bts-text2: #8B89A7;
    --bts-lines: rgba(203, 202, 227, 0.10);
    --bts-shadow: 0 28px 70px -34px rgba(0, 0, 0, 0.78);
}
.bt-sim svg.bts-ic { width: 16px; height: 16px; fill: currentColor; display: block; flex: 0 0 auto; }

/* App bar */
.bts-appbar {
    display: flex; align-items: center; gap: 10px;
    height: 34px; padding: 0 11px;
    background: var(--bts-surface); /* BTDashboard .dock-menubar = surface */
    border-bottom: 1px solid var(--bts-lines);
}
.bts-logo { width: 15px; height: 19px; display: block; }
.bts-brand { font-weight: 700; font-size: 12.5px; color: var(--bts-text); }
.bts-menu { display: flex; gap: 14px; color: var(--bts-text2); }
.bts-appbar-right { margin-left: auto; display: flex; align-items: center; gap: 11px; color: var(--bts-text2); }

/* Body = rail + main */
.bts-body { display: flex; }
.bts-rail {
    width: 38px; flex: 0 0 38px;
    background: var(--bts-surface);
    border-right: 1px solid var(--bts-lines);
    display: flex; flex-direction: column; align-items: center;
    padding: 7px 0; gap: 3px;
}
.bts-railitem {
    width: 30px; height: 30px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--bts-text2);
}
.bts-railitem.is-active { color: var(--bts-primary); background: color-mix(in srgb, var(--bts-primary) 18%, transparent); }
.bts-railspacer { flex: 1; }

.bts-main { flex: 1; min-width: 0; background: var(--bts-surface); display: flex; flex-direction: column; }

/* Panel tab row */
.bts-tabs { display: flex; height: 28px; background: var(--bts-gray); border-bottom: 1px solid var(--bts-lines); }
.bts-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 0 12px; font-size: 11.5px; color: var(--bts-text2);
    border-right: 1px solid var(--bts-lines);
}
.bts-tab.is-active {
    color: var(--bts-text); background: var(--bts-surface);
    border-bottom: 2px solid var(--bts-primary); margin-bottom: -1px;
}
.bts-tab svg.bts-ic { width: 13px; height: 13px; }

/* Welcome content */
.bts-content { padding: 15px 16px 13px; }
.bts-welcome { font-size: 17px; font-weight: 600; color: var(--bts-text); margin-bottom: 13px; }
.bts-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.bts-stat { border: 1px solid var(--bts-lines); border-radius: 6px; padding: 10px 4px; text-align: center; }
.bts-stat svg.bts-ic { width: 17px; height: 17px; margin: 0 auto 4px; color: var(--bts-primary); }
.bts-stat-num { font-size: 17px; font-weight: 700; color: var(--bts-text); line-height: 1.05; }
.bts-stat-lbl { font-size: 9px; color: var(--bts-text2); margin-top: 3px; }

/* Trading agents table */
.bts-sectlbl { font-size: 12.5px; font-weight: 600; color: var(--bts-text); margin-bottom: 7px; }
.bts-thead, .bts-arow { display: grid; grid-template-columns: 1fr 74px 86px 70px; gap: 8px; align-items: center; }
.bts-thead {
    font-size: 9px; text-transform: uppercase; letter-spacing: .4px;
    color: var(--bts-text2); padding: 0 8px 6px; border-bottom: 1px solid var(--bts-lines);
}
.bts-arow { padding: 9px 8px; border-bottom: 1px solid var(--bts-lines); }
.bts-aname { font-weight: 600; color: var(--bts-text); font-size: 12px; }
.bts-atype { font-size: 9.5px; color: var(--bts-text2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bts-status {
    display: inline-flex; align-items: center; gap: 5px; justify-self: start;
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 11px;
    background: color-mix(in srgb, var(--bts-success) 16%, transparent); color: var(--bts-success);
}
.bts-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bts-success); animation: btSimPulse 1.8s infinite; }
.bts-bal { font-weight: 600; color: var(--bts-text); text-align: right; font-size: 11.5px; }
.bts-pnl { font-weight: 700; color: var(--bts-success); text-align: right; font-size: 11.5px; }
.bts-pnl.neg { color: var(--bts-error); }
.bts-trades-flash { animation: btTradeFlash .6s ease; }

/* Status bar */
.bts-statusbar {
    display: flex; align-items: center; gap: 13px;
    height: 19px; padding: 0 10px;
    background: var(--bts-primary); color: #fff; font-size: 10px;
}
.bts-statusbar .sb-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.bts-statusbar .sb-sep { opacity: .5; }
.bts-statusbar .sb-right { margin-left: auto; }

@keyframes btSimPulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bts-success) 55%, transparent); }
    70% { box-shadow: 0 0 0 5px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes btTradeFlash { 0% { color: var(--bts-primary); } 100% { color: var(--bts-text); } }

@media (prefers-reduced-motion: reduce) {
    .bts-status .dot { animation: none; }
}

/* --- "See it live" showcase: floating BTDashboard panels with depth --- */
.live-showcase { padding: 84px 0; overflow: hidden; }
.live-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin: 26px 0 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 11px;
    background: var(--mud-palette-surface);
}
.live-tab {
    padding: 8px 18px;
    border: none;
    border-radius: 7px;
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: color .2s, background .2s;
}
.live-tab:hover { color: var(--mud-palette-text-primary); }
.live-tab.is-active { color: #fff; background: var(--mud-palette-primary); }

.live-stage { position: relative; height: 500px; margin-top: 18px; }
.live-panel {
    position: absolute;
    top: 12px;
    left: 50%;
    width: min(640px, 100%);
    transform: translateX(-50%);
    transition: transform .55s cubic-bezier(.4, 0, .2, 1), opacity .55s ease, filter .55s ease;
}
.live-panel .bt-sim { height: 440px; display: flex; flex-direction: column; }
.live-panel .bts-body { flex: 1; min-height: 0; }
.live-panel .bts-main { min-height: 0; }
.live-panel.is-front { z-index: 3; opacity: 1; filter: none; }
.live-panel.is-back1 {
    z-index: 2; opacity: .5; filter: blur(2px) saturate(.85);
    transform: translateX(-50%) translate(12%, 8%) scale(.93);
    pointer-events: none;
}
.live-panel.is-back2 {
    z-index: 1; opacity: .32; filter: blur(3px) saturate(.75);
    transform: translateX(-50%) translate(-13%, 14%) scale(.88);
    pointer-events: none;
}
/* Panels beyond the 3-card depth stack (front + back1 + back2) are hidden
   until they rotate into view — prevents extras piling onto the back slot. */
.live-panel.is-hidden { opacity: 0; pointer-events: none; }

/* Charts Pro panel content */
.bts-chart-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 10px 12px 8px; }
.bts-chart-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.bts-chart-sym { font-weight: 700; font-size: 13px; color: var(--bts-text); }
.bts-chart-tf {
    font-size: 10px; padding: 1px 6px; border-radius: 3px;
    background: color-mix(in srgb, var(--bts-primary) 12%, transparent); color: var(--bts-primary);
}
.bts-chart-ohlc { font-size: 10px; color: var(--bts-text2); }
.bts-chart-ohlc b { color: var(--bts-text); font-weight: 600; }
.bts-chart-last { margin-left: auto; font-weight: 700; font-size: 13px; }
.bts-candles { flex: 1; min-height: 0; width: 100%; height: 100%; }

/* Strategy Editor panel content */
.bts-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.bts-code {
    flex: 1; min-height: 0; overflow: hidden;
    padding: 10px 14px;
    font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 11px; line-height: 1.55;
}
/* pre on the line (preserve indentation) — NOT the container, or the source's
   inter-line newlines render as blank rows. */
.bts-code .cl { display: block; white-space: pre; }
.bts-code .ln { display: inline-block; width: 22px; color: var(--bts-text2); opacity: .55; user-select: none; }
.bts-kw { color: #C586C0; }
.bts-ty { color: #2AA198; }
.bts-fn { color: #4C8DBE; }
.bts-cm { color: #6A9955; }
.bts-str { color: #CE9178; }
.bts-caret2 {
    display: inline-block; width: 6px; height: 1em; margin-left: 1px; vertical-align: -2px;
    background: var(--bts-primary); animation: aiCaret 1s steps(1) infinite;
}
.bts-build {
    border-top: 1px solid var(--bts-lines);
    padding: 7px 14px; font-size: 11px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}
.bts-build.ok { color: var(--bts-success); }
.bts-build.building { color: var(--bts-text2); }
.bts-build .spin {
    display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: -1px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--bts-text2) 40%, transparent);
    border-top-color: var(--bts-primary);
    animation: aiSpin .7s linear infinite;
}

/* Agent Control panel content */
.bts-agent { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; gap: 11px; }
.bts-agent-head { display: flex; align-items: center; gap: 9px; }
.bts-agent-name { font-weight: 700; font-size: 13px; color: var(--bts-text); }
.bts-agent-btns { margin-left: auto; display: flex; gap: 6px; }
.bts-btn {
    font-size: 10px; padding: 3px 9px; border-radius: 5px;
    border: 1px solid var(--bts-lines); color: var(--bts-text2);
}
.bts-equity { font-size: 19px; font-weight: 700; color: var(--bts-text); line-height: 1.1; }
.bts-equity-lbl { font-size: 10px; color: var(--bts-text2); margin-top: 2px; }
.bts-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.bts-chip {
    font-size: 10px; padding: 2px 9px; border-radius: 11px;
    background: color-mix(in srgb, var(--bts-primary) 14%, transparent); color: var(--bts-primary); font-weight: 600;
}
.bts-log {
    flex: 1; min-height: 0; overflow: hidden;
    border-top: 1px solid var(--bts-lines); padding-top: 8px;
    display: flex; flex-direction: column; gap: 3px;
    font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace; font-size: 10.5px;
}
.bts-logrow { display: flex; gap: 8px; align-items: baseline; }
.bts-logrow .t { color: var(--bts-text2); flex: 0 0 auto; }
.bts-logrow .tag { font-weight: 700; flex: 0 0 46px; }
.bts-logrow .tag.buy { color: var(--bts-success); }
.bts-logrow .tag.sell { color: var(--bts-error); }
.bts-logrow .tag.sig { color: var(--bts-primary); }
.bts-logrow .tag.info { color: var(--bts-text2); }
.bts-logrow .m { color: var(--bts-text); }

/* Market Data panel — order book (depth ladder) + time & sales (tape).
   Mirrors BTDashboard OrderBookPanel / TimeAndSalesPanel. Green/red are the
   shared candlestick semantics (--bts-success / --bts-error). */
.bts-mk { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.bts-mk-head {
    display: flex; align-items: baseline; gap: 8px;
    padding: 7px 11px; border-bottom: 1px solid var(--bts-lines);
    font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.bts-mk-sym { font-weight: 700; color: var(--bts-text); }
.bts-mk-last { font-weight: 700; color: var(--bts-success); }
.bts-mk-q { color: var(--bts-text2); }
.bts-mk-q .bid { color: var(--bts-success); }
.bts-mk-q .ask { color: var(--bts-error); }
.bts-mk-meta { margin-left: auto; color: var(--bts-text2); font-size: 10px; }
.bts-mk-cols { flex: 1; display: flex; min-height: 0; }
.bts-mk-ob { flex: 1; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--bts-lines); }
.bts-mk-ts { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bts-mk-coltitle {
    font-size: 8.5px; text-transform: uppercase; letter-spacing: .4px;
    color: var(--bts-text2); padding: 6px 11px 5px; border-bottom: 1px solid var(--bts-lines);
}
/* depth ladder */
.bts-ob { flex: 1; min-height: 0; overflow: hidden; padding: 2px 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.bts-ob-row { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; height: 17px; padding: 0 11px; }
.bts-ob-bar { position: absolute; top: 1px; bottom: 1px; left: 50%; transform: translateX(-50%); border-radius: 2px; opacity: 0.16; pointer-events: none; }
.bts-ob-row.ask .bts-ob-bar { background: var(--bts-error); }
.bts-ob-row.bid .bts-ob-bar { background: var(--bts-success); }
.bts-ob-row.best.ask { background: color-mix(in srgb, var(--bts-error) 12%, transparent); }
.bts-ob-row.best.bid { background: color-mix(in srgb, var(--bts-success) 12%, transparent); }
.bts-ob .px { position: relative; z-index: 1; text-align: center; }
.bts-ob-row.ask .px { color: var(--bts-error); }
.bts-ob-row.bid .px { color: var(--bts-success); }
.bts-ob .sz { position: relative; z-index: 1; text-align: right; color: var(--bts-text2); }
/* time & sales tape */
.bts-ts { flex: 1; min-height: 0; overflow: hidden; font-size: 11px; font-variant-numeric: tabular-nums; }
.bts-ts-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 1.5px 11px; }
.bts-ts-row .t { color: var(--bts-text2); }
.bts-ts-row .p { text-align: right; }
.bts-ts-row .s { text-align: right; color: var(--bts-text2); }
.bts-ts-row.buy .p { color: var(--bts-success); }
.bts-ts-row.sell .p { color: var(--bts-error); }

@media (max-width: 600px) {
    .live-panel.is-back1, .live-panel.is-back2 { opacity: 0; }
}

/* Wider HORIZONTAL gutter for two-column marketing sections (md+ only, when the
   columns are side by side). Overrides just the horizontal half of MudGrid's
   gutter — leaves the vertical/negative-top-margin alone so nothing shifts up
   into the heading above. Stacks normally (no extra gap) below md. */
@media (min-width: 960px) {
    .cols-gap {
        width: calc(100% + 72px) !important;
        margin-left: -72px !important;
    }
    .cols-gap > .mud-grid-item {
        padding-left: 72px !important;
    }
}

/* --- Hero section --- */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0 60px;
}

/* Hero ambient gradient — RESTORED to the original soft corner wash.
   Two subtle radial blobs (primary top-left, secondary bottom-right),
   exactly as it was before modernization. */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(217, 65, 217, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* ===========================================================
   Subtle moving glass-sheen reflection (marketing pages)
   Two broad, soft diagonal light bands that slowly glide across the
   whole page — like a reflection drifting over a pane of glass. Spans
   the full scrollable page, sits behind content (z-index 0), scrolls
   with content. Content lifts above via the :not() rule below.
   =========================================================== */
.marketing-page { position: relative; }
.marketing-page > *:not(.glass-reflection) {
    position: relative;
    z-index: 1;
}

.glass-reflection {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Two oversized diagonal sheen bands. Oversized + offset so a drifting
   band never exposes a hard edge. */
.glass-reflection::before,
.glass-reflection::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    will-change: transform;
}

/* NEUTRAL glass sheen — NO theme color. The bands are a soft neutral
   light/gray so they read as a clear reflection gliding over glass, not a
   colored gradient washing the page. Keeps the content background visually
   clean (no violet/magenta spill). */
/* Light theme: a faint neutral band (reads as a soft moving sheen/shadow
   on the near-white surface). */
.glass-reflection::before {
    background: linear-gradient(115deg,
        transparent 40%,
        rgba(120, 122, 135, 0.035) 47%,
        rgba(120, 122, 135, 0.07) 50%,
        rgba(120, 122, 135, 0.035) 53%,
        transparent 60%);
    animation: glass-sweep-a 22s ease-in-out infinite;
}
/* Second band — different angle + speed so the reflection feels layered. */
.glass-reflection::after {
    background: linear-gradient(70deg,
        transparent 42%,
        rgba(120, 122, 135, 0.025) 48%,
        rgba(120, 122, 135, 0.05) 52%,
        transparent 58%);
    animation: glass-sweep-b 30s ease-in-out infinite;
}

/* Dark theme: bright white glass GLARE — light gliding over dark glass.
   Still neutral (white), no color. */
.mud-theme-dark .glass-reflection::before {
    background: linear-gradient(115deg,
        transparent 40%,
        rgba(255, 255, 255, 0.025) 47%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.025) 53%,
        transparent 60%);
}
.mud-theme-dark .glass-reflection::after {
    background: linear-gradient(70deg,
        transparent 42%,
        rgba(255, 255, 255, 0.02) 48%,
        rgba(255, 255, 255, 0.04) 52%,
        transparent 58%);
}

/* Slow diagonal glides, gentle and back-and-forth so the reflection
   drifts across and returns — never a hard jump. */
@keyframes glass-sweep-a {
    0%, 100% { transform: translate3d(-18%, -12%, 0); }
    50%      { transform: translate3d(18%, 12%, 0); }
}
@keyframes glass-sweep-b {
    0%, 100% { transform: translate3d(16%, 10%, 0); }
    50%      { transform: translate3d(-16%, -10%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .glass-reflection::before,
    .glass-reflection::after { animation: none; }
}

/* --- Screenshot crop: trim 1px from left, right, bottom --- */
.screenshot-crop {
    overflow: hidden;
    position: relative;
}

.screenshot-crop picture { display: block; }

.screenshot-crop img {
    margin: 0 -1px -1px -1px;
    width: calc(100% + 2px);
    /* The width/height attributes only set the aspect ratio (no layout shift). */
    height: auto;
    display: block;
}

/* --- Platform preview placeholder --- */
.platform-preview {
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
}

.platform-preview-inner {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--mud-palette-primary) 5%, var(--mud-palette-surface)),
        color-mix(in srgb, var(--mud-palette-secondary) 5%, var(--mud-palette-surface)));
}

/* --- Feature cards --- */
.feature-card {
    height: 100%;
    border-radius: 12px !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.5, 1),
                box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.28s ease;
    border: 1px solid var(--mud-palette-lines-default) !important;
}

/* Lift AND grow on hover. `!important` so nothing in the cascade (MudBlazor
   base styles, reduced-motion media queries, etc.) can suppress the lift —
   the symptom users hit was border+shadow applying but the card not moving,
   which means the transform specifically was losing. Forcing it removes all
   doubt. Made the lift larger (-10px / 1.04) so it's clearly visible. */
.feature-card:hover {
    transform: translateY(-4px) scale(1.012) !important;
    box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.16),
                0 6px 14px -6px color-mix(in srgb, var(--mud-palette-primary) 24%, transparent) !important;
    border-color: var(--mud-palette-primary) !important;
}
.mud-theme-dark .feature-card:hover {
    box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.55),
                0 8px 18px -6px color-mix(in srgb, var(--mud-palette-primary) 38%, transparent) !important;
}
.feature-card .feature-icon-wrap {
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.25s ease;
}
/* Gentle lift on hover — icon tile nudges up and the tint deepens.
   No rotation. */
.feature-card:hover .feature-icon-wrap {
    transform: translateY(-2px) scale(1.02);
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
}
/* NOTE: intentionally NOT disabling the hover lift under reduced-motion.
   A hover lift is a discrete, user-initiated state change (not continuous
   motion); disabling it here is what made the cards "stop moving" for users
   who have reduced-motion enabled. Continuous animations (rays, reveal) are
   still disabled under reduced-motion below. */

.feature-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    margin-bottom: 16px;
}

/* --- Section styling --- */
.section-alt {
    background: color-mix(in srgb, var(--mud-palette-surface) 60%, var(--mud-palette-background));
}

.section-divider {
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    margin: 0 auto 24px;
}

/* --- Step cards for "How it works" --- */
.step-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--mud-palette-primary) 3%, transparent);
}
.mud-theme-dark .step-card:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    color: #fff;
    margin-bottom: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
}

/* Subtle: a small lift + light scale, NO rotation, and only a gentle
   shadow increase (no strong colored glow). */
.step-card:hover .step-number {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 7px 16px -6px color-mix(in srgb, var(--mud-palette-primary) 38%, transparent);
}

/* Hover lift kept under reduced-motion (discrete user-initiated change). */

/* --- Broker badge --- */
.broker-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.broker-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    /* Uniform height across all badges. Flex `align-items: stretch` only
       equalizes within a single wrapped line, so badges that wrap to a second
       line (e.g. Coinbase/Kraken) would otherwise be shorter than the taller
       first line. Pin every badge to the tallest natural height (Charles
       Schwab's 26px mark + padding) so all rows match. */
    min-height: 60px;
    padding: 16px 28px;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease,
                background 0.25s ease;
}

.broker-badge:hover {
    transform: translateY(-3px);
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface));
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.22),
                0 6px 18px -4px color-mix(in srgb, var(--mud-palette-primary) 38%, transparent);
}
.mud-theme-dark .broker-badge:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.6),
                0 8px 22px -4px color-mix(in srgb, var(--mud-palette-primary) 50%, transparent);
}
.broker-badge .mud-icon-root {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.25s ease;
}
.broker-badge:hover .mud-icon-root {
    transform: scale(1.08);
    color: var(--mud-palette-primary);
}

/* Badge variant that holds a real broker logo image (replaces icon + text).
   Tighter vertical padding so the lockup sits at the same overall height as
   the text badges. The logo is theme-swapped in markup (light vs dark). */
.broker-badge-logo { padding: 14px 24px; }
.broker-logo {
    height: 24px;
    width: auto;
    display: block;
}
/* Wide wordmarks (e.g. E*TRADE ~7:1) sit shorter so they don't dwarf the
   other badges. */
.broker-logo-wide { height: 17px; }
/* Interactive Brokers' wordmark is short next to its full-height red mark,
   so at the shared height the text reads small. Render it a touch taller,
   and trim the badge's vertical padding so the badge height still matches
   the others (21 + 2×12 = 45 ≈ 17 + 2×14). */
.broker-logo-ibkr { height: 21px; }
.broker-badge-ibkr { padding-top: 12px; padding-bottom: 12px; }
/* Square avatar-style mark (e.g. Charles Schwab) used as the badge icon
   alongside the broker name text. */
.broker-mark {
    height: 26px;
    width: 26px;
    display: block;
    flex-shrink: 0;
}

/* Scale the whole lockup down on phones — the desktop fixed paddings/heights
   leave the badges oversized and crowd a narrow viewport. Everything shrinks
   proportionally so the logos still read clearly. */
@media (max-width: 600px) {
    .broker-row { gap: 8px; }
    .broker-badge {
        padding: 9px 14px;
        font-size: 0.82rem;
        gap: 7px;
        border-radius: 8px;
        min-height: 40px;
    }
    .broker-badge-logo { padding: 8px 12px; }
    .broker-logo { height: 18px; }
    .broker-logo-wide { height: 13px; }
    .broker-logo-ibkr { height: 16px; }
    .broker-badge-ibkr { padding-top: 8px; padding-bottom: 8px; }
    .broker-mark { height: 20px; width: 20px; }
}

/* Hover lift kept under reduced-motion (discrete user-initiated change). */

/* --- Stats row --- */
.stat-item {
    text-align: center;
    padding: 24px 16px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    margin-top: 6px;
    opacity: 0.7;
}

/* --- CTA banner --- */
.cta-banner {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--mud-palette-primary) 15%, var(--mud-palette-surface)),
        color-mix(in srgb, var(--mud-palette-secondary) 10%, var(--mud-palette-surface)));
    padding: 56px 24px;
    text-align: center;
}

/* --- Pricing card highlight --- */
.pricing-highlight {
    border: 2px solid var(--mud-palette-secondary) !important;
    position: relative;
}

/* --- Floating "MOST POPULAR" badge ---
   Used by both /pricing and the Home pricing teaser. Wrapper anchors the
   absolutely-positioned badge to its card. Cards beneath all keep
   identical internal layouts because the badge doesn't consume their
   content space — it floats above the top edge instead. */
.pricing-card-wrapper {
    position: relative;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1);
}

/* --- Pricing card hover (applies to every plan card on Home + /pricing) ---
   The LIFT is applied to the WRAPPER (not the card) so the absolutely-
   positioned "MOST POPULAR" badge — which is a child of the wrapper, not
   the card — rides along with the card instead of staying behind. The
   card's glow is triggered by the same wrapper hover. The highlighted
   "Pro" card gets a secondary-colored glow to honor its secondary border. */
.pricing-card-wrapper:hover {
    transform: translateY(-4px) scale(1.012);
}
.pricing-card-wrapper > .mud-card {
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.pricing-card-wrapper:hover > .mud-card {
    box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.18),
                0 6px 14px -6px color-mix(in srgb, var(--mud-palette-primary) 24%, transparent) !important;
}
.pricing-card-wrapper:hover > .pricing-highlight {
    box-shadow: 0 24px 48px -14px rgba(0, 0, 0, 0.25),
                0 12px 26px -4px color-mix(in srgb, var(--mud-palette-secondary) 38%, transparent) !important;
}
.mud-theme-dark .pricing-card-wrapper:hover > .mud-card {
    box-shadow: 0 26px 52px -14px rgba(0, 0, 0, 0.65),
                0 12px 26px -4px color-mix(in srgb, var(--mud-palette-primary) 44%, transparent) !important;
}
.mud-theme-dark .pricing-card-wrapper:hover > .pricing-highlight {
    box-shadow: 0 28px 56px -14px rgba(0, 0, 0, 0.7),
                0 14px 30px -4px color-mix(in srgb, var(--mud-palette-secondary) 52%, transparent) !important;
}

/* Hover lift kept under reduced-motion (discrete user-initiated change). */

.pricing-grid {
    margin-top: 24px;
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: var(--mud-palette-secondary);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* --- Feature detail row (alternating layout) --- */
.feature-detail-section {
    padding: 64px 0;
}

.feature-detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    margin-bottom: 20px;
}

/* --- Subtle animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; }
.fade-in-up-delay-2 { animation-delay: 0.2s; }
.fade-in-up-delay-3 { animation-delay: 0.3s; }
.fade-in-up-delay-4 { animation-delay: 0.4s; }
.fade-in-up-delay-5 { animation-delay: 0.5s; }
.fade-in-up-delay-6 { animation-delay: 0.6s; }

/* Hero entrance that never hides the text: transform only, no opacity. The
   largest above-the-fold text is the LCP element, and an opacity fade (which
   also replays when the interactive render replaces the prerendered DOM) held
   LCP back to ~2 s on the home page. */
@keyframes riseIn {
    from { transform: translateY(14px); }
    to { transform: none; }
}
.rise-in { animation: riseIn 0.5s ease-out both; }
@media (prefers-reduced-motion: reduce) {
    .rise-in { animation: none; }
}

/* --- Doc section cards --- */
.doc-step-list {
    padding-left: 24px;
    line-height: 2;
}

.doc-step-list li {
    padding-left: 4px;
}

/* --- Documentation code block --- */
.doc-code {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 8px 0 4px;
    overflow-x: auto;
    font-family: "Cascadia Code", "Consolas", "SF Mono", Menlo, monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    white-space: pre;
    tab-size: 4;
}
.mud-theme-dark .doc-code {
    background: color-mix(in srgb, var(--mud-palette-surface) 60%, var(--mud-palette-background));
}

/* --- Footer polish --- */
footer .footer-link {
    display: block;
    padding: 3px 0;
    cursor: pointer;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

footer .footer-link:hover {
    padding-left: 4px;
    color: var(--mud-palette-primary) !important;
    text-decoration: none;
}

/* "Contact us" opens a dialog, so it's a button styled as a footer link. */
footer .footer-link-btn {
    margin: 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
}

/* --- Responsive tweaks --- */
@media (max-width: 960px) {
    .hero-section {
        padding: 48px 0 40px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .cta-banner {
        padding: 40px 16px;
    }
}


/* ===========================================================
   MODERNIZATION LAYER (added 2026-05-29)
   Subtle, professional effects layered over existing conventions:
     - Scroll-revealed entries (.reveal, driven by site-effects.js)
     - Card lift on hover (.card-hover)
     - Hero gradient text (.hero-gradient-text)
     - Animated hero gradient wash (.hero-section ::before/::after)
   All motion is gated by prefers-reduced-motion.
   =========================================================== */

html { scroll-behavior: smooth; }

/* ---------- Entrance reveal (CSS-only, fail-safe) ----------
   IMPORTANT: content is VISIBLE BY DEFAULT. The previous approach hid
   content (opacity:0) and relied on site-effects.js to add `.in-view`.
   In a Blazor Server app, the interactive circuit re-renders the DOM and
   clobbers JS-added classes — so `.in-view` could get wiped and content
   would be STUCK INVISIBLE. Worse, the wrapper's lingering `transform`
   (even translateY(0)) suppressed child card :hover transforms.

   This version uses a pure-CSS one-shot entrance animation with
   `animation-fill-mode: backwards`: the element shows the hidden
   start-frame only DURING the animation, then RELEASES back to its
   natural base style — which has NO transform and full opacity. No JS,
   nothing to clobber, nothing left to suppress hover. */
.reveal {
    animation: reveal-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
/* Opacity-ONLY entrance. Deliberately no `transform` here: the .reveal
   wrapper sits around hover-lift cards, and a transform on the wrapper
   (even momentarily, or if Blazor re-renders restart the animation) can
   create a containing block that interferes with the child card's :hover
   transform. Fading in (no slide) keeps the wrapper transform-free always. */
@keyframes reveal-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.reveal-d1 { animation-delay: 0.06s; }
.reveal-d2 { animation-delay: 0.12s; }
.reveal-d3 { animation-delay: 0.18s; }
.reveal-d4 { animation-delay: 0.24s; }
.reveal-d5 { animation-delay: 0.30s; }
.reveal-d6 { animation-delay: 0.36s; }

/* Add .reveal-stagger to a parent — child .reveal items cascade in. */
.reveal-stagger > .reveal:nth-child(1)  { animation-delay: 0.04s; }
.reveal-stagger > .reveal:nth-child(2)  { animation-delay: 0.10s; }
.reveal-stagger > .reveal:nth-child(3)  { animation-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4)  { animation-delay: 0.22s; }
.reveal-stagger > .reveal:nth-child(5)  { animation-delay: 0.28s; }
.reveal-stagger > .reveal:nth-child(6)  { animation-delay: 0.34s; }
.reveal-stagger > .reveal:nth-child(7)  { animation-delay: 0.40s; }
.reveal-stagger > .reveal:nth-child(n+8) { animation-delay: 0.46s; }

/* ---------- Card hover lift (subtle, modern SaaS) ---------- */
.card-hover {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.18),
                0 6px 14px -4px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent) !important;
    border-color: color-mix(in srgb, var(--mud-palette-primary) 40%, transparent) !important;
}
.mud-theme-dark .card-hover:hover {
    box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.6),
                0 8px 20px -4px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent) !important;
    border-color: color-mix(in srgb, var(--mud-palette-primary) 55%, transparent) !important;
}

/* Inside a hovered card, icons pop slightly. Targets the existing .feature-icon-wrap
   used across Home / Features, plus a generic .pop-icon hook for other cards. */
.card-hover .feature-icon-wrap,
.card-hover .pop-icon {
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-hover:hover .feature-icon-wrap,
.card-hover:hover .pop-icon {
    transform: scale(1.08) rotate(-3deg);
}

/* ---------- Hero gradient text (primary -> secondary) ---------- */
.hero-gradient-text {
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Slight extra weight so the gradient reads well even at smaller sizes */
    font-weight: inherit;
}

/* ---------- Reduced-motion: respect the user ----------
   Disable CONTINUOUS / entrance motion (the reveal fade-in). Hover lifts
   are discrete, user-initiated state changes and are intentionally KEPT —
   disabling them is what made cards "stop moving" for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { animation: none; opacity: 1; }
}


/* ===========================================================
   PUBLIC SITE HEADER (Components/Layout/SiteHeader.razor)
   Top navigation for the marketing pages; account pages keep the
   app drawer. Theme tokens only. The phone menu and the Resources
   menu are toggled by wwwroot/js/site-nav.js.
   =========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: color-mix(in srgb, var(--mud-palette-appbar-background) 88%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 64px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.site-brand { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 6px; }
.site-brand img { height: 28px; width: 135px; display: block; }

.site-skip {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 1300;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--mud-palette-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.15s ease;
}
.site-skip:focus { top: 10px; }

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav__link:hover {
    color: var(--mud-palette-text-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}
.site-nav__link.is-active { color: var(--mud-palette-text-primary); }
.site-nav__link.is-active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--mud-palette-primary);
}
.site-nav__chev {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.15s ease;
}
.site-nav__morebtn[aria-expanded="true"] .site-nav__chev { transform: rotate(180deg); }
.site-nav__more { position: relative; }
.site-nav__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: -8px;
    min-width: 300px;
    padding: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.35);
}
.mud-theme-dark .site-nav__panel { box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7); }
.site-nav__panel ul { list-style: none; margin: 0; padding: 0; }
.site-nav__panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
}
.site-nav__panel a:hover,
.site-nav__panel a.is-active {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}
.site-nav__panel-title { display: block; font-weight: 600; font-size: 0.9rem; }
.site-nav__panel-desc { display: block; font-size: 0.78rem; color: var(--mud-palette-text-secondary); margin-top: 1px; }

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex: 0 0 auto;
}
.site-login {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.site-login:hover { background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent); }
.site-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--mud-palette-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--mud-palette-primary) 70%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.site-cta:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--mud-palette-primary) 80%, transparent);
}

.site-burger {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.site-burger:hover { background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent); }
.site-burger__bars,
.site-burger__bars::before,
.site-burger__bars::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.site-burger__bars { position: relative; }
.site-burger__bars::before,
.site-burger__bars::after { content: ''; position: absolute; left: 0; }
.site-burger__bars::before { top: -6px; }
.site-burger__bars::after { top: 6px; }
.site-burger[aria-expanded="true"] .site-burger__bars { background: transparent; }
.site-burger[aria-expanded="true"] .site-burger__bars::before { transform: translateY(6px) rotate(45deg); }
.site-burger[aria-expanded="true"] .site-burger__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-mobile {
    border-top: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 8px 16px 20px;
}
.site-mobile__list { list-style: none; margin: 0; padding: 0; }
.site-mobile__list a {
    display: block;
    padding: 12px 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-lines-default) 70%, transparent);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
}
.site-mobile__list a.is-active { color: var(--mud-palette-primary); }
.site-mobile__list--minor a { font-size: 0.92rem; font-weight: 500; color: var(--mud-palette-text-secondary); padding: 10px 8px; }
.site-mobile__heading {
    margin: 18px 8px 4px;
    font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mud-palette-primary);
}
.site-mobile__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.site-cta--block,
.site-login--block { display: flex; justify-content: center; padding: 12px 18px; }
.site-login--block { border: 1px solid var(--mud-palette-lines-default); border-radius: 999px; }

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Phone + tablet: links move into the hamburger menu. */
@media (max-width: 1023.98px) {
    .site-nav { display: none; }
    .site-burger { display: inline-flex; }
    .site-header__actions .site-login,
    .site-header__actions > .site-cta { display: none; }
    .site-header__inner { gap: 12px; }
}
@media (min-width: 1024px) {
    .site-mobile { display: none !important; }
}
@media (max-width: 599.98px) {
    .site-header__inner { padding: 0 16px; height: 60px; }
    .site-brand img { height: 24px; width: 116px; }
    .site-mobile { max-height: calc(100vh - 60px); }
}

/* App pages (drawer layout): until the browser reports its width, phones get the
   drawer hidden, so the server-rendered first paint isn't covered by it. */
@media (max-width: 599.98px) {
    .bt-viewport-pending .mud-drawer { display: none !important; }
    .bt-viewport-pending .mud-main-content { margin-left: 0 !important; }
}
