/* ============================================================================
   _v4-polish.css — Orynela authoritative UI polish layer
   ----------------------------------------------------------------------------
   Loaded LAST in every layout (public / auth / legal / dashboard / admin),
   after app.min.css and the other appended component sheets. Because it is the
   final stylesheet, equal-specificity rules here win the cascade over the
   hand-maintained minified bundle — without rebuilding or overwriting it.

   Goals (centralized, additive, reversible — remove the <link> to roll back):
     A. Fix "pages too high": consistent header clearance + scroll offset.
     B. Responsive safety: no unwanted horizontal scroll, scrollable tables.
     C. Accessibility: visible focus, larger tap targets, reduced-motion.
     D. Light harmonization: even vertical rhythm, quieter disclaimers.

   All values reuse the existing design tokens from _variables.css.
   ========================================================================== */

/* ============================================================================
   A. HEADER OFFSET + SCROLL BEHAVIOR  (the priority fix)
   The public/legal nav is position:fixed, height var(--nav-height) (72px);
   an optional promo banner adds var(--banner-height) (34px) on top.
   ========================================================================== */

/* Anchor / in-page jumps must land BELOW the fixed nav, not under it. */
html {
    scroll-padding-top: calc(var(--nav-height) + 1rem);
}
body:has(.site-banner) {
    scroll-padding-top: calc(var(--nav-height) + var(--banner-height) + 1rem);
}
body.dashboard-body,
body.admin-body {
    scroll-padding-top: calc(var(--topbar-height) + 1rem);
}

/* Comfortable, FLUID hero clearance below the fixed header. clamp() scales the
   breathing room smoothly from mobile → desktop, so spacing feels intentional at
   every width and never hugs the header. Overrides the divergent minified values. */
.hero,
.hero-section {
    padding-top: calc(var(--nav-height) + clamp(var(--space-2xl), 6vw, var(--space-4xl)));
    padding-bottom: clamp(var(--space-2xl), 5vw, var(--space-4xl));
}
.hero.hero-compact {
    padding-top: calc(var(--nav-height) + clamp(var(--space-xl), 4vw, var(--space-3xl)));
}

/* Banner present → add the banner height to the clearance. */
body:has(.site-banner) .hero,
body:has(.site-banner) .hero-section {
    padding-top: calc(var(--nav-height) + var(--banner-height) + clamp(var(--space-2xl), 6vw, var(--space-4xl)));
}
body:has(.site-banner) .hero.hero-compact {
    padding-top: calc(var(--nav-height) + var(--banner-height) + clamp(var(--space-xl), 4vw, var(--space-3xl)));
}

/* Safety net: any public page whose <main> content does NOT start with a hero
   still clears the fixed nav. Harmless where a hero exists (selector excludes them). */
body.public-body main:not(:has(> .hero, > .hero-section, > section.hero)) {
    padding-top: calc(var(--nav-height) + var(--space-xl));
}
body.public-body:has(.site-banner) main:not(:has(> .hero, > .hero-section, > section.hero)) {
    padding-top: calc(var(--nav-height) + var(--banner-height) + var(--space-xl));
}

/* Reassert wrapper offsets so they stay correct regardless of the stale min. */
.legal-wrapper {
    padding-top: calc(var(--nav-height) + var(--space-3xl));
}
body:has(.site-banner) .legal-wrapper {
    padding-top: calc(var(--nav-height) + var(--banner-height) + var(--space-3xl));
}

/* (Hero clearance is fluid via clamp() above — no fixed mobile breakpoint needed.) */

/* ============================================================================
   B. RESPONSIVE SAFETY — no unwanted horizontal scroll
   ========================================================================== */

/* Global guard. `clip` (not `hidden`) prevents sideways scroll without
   breaking position:sticky descendants. Vertical scroll is unaffected. */
html,
body.site-body {
    overflow-x: clip;
}

/* Long words / URLs / tokens shouldn't force the viewport wider. */
.hero-title,
.section-title,
.card-title,
p,
.glass-card,
.surface-card {
    overflow-wrap: break-word;
}

/* ── Animated rotating hero headline (FR / EN / ZH batch) ───────────────────
   The headline cycles a trilingual batch of phrases of very different lengths
   (1–4 wrapped lines depending on phrase + viewport). The inline script in
   landing.php MEASURES the tallest phrase at the current width and locks an
   exact px min-height on the .hero-title via inline style, so the subtitle /
   CTAs below stay perfectly still as phrases swap — re-measured on resize and
   once the display font loads. We deliberately do NOT hard-code an em
   min-height here: a guess either under-reserves (the headline jumps) or
   over-reserves (a dead gap), it can't track all 16 locales × every width, and
   it would leave that gap under the static title for reduced-motion / no-JS
   visitors, where the headline never rotates at all. Each swap crossfades
   (slide up + fade out, settle + fade in). */
.hero-rotate {
    display: inline-block;
    transition: opacity .36s ease, transform .36s ease;
    will-change: opacity, transform;
}
.hero-rotate.is-out { opacity: 0; transform: translateY(-0.28em); }
@media (prefers-reduced-motion: reduce) { .hero-rotate { transition: none; } }

/* Media never overflows its container. */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

/* Tables: keep wrapped ones scrollable, and make the un-wrapped leaderboard
   table scroll horizontally on small screens instead of widening the page. */
.data-table-wrapper,
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
@media (max-width: 768px) {
    .table-leaderboard {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* Reinforce: forum / two-column inline grids collapse on tablet & below. */
@media (max-width: 1024px) {
    .container[style*="grid-template-columns:240px"],
    .container[style*="grid-template-columns: 240px"] {
        grid-template-columns: 1fr !important;
    }
}

/* ── Responsive grid stacking — graceful degradation for the column utilities
   and for inline-style grids, so nothing stays cramped on tablet/phone. ───── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Inline 4-col stat grids (e.g. dashboard performance) → 2 cols on tablet. */
    [style*="repeat(4,"], [style*="repeat(4 ,"], [style*="repeat(4"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 768px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Inline two-column grids (profile/account forms, etc.) → single column. */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .demo-dashboard-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .form-row-2, .form-row-3 { grid-template-columns: 1fr !important; }
    [style*="repeat(4"], [style*="repeat(3"] { grid-template-columns: 1fr !important; }
    /* Panel headers: stack title + action, full-width button. */
    .panel-header { flex-direction: column; align-items: stretch; gap: var(--space-sm); }
    .panel-header .btn { width: 100%; justify-content: center; }
    /* Card action rows collapse to one column. */
    .broker-card-actions { grid-template-columns: 1fr !important; }
}

/* Cloudflare Turnstile widget must never overflow its container. */
.cf-turnstile { max-width: 100%; overflow: hidden; }

/* Profile tab strip scrolls instead of overflowing on tablet/phone. */
@media (max-width: 1024px) {
    .profile-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .profile-tabs > * { flex-shrink: 0; }
}

/* ============================================================================
   C. ACCESSIBILITY
   ========================================================================== */

/* Visible keyboard focus everywhere; suppressed for mouse users only. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-strong, #E4A857);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Comfortable tap targets for the compact controls.
   NOTE: do NOT set `display` here — `.nav-toggle` is `display:none` on desktop
   and only `inline-flex` at ≤1024px (managed in _navigation.css). These controls
   are already flex-centered in their own CSS, so min-height alone is enough. */
.theme-toggle,
.lang-selector-btn,
.btn-sm,
.site-banner-close {
    min-height: 40px;
}

/* Respect users who prefer reduced motion: stop reveals/transitions and keep
   content visible (the .reveal pattern would otherwise stay at opacity:0). */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal,
    [class*="fade-"] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================================
   D. LIGHT HARMONIZATION
   ========================================================================== */

/* Even, responsive vertical rhythm for content sections (symmetric top/bottom). */
.section {
    padding-block: clamp(var(--space-2xl), 5vw, var(--space-4xl));
}

/* Default gap for the column-count grid utilities. .grid-2/3/4 set only the
   columns, so without this, cards in `grid grid-3` / `grid grid-4` touch with no
   spacing (the "stuck sections" bug). `:not([class*="gap-"])` preserves any
   explicit .gap-* utility a section may already use. */
.grid:not([class*="gap-"]) {
    gap: clamp(var(--space-md), 2.2vw, var(--space-xl));
}

/* Quieter, tidier compliance notices — present and legible, but de-noised so
   they don't dominate the design.
   ⚠ Do NOT hide these: they are legally required sandbox / risk disclosures. */
.sandbox-banner,
.social-bandeau {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-block: var(--space-sm);
    opacity: 0.9;
}
.sandbox-banner .material-symbols-outlined,
.social-bandeau .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--accent-muted, var(--text-muted));
}
.footer-risk {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================================
   E. AGENT ONBOARDING PROMPT CONSOLE  (copy-paste prompt, highly visible)
   A "command console" surface, on-brand (copper glow on charcoal, mono type),
   so an AI agent can be handed the onboarding prompt in one click.
   ========================================================================== */
.agent-prompt-console {
    max-width: var(--reading-max-width);
    margin-inline: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(130% 150% at 0% 0%, var(--accent-glow), transparent 55%),
        var(--bg-card-strong);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.agent-prompt-console__bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.025);
}
.agent-prompt-console__dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--border-medium);
}
.agent-prompt-console__dot--live {
    background: var(--accent-strong);
    box-shadow: 0 0 10px var(--accent-glow-strong);
}
.agent-prompt-console__title {
    margin-left: 0.4rem;
    font-family: var(--mono-detail);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.agent-prompt-console__copy {
    margin-left: auto;
}
.agent-prompt-console__body {
    margin: 0;
    padding: 1.15rem 1.3rem;
    max-height: 340px;
    overflow: auto;
    font-family: var(--mono-detail);
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
}
.agent-prompt-console__body::selection {
    background: var(--accent);
    color: #0b0b0d;
}

/* ============================================================================
   F. AVATARS
   The .avatar / .avatar-lg classes were undefined anywhere, so avatar <img>s
   rendered at full natural size (e.g. the giant logo on /u/{handle}). Constrain
   them to circular, cropped thumbnails. Used on profiles, topbar, admin, DMs.
   ========================================================================== */
.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.avatar-sm { width: 40px; height: 40px; }
.avatar-lg { width: clamp(84px, 11vw, 116px); height: clamp(84px, 11vw, 116px); }
.avatar-xl { width: clamp(104px, 14vw, 148px); height: clamp(104px, 14vw, 148px); }
.profile-header .avatar { display: block; margin-bottom: var(--space-md); }

/* ============================================================================
   G. PAGE-SPECIFIC POLISH
   ========================================================================== */
/* Pricing: the 2-col story-grid pairs a tall left column (founders block +
   heading) with a single short plan card on the right. Centering the cards
   column vertically removes the large dead space beside the card. */
.hero--pricing .pricing-cards-col { align-self: center; }

/* Footer: the grid defined only 3 columns (brand + 2) for 4 children, so the
   Legal column wrapped under the brand and the layout looked lopsided. Give it a
   real 4th column on tablet/desktop (mobile keeps its single-column stack). */
@media (min-width: 769px) {
    .footer-top {
        grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.8fr)) !important;
    }
}

/* Form checkboxes (agent-lab register & market multi-select):
   - more breathing room between the checkbox and its label, and between rows
     (they were cramped — "cases collées au texte"),
   - a real accent-colored, sized checkbox,
   - and a surface that ADAPTS to the clear (light) theme instead of staying a
     hard-coded dark pill (rgba(8,8,10,.5)) on a light page. */
.agent-lab-form .form-checkboxes { gap: 0.85rem; }
.agent-lab-form .form-checkbox { gap: 0.8rem; padding: 0.7rem 0.95rem; }
.agent-lab-form .form-checkbox input[type="checkbox"],
.agent-lab-form .markets-multi input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    flex-shrink: 0;
}
[data-theme="clear"] .agent-lab-form .form-checkbox,
[data-theme="clear"] .agent-lab-form .markets-multi label {
    background: rgba(0, 0, 0, 0.035);
    border-color: rgba(0, 0, 0, 0.12);
}

/* ── Section heading → card grid spacing. On /agents the eyebrow/title sit as
   direct siblings of the grid (no .section-header wrapper), so the cards hugged
   the heading ("Built for trust", "Four steps to apply"). Add breathing room. ── */
.section .section-title + .grid,
.section .section-subtitle + .grid,
.section .section-eyebrow + .grid {
    margin-top: clamp(var(--space-lg), 3vw, var(--space-2xl));
}

/* ── Roadmap timeline: the vertical line was at the markers' LEFT edge (~7px left
   of their centres). Re-centre it under the dots. ────────────────────────────── */
.lab-roadmap::before {
    left: calc(0.5rem + 6px);
    width: 2px;
}

/* ── Clear (light) theme: components with hard-coded dark backgrounds rendered as
   black boxes on the light page. Give them light, theme-consistent surfaces. ──── */
[data-theme="clear"] .ecosystem-track {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.10);
}
[data-theme="clear"] .ecosystem-track:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border-strong);
}
[data-theme="clear"] .demo-dashboard-shell {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(0, 0, 0, 0.10);
}
[data-theme="clear"] .demo-dashboard-shell::before { opacity: 0.4; }
/* The log terminal stays a deliberate dark inset (a terminal is dark by design),
   but softened from pure black so it reads as an intentional widget. */
[data-theme="clear"] .lab-terminal {
    background: rgba(24, 22, 20, 0.92);
    border-color: rgba(0, 0, 0, 0.14);
}

/* ── Footer: soften the abrupt "cut". The dark footer had a large 96px top gap
   then a hard border, making it feel severed from the page. Tighten the top gap,
   and add generous bottom breathing room so the bottom bar isn't cut off. ──── */
.footer {
    margin-top: clamp(var(--space-2xl), 5vw, var(--space-3xl));
    padding-top: clamp(var(--space-3xl), 6vw, var(--space-4xl));
    padding-bottom: clamp(var(--space-3xl), 6vw, var(--space-4xl));
}
.footer-bottom { margin-top: clamp(var(--space-md), 2vw, var(--space-lg)); }

/* ════════════════════════════════════════════════════════════════════════════
   FORM SYSTEM REPAIR — .form-stack / .form-row / .form-actions
   These classes were used across ~20 views (profile, bot wizard, social &
   admin forms, register) but had NO styling, so label/input pairs collapsed
   inline and inputs fell back to raw browser chrome. We style the *bare*
   <label><span>…</span><input></label> pattern here, matching the brand's
   .form-input look (tokens flip automatically in the clear theme). Inputs that
   already carry .form-input/.form-select/.form-textarea are excluded so the
   auth/login forms are untouched.
   ════════════════════════════════════════════════════════════════════════════ */

.form-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(1.05rem, 2.2vw, 1.45rem);
}
/* avoid double spacing when a .form-group lives inside a .form-stack */
.form-stack > .form-group { margin-bottom: 0; }

/* responsive multi-column row: 2-up on desktop, stacks on mobile, no overflow */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1rem;
}

/* each field stacks its label above its control */
.form-stack > label,
.form-row > label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
}
/* keep checkbox / radio rows horizontal */
.form-stack > label:has(> input[type="checkbox"]),
.form-stack > label:has(> input[type="radio"]) {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

/* the field's label text */
.form-stack > label > span:first-child,
.form-row > label > span:first-child {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* the controls — only the BARE ones (leave .form-input-classed inputs alone) */
.form-stack input:not(.form-input):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.form-stack select:not(.form-select),
.form-stack textarea:not(.form-textarea),
.form-row input:not(.form-input):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.form-row select:not(.form-select),
.form-row textarea:not(.form-textarea) {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 0.72rem 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 0.93rem;
    line-height: 1.45;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.form-stack input:not(.form-input):not([type="checkbox"]):not([type="radio"]):not([type="file"])::placeholder,
.form-stack textarea:not(.form-textarea)::placeholder,
.form-row input:not(.form-input):not([type="checkbox"]):not([type="radio"]):not([type="file"])::placeholder,
.form-row textarea:not(.form-textarea)::placeholder {
    color: var(--text-soft);
}
.form-stack input:not(.form-input):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.form-stack select:not(.form-select):focus,
.form-stack textarea:not(.form-textarea):focus,
.form-row input:not(.form-input):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.form-row select:not(.form-select):focus,
.form-row textarea:not(.form-textarea):focus {
    outline: none;
    border-color: var(--border-input-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(196, 132, 47, 0.14);
}
.form-stack input:disabled,
.form-stack select:disabled,
.form-stack textarea:disabled,
.form-row input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.form-stack textarea:not(.form-textarea),
.form-row textarea:not(.form-textarea) {
    min-height: 130px;
    resize: vertical;
}
/* custom caret for bare selects */
.form-stack select:not(.form-select),
.form-row select:not(.form-select) {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A0795A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    padding-right: 2.4rem;
    cursor: pointer;
}

/* hints */
.form-stack small,
.form-row small {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

/* file inputs: tidy the native button */
.form-stack input[type="file"],
.form-row input[type="file"] {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 100%;
}
.form-stack input[type="file"]::file-selector-button,
.form-row input[type="file"]::file-selector-button {
    margin-right: 0.85rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: rgba(196, 132, 47, 0.10);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.form-stack input[type="file"]::file-selector-button:hover,
.form-row input[type="file"]::file-selector-button:hover {
    border-color: var(--border-input-focus);
    background: rgba(196, 132, 47, 0.18);
}

/* bare checkboxes / radios pick up the brand accent */
.form-stack input[type="checkbox"],
.form-stack input[type="radio"],
.form-row input[type="checkbox"],
.form-row input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    flex: 0 0 auto;
    cursor: pointer;
}

/* action bar */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* section rhythm (the wrapper had no rule) */
.dashboard-section > h2 { margin: 0 0 0.35rem; }
.dashboard-section > .muted { margin: 0 0 1.5rem; }

/* ── Profile tabs — premium underline tab bar (replaces inline-styled links) ── */
.profile-tabs {
    display: flex;
    gap: 0.12rem;
    align-items: stretch;
    border-bottom: 1px solid var(--border-input);
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 1.05rem;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-soft);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.profile-tab .material-symbols-outlined { font-size: 1.1rem; }
.profile-tab:hover {
    color: var(--text-secondary);
    background: rgba(196, 132, 47, 0.06);
}
.profile-tab.is-active {
    color: var(--text-accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════════
   PUBLIC PROFILE  /u/{handle}
   The public layout doesn't load dashboard.min.css, so .profile-stats /
   .profile-actions / .display-name / .tagline / .badge-achievement were
   unstyled — the header collapsed into a cramped vertical list. Build a proper
   identity header + stat pills + sandbox performance cards here.
   ════════════════════════════════════════════════════════════════════════════ */

.profile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(1.25rem, 3vw, 2rem);
    padding: clamp(1.5rem, 3vw, 2.25rem);
}
.profile-id {
    display: flex;
    align-items: flex-start;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    min-width: 0;
    flex: 1 1 320px;
}
.profile-header .avatar { margin-bottom: 0; }
.avatar.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1;
    color: var(--accent);
    background: linear-gradient(135deg, rgba(196, 132, 47, 0.20), rgba(196, 132, 47, 0.05));
    border-color: var(--border-strong);
}
.profile-id-text { min-width: 0; }
.profile-id-text h1 {
    margin: 0;
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    word-break: break-word;
}
.profile-id-text .display-name {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.profile-id-text .tagline {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 52ch;
}
.profile-header .badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; }
.badge-achievement {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(196, 132, 47, 0.12);
    border: 1px solid var(--border-strong);
}
.badge-achievement .material-symbols-outlined { font-size: 1rem; }

.profile-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    flex: 0 1 auto;
}
.profile-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profile-stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 80px;
    padding: 0.6rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
}
.profile-stats > div strong {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}
.profile-stats > div span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile-actions form { margin: 0; }
.profile-actions .btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.profile-actions .btn .material-symbols-outlined { font-size: 1.05rem; }

@media (max-width: 680px) {
    .profile-aside { align-items: flex-start; width: 100%; }
    .profile-stats { width: 100%; }
    .profile-stats > div { flex: 1 1 70px; }
    .profile-actions { width: 100%; }
    .profile-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* sandbox performance cards — dark glass, left-aligned (overrides the light
   .stat-card bg from app.min.css; the token flips for the clear theme) */
.stats-row--metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats-row .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    box-shadow: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: clamp(1rem, 2vw, 1.35rem);
}
.stats-row .stat-card .stat-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.stats-row .stat-card strong {
    font-family: var(--font-mono);
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text-primary);
}
.stats-row .stat-card .pnl-positive { color: #34d399; }
.stats-row .stat-card .pnl-negative { color: #f87171; }
.profile-empty-perf {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.4rem;
}
.profile-empty-perf .material-symbols-outlined { font-size: 1.1rem; color: var(--accent); }

/* the "sim" chip next to the Performance heading */
.section-title .sim-marker { vertical-align: middle; }

/* published-strategy cards: subtle lift on hover */
.strategy-card { display: block; transition: transform 0.15s ease, border-color 0.15s ease; }
.strategy-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

/* ════════════════════════════════════════════════════════════════════════════
   DOCS — /docs/social-api (and reusable .docs-* for API reference pages)
   The page was a bare unstyled <ul>/<code> dump (.docs-shell had no CSS).
   Build a premium reference layout: hero, compliance callout, endpoint rows
   with HTTP-method badges, and capability cards.
   ════════════════════════════════════════════════════════════════════════════ */

.docs-shell { max-width: 940px; margin: 0 auto; }
.docs-hero { margin-bottom: clamp(2rem, 4vw, 3rem); }
.docs-eyebrow {
    display: inline-block;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-accent); margin-bottom: 0.75rem;
}
.docs-hero h1 { margin: 0 0 0.6rem; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; line-height: 1.05; }
.docs-lede { margin: 0 0 1.5rem; color: var(--text-secondary); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.6; max-width: 60ch; }
.docs-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.docs-chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.4rem 0.75rem; border-radius: var(--radius-full);
    background: var(--bg-card); border: 1px solid var(--border-input);
}
.docs-chip-k { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

/* code styling within docs */
.docs-shell code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    color: var(--text-accent);
    background: rgba(196, 132, 47, 0.10);
    border: 1px solid rgba(196, 132, 47, 0.18);
    border-radius: var(--radius-xs, 6px);
    padding: 0.08em 0.4em;
    word-break: break-word;
}

/* compliance callout */
.docs-callout {
    display: flex; gap: 0.9rem; align-items: flex-start;
    padding: clamp(1.1rem, 2.5vw, 1.5rem);
    margin: 0 0 clamp(2rem, 4vw, 2.75rem);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-lg);
    background: rgba(196, 132, 47, 0.06);
}
.docs-callout > .material-symbols-outlined { color: var(--accent); font-size: 1.5rem; flex: 0 0 auto; }
.docs-callout strong { display: block; margin-bottom: 0.5rem; }
.docs-callout ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.docs-callout li { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; }

.docs-h2 {
    margin: clamp(2.25rem, 5vw, 3rem) 0 1rem;
    padding-top: clamp(1.5rem, 3vw, 2rem);
    border-top: 1px solid var(--border-input);
    font-size: clamp(1.3rem, 3vw, 1.65rem);
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.docs-tag {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.2rem 0.55rem; border-radius: var(--radius-full);
    background: var(--bg-card); border: 1px solid var(--border-input);
}
.docs-p { color: var(--text-secondary); line-height: 1.6; margin: 0 0 1.1rem; max-width: 64ch; }

/* capability cards */
.docs-auth-grid {
    display: grid; gap: 1rem; margin: 1.25rem 0;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.docs-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-lg);
    transition: border-color 0.16s ease, transform 0.16s ease;
}
.docs-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.docs-card > .material-symbols-outlined {
    color: var(--accent); font-size: 1.5rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: var(--radius-md);
    background: rgba(196, 132, 47, 0.10); margin-bottom: 0.75rem;
}
.docs-card h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.docs-card p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }

/* endpoint rows */
.docs-endpoints { display: flex; flex-direction: column; gap: 0.5rem; }
.docs-endpoint {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    padding: 0.7rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    transition: border-color 0.14s ease, background-color 0.14s ease;
}
.docs-endpoint:hover { border-color: var(--border-strong); background: var(--bg-input-focus); }
.docs-endpoint > code { background: none; border: none; padding: 0; color: var(--text-primary); font-size: 0.88rem; }
.docs-endpoint-desc { color: var(--text-muted); font-size: 0.82rem; flex: 1 1 100%; line-height: 1.45; }
.http-method {
    flex: 0 0 auto;
    min-width: 52px; text-align: center;
    font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
    padding: 0.28rem 0.5rem; border-radius: var(--radius-sm);
    border: 1px solid transparent;
}
.http-method.get  { color: #6cc6c0; background: rgba(108, 198, 192, 0.12); border-color: rgba(108, 198, 192, 0.3); }
.http-method.post { color: var(--accent); background: rgba(196, 132, 47, 0.14); border-color: var(--border-strong); }

.docs-legal {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: clamp(2rem, 4vw, 2.75rem);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border-input);
    color: var(--text-muted); font-size: 0.85rem;
}
.docs-legal .material-symbols-outlined { font-size: 1.1rem; color: var(--accent); }

/* ════════════════════════════════════════════════════════════════════════════
   SOCIAL DASHBOARD — "Share your orders" hero (order-sharing surfacing)
   ════════════════════════════════════════════════════════════════════════════ */
.share-orders-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl, 20px);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(196, 132, 47, 0.16), transparent 55%),
        var(--bg-card-strong, var(--bg-card));
}
.share-orders-hero-text { position: relative; z-index: 1; max-width: 60ch; }
.share-orders-eyebrow {
    display: inline-block;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text-accent); margin-bottom: 0.55rem;
}
.share-orders-hero h2 { margin: 0 0 0.5rem; font-size: clamp(1.4rem, 3.2vw, 2rem); line-height: 1.12; letter-spacing: -0.01em; }
.share-orders-hero > .share-orders-hero-text > p {
    margin: 0 0 1.15rem; color: var(--text-secondary); line-height: 1.6; font-size: 0.96rem;
}
.share-orders-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.share-orders-actions .btn { display: inline-flex; align-items: center; gap: 0.45rem; }
.share-orders-actions .btn .material-symbols-outlined { font-size: 1.1rem; }
.share-orders-note {
    display: flex; align-items: center; gap: 0.4rem;
    margin: 1rem 0 0; font-size: 0.8rem; color: var(--text-muted);
}
.share-orders-note .material-symbols-outlined { font-size: 1rem; color: var(--accent); }
.share-orders-glyph {
    position: absolute; right: -0.5rem; bottom: -1.5rem;
    font-size: clamp(8rem, 18vw, 13rem);
    color: var(--accent);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 560px) {
    .share-orders-actions .btn { flex: 1 1 auto; justify-content: center; }
    .share-orders-glyph { display: none; }
}

/* ── Social feed — readable activity rows (was raw "signal.emitted" + ISO date) ── */
.feed-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; }
.feed-item {
    display: flex; align-items: flex-start; gap: 0.85rem;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border-input);
}
.feed-item:last-child { border-bottom: none; }
.feed-icon {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: var(--accent);
    background: rgba(196, 132, 47, 0.10);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
}
.feed-body { flex: 1 1 auto; min-width: 0; }
.feed-text { margin: 0; line-height: 1.5; font-size: 0.92rem; color: var(--text-secondary); }
.feed-actor {
    display: inline-flex; align-items: center; gap: 0.2rem;
    font-weight: 600; color: var(--text-primary); text-decoration: none;
}
.feed-actor:hover { color: var(--text-accent); }
.feed-actor .material-symbols-outlined { font-size: 0.95rem; }
.feed-verb { color: var(--text-muted); }
.feed-subject { color: var(--text-accent); text-decoration: none; font-weight: 500; }
.feed-subject:hover { text-decoration: underline; }
.feed-order {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.4rem;
    margin-top: 0.4rem;
}
.feed-sym { font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; color: var(--text-primary); }
.feed-side {
    font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 0.12rem 0.4rem; border-radius: var(--radius-sm); border: 1px solid transparent;
}
.feed-side--buy  { color: #34d399; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.feed-side--sell { color: #f87171; background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.3); }
.feed-conf { font-size: 0.76rem; color: var(--text-muted); font-family: var(--font-mono); }
.feed-sim {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-muted); padding: 0.1rem 0.35rem; border-radius: var(--radius-full);
    border: 1px solid var(--border-input);
}
.feed-time { flex: 0 0 auto; font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; padding-top: 0.15rem; }

/* ── Leaderboard inline "follow" button (compact, in the entity cell) ── */
.lb-follow { display: inline-block; margin-left: 0.5rem; vertical-align: middle; }
.lb-follow-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.22rem 0.6rem !important;
    min-height: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1.2;
    white-space: nowrap;
}
.lb-follow-btn .material-symbols-outlined { font-size: 0.95rem; }

/* ── Markdown-rendered user content (forum topics, comments) ── */
.markdown-body { word-break: break-word; overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    margin: 1.1em 0 0.5em; line-height: 1.25; letter-spacing: -0.01em;
}
.markdown-body h1 { font-size: 1.5em; }
.markdown-body h2 { font-size: 1.3em; }
.markdown-body h3 { font-size: 1.12em; }
.markdown-body p { margin: 0 0 0.85em; }
.markdown-body ul, .markdown-body ol { margin: 0 0 0.85em; padding-left: 1.5em; }
.markdown-body li { margin: 0.2em 0; }
.markdown-body a { color: var(--text-accent); text-decoration: underline; text-underline-offset: 2px; }
.markdown-body a:hover { opacity: 0.85; }
.markdown-body strong { font-weight: 700; color: var(--text-primary); }
.markdown-body code {
    font-family: var(--font-mono); font-size: 0.88em;
    background: rgba(196, 132, 47, 0.10); border: 1px solid rgba(196, 132, 47, 0.18);
    border-radius: var(--radius-xs, 6px); padding: 0.08em 0.4em;
}
.markdown-body pre {
    background: var(--bg-input); border: 1px solid var(--border-input);
    border-radius: var(--radius-md); padding: 0.9rem 1rem; overflow-x: auto; margin: 0 0 0.85em;
}
.markdown-body pre code { background: none; border: none; padding: 0; font-size: 0.85em; }
.markdown-body blockquote {
    margin: 0 0 0.85em; padding: 0.4em 0 0.4em 1em;
    border-left: 3px solid var(--border-strong); color: var(--text-secondary);
}
.markdown-body hr { border: none; border-top: 1px solid var(--border-input); margin: 1.2em 0; }
.markdown-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.markdown-body table { border-collapse: collapse; margin: 0 0 0.85em; width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border-input); padding: 0.4em 0.6em; text-align: left; }

/* ── Topic list: admin pin button overlaid on the (link) card ── */
.topic-card-wrap { position: relative; }
.topic-card-pin { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; margin: 0; }
.topic-card-pin .btn { padding: 0.28rem 0.5rem !important; min-height: 0 !important; line-height: 1; }
.topic-card-pin .btn .material-symbols-outlined { display: block; }

/* ── Community topic cards in CLEAR (light) theme ──────────────────────────
   The base .topic-card (app.min.css) hard-codes a dark gradient background, so
   in light mode the cards stayed dark with low-contrast text. Re-skin them on a
   warm-white surface that matches the .glass-card-accent light convention, with
   an accent-lift on hover. Also covers the dashboard topics list (same class). */
[data-theme="clear"] .topic-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,248,245,0.92));
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm);
}
[data-theme="clear"] .topic-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}
[data-theme="clear"] .topic-card-title { color: var(--text-primary); }
[data-theme="clear"] .topic-card-snippet { color: var(--text-secondary); }
[data-theme="clear"] .topic-card-vote,
[data-theme="clear"] .topic-card-meta { color: var(--text-muted); }
/* Category chip: warmer tint + readable accent on the light surface. */
[data-theme="clear"] .topic-card-category {
    color: var(--text-accent);
    background: var(--accent-glow-strong, rgba(196,132,47,0.14));
}

/* ── Docs: numbered step guide + code blocks + scope pills (community-agents) ── */
.docs-steps { list-style: none; margin: clamp(1.5rem, 4vw, 2.5rem) 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.docs-step {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    background: var(--bg-card); border: 1px solid var(--border-input); border-radius: var(--radius-lg);
    transition: border-color 0.16s ease;
}
.docs-step:hover { border-color: var(--border-strong); }
.docs-step-num {
    flex: 0 0 auto; width: 2.2rem; height: 2.2rem;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 700; font-size: 1rem;
    color: var(--accent); background: rgba(196, 132, 47, 0.12);
    border: 1px solid var(--border-strong); border-radius: var(--radius-full);
}
.docs-step-body { min-width: 0; flex: 1 1 auto; }
.docs-step-title { margin: 0.1rem 0 0.7rem; font-size: clamp(1.1rem, 2.5vw, 1.35rem); }

.docs-code {
    margin: 0.7rem 0; padding: 1rem 1.1rem;
    background: linear-gradient(180deg, rgba(8, 8, 12, 0.55), rgba(8, 8, 12, 0.85));
    border: 1px solid var(--border-input); border-radius: var(--radius-md);
    overflow-x: auto; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.6;
    color: var(--text-secondary);
}
.docs-code code { background: none; border: none; padding: 0; color: inherit; font: inherit; white-space: pre; }

.docs-scopes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.docs-scope {
    font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-accent);
    background: rgba(196, 132, 47, 0.10); border: 1px solid rgba(196, 132, 47, 0.18);
    border-radius: var(--radius-sm); padding: 0.2rem 0.55rem;
}
@media (max-width: 560px) { .docs-step { flex-direction: column; gap: 0.65rem; } }

/* ── Resources page — elevate the link cards (icon tiles + hover accent) ── */
.resource-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: clamp(1.4rem, 2.5vw, 1.75rem);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-lg);
    height: 100%;
    transition: transform 0.16s ease, border-color 0.16s ease;
}
.resource-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.resource-icon {
    width: 46px;
    height: 46px;
    font-size: 1.45rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(196, 132, 47, 0.10);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    margin-bottom: 0.35rem;
}
.resource-card h3 { margin: 0; font-size: 1.08rem; letter-spacing: -0.01em; }
.resource-card p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.resource-arrow { top: clamp(1.4rem, 2.5vw, 1.75rem); }
/* a touch more air between the resources hero and the card grid is handled by
   the grid gap; ensure consistent gap if the page uses an ungapped grid */
.resource-card + .resource-card, .grid-3 > .resource-card { margin: 0; }

/* ════════════════════════════════════════════════════════════════════════
   PUBLIC-FRIENDLY REDESIGN (v5)
   Loaded last, so these rules win on equal specificity. Self-contained: the
   simulation modal lives on PUBLIC pages (only app.min.css is loaded there,
   not dashboard.min.css), so its overlay is fully defined here.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Hero "simulation" cue — one discreet pill that opens the modal ──────── */
.hero-note .sim-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    background: rgba(196, 132, 47, 0.08);
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}
.hero-note .sim-badge:hover { border-color: var(--accent); background: rgba(196, 132, 47, 0.14); }
.hero-note .sim-badge .material-symbols-outlined { font-size: 1.05rem; color: var(--accent); }
.sim-badge-more { color: var(--text-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Inline link-styled button (ecosystem footnote → opens the modal) */
.link-inline {
    background: none; border: 0; padding: 0; margin: 0; font: inherit;
    color: var(--text-accent); cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
}
.link-inline:hover { color: var(--accent); }

/* ── "Pourquoi Orynela" — merged 3-card grid (replaces Atouts + Bénéfices) ─ */
.section--why { padding-block: clamp(3rem, 6vw, 5rem); }
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
}
.why-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: clamp(1.4rem, 2.5vw, 1.9rem);
    height: 100%;
}
.why-icon {
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.6rem !important;
    color: var(--accent);
    background: rgba(196, 132, 47, 0.10);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    margin-bottom: 0.35rem;
}
.why-card h3 { margin: 0; font-size: 1.12rem; letter-spacing: -0.01em; }
.why-card p { margin: 0; color: var(--text-secondary); line-height: 1.6; font-size: 0.94rem; }
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr; } }

/* ── Final call-to-action band ──────────────────────────────────────────── */
.section--final-cta { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem); }
.final-cta-card {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.final-cta-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.final-cta-subtitle { margin: 0 auto; max-width: 560px; color: var(--text-secondary); line-height: 1.6; }
.final-cta-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }

/* ── Simulation & risk modal (self-contained overlay) ───────────────────── */
body.modal-open { overflow: hidden; }
.sim-modal {
    position: fixed; inset: 0; z-index: 2000;
    display: none;
    align-items: center; justify-content: center;
    padding: 1.25rem;
    background: rgba(6, 8, 14, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.sim-modal.is-open { display: flex; }
.sim-modal .modal-panel {
    width: min(540px, 100%);
    max-height: 90vh; overflow-y: auto;
    padding: clamp(1.4rem, 3vw, 1.75rem);
}
.sim-modal .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.sim-modal .modal-head h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 1.15rem; }
.sim-modal .modal-head h3 .material-symbols-outlined { color: var(--accent); }
.sim-modal .btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-medium); background: transparent;
    color: var(--text-secondary); cursor: pointer;
}
.sim-modal .btn-icon:hover { border-color: var(--accent); color: var(--text-primary); }
.sim-modal-body p { margin: 0 0 0.7rem; line-height: 1.6; color: var(--text-secondary); font-size: 0.92rem; }
.sim-modal-body p.muted { color: var(--text-muted); font-size: 0.86rem; }
.sim-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* ── Dashboard: "simulation mode" banner + locked real-money KPI cards ───── */
.sim-dashboard-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.25rem; margin-bottom: 1.25rem;
    border-left: 3px solid var(--accent);
}
.sim-dashboard-banner-text { display: flex; align-items: flex-start; gap: 0.7rem; }
.sim-dashboard-banner-text > .material-symbols-outlined { color: var(--accent); font-size: 1.4rem; }
.sim-dashboard-banner-text strong { display: block; font-size: 0.98rem; }
.sim-dashboard-banner-text span { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; }
[dir="rtl"] .sim-dashboard-banner { border-left: 0; border-right: 3px solid var(--accent); }

.stat-card-locked .stat-card-icon-sm { color: var(--text-muted); }
.stat-card-value--locked {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.92rem !important; font-weight: 600;
    color: var(--text-accent); text-decoration: none;
}
.stat-card-value--locked:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .sim-dashboard-banner { flex-direction: column; align-items: flex-start; }
    .hero-note .sim-badge { font-size: 0.78rem; }
}

/* ── Nav logo: a touch smaller (per request) ────────────────────────────── */
.nav-logo-icon { width: 30px !important; height: 30px !important; border-radius: 8px; }
@media (max-width: 640px) {
    .nav-logo-icon { width: 25px !important; height: 25px !important; border-radius: 6px; }
}

/* ── Connected-traders counter (hero + leaderboard) ─────────────────────── */
.live-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); vertical-align: middle; margin-right: 0.4rem;
    box-shadow: 0 0 0 0 rgba(50, 216, 143, 0.5);
    animation: livedot-pulse 2.2s ease-out infinite;
}
@keyframes livedot-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(50, 216, 143, 0.45); }
    70%  { box-shadow: 0 0 0 7px rgba(50, 216, 143, 0); }
    100% { box-shadow: 0 0 0 0 rgba(50, 216, 143, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.hero-traders {
    margin-top: 0.9rem; display: flex; align-items: center; flex-wrap: wrap;
    gap: 0.3rem; font-size: 0.92rem; color: var(--text-secondary);
}
.hero-traders strong { color: var(--text-primary); font-size: 1.02rem; }
.hero-traders-breakdown { color: var(--text-muted); }
.leaderboard-traders { margin-top: 0.7rem; font-size: 0.95rem; color: var(--text-secondary); }
.leaderboard-traders strong { color: var(--text-primary); }

/* ════════════════════════════════════════════════════════════════════════
   ai4trade — urban / tech mode (scoped, electric-mint accent)
   ════════════════════════════════════════════════════════════════════════ */
.a4t-nav-link { color: #7af0dd !important; }
.a4t-nav-link.active, .a4t-nav-link:hover { color: #3DE0C8 !important; }

.a4t-hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.a4t-grid-bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(61,224,200,0.07) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(61,224,200,0.07) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 28%, transparent 72%);
            mask-image: radial-gradient(ellipse at 50% 0%, #000 28%, transparent 72%);
}
.a4t-hero-inner { position: relative; text-align: center; }
.a4t-badge {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: var(--mono-detail); font-size: 0.78rem; letter-spacing: 0.14em;
    padding: 0.35rem 0.75rem; border-radius: var(--radius-full);
    border: 1px solid rgba(61,224,200,0.4); background: rgba(61,224,200,0.08); color: #7af0dd;
}
.a4t-badge .a4t-dot { width: 7px; height: 7px; border-radius: 50%; background: #3DE0C8; box-shadow: 0 0 8px #3DE0C8; }
.a4t-title { margin: 1rem auto 0.6rem; font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -0.02em; line-height: 1.08; max-width: 18ch; }
.a4t-subtitle { margin: 0 auto; max-width: 62ch; color: var(--text-secondary); line-height: 1.6; font-size: clamp(1rem, 2vw, 1.12rem); }
.a4t-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.a4t-live { margin-top: 1.25rem; font-size: 0.9rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; justify-content: center; }
.a4t-live strong { color: var(--text-primary); }
.a4t-eyebrow { font-family: var(--mono-detail); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: #3DE0C8; }
.a4t-steps, .a4t-modes { display: grid; gap: clamp(1rem, 2vw, 1.5rem); margin-top: 2rem; }
.a4t-steps { grid-template-columns: repeat(3, 1fr); }
.a4t-modes { grid-template-columns: repeat(2, 1fr); }
.a4t-step {
    position: relative; padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--border-medium); border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(61,224,200,0.045), transparent);
}
.a4t-step-num { font-family: var(--mono-detail); font-size: 0.8rem; color: #3DE0C8; opacity: 0.7; }
.a4t-step-icon { display: block; font-size: 1.8rem !important; color: #3DE0C8; margin: 0.5rem 0; }
.a4t-step h3 { margin: 0.3rem 0; font-size: 1.1rem; letter-spacing: -0.01em; }
.a4t-step p { margin: 0; color: var(--text-secondary); line-height: 1.55; font-size: 0.92rem; }
.a4t-mode { padding: clamp(1.5rem, 3vw, 2rem); border-radius: var(--radius-lg); border: 1px solid var(--border-medium); }
.a4t-mode--sim { border-color: rgba(61,224,200,0.4); background: rgba(61,224,200,0.05); }
.a4t-mode--real { border-color: var(--border-strong); background: rgba(196,132,47,0.05); }
.a4t-mode-tag { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 1.05rem; }
.a4t-mode--sim .a4t-mode-tag, .a4t-mode--sim .a4t-mode-tag .material-symbols-outlined { color: #7af0dd; }
.a4t-mode--real .a4t-mode-tag { color: var(--accent-gold); }
.a4t-lock { font-size: 1rem !important; opacity: 0.8; }
.a4t-mode p { color: var(--text-secondary); line-height: 1.6; margin: 0.6rem 0; font-size: 0.93rem; }
.a4t-real-note { color: var(--text-muted) !important; font-size: 0.84rem !important; }
.a4t-final {
    text-align: center; padding: clamp(2rem, 4vw, 3rem); border-radius: var(--radius-lg);
    border: 1px solid rgba(61,224,200,0.3);
    background: linear-gradient(180deg, rgba(61,224,200,0.06), transparent);
}
.a4t-final h2 { margin: 0 0 0.5rem; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.a4t-final p { color: var(--text-secondary); margin: 0 auto 1rem; max-width: 52ch; line-height: 1.6; }
.a4t-disclaimer { margin-top: 1.25rem; font-size: 0.84rem; color: var(--text-muted); display: flex; gap: 0.4rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.a4t-disclaimer .material-symbols-outlined { font-size: 1.05rem; color: #3DE0C8; }
@media (max-width: 860px) { .a4t-steps, .a4t-modes { grid-template-columns: 1fr; } }

/* ai4trade copy button (leaderboard rows) */
.a4t-copy-btn { border: 1px solid rgba(61,224,200,0.45) !important; color: #7af0dd !important; background: rgba(61,224,200,0.08) !important; }
.a4t-copy-btn:hover { background: rgba(61,224,200,0.16) !important; border-color: rgba(61,224,200,0.7) !important; }
.a4t-copy-btn--on { border-color: rgba(61,224,200,0.7) !important; color: #3DE0C8 !important; }
.a4t-copy-btn .material-symbols-outlined { font-size: 1rem !important; }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE / MOBILE — safe additive wins (pixel-tuning pending browser review)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Wide tables (leaderboard 9 cols, orders) scroll instead of overflowing */
    .table-leaderboard { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    .table-leaderboard thead th, .table-leaderboard tbody td { white-space: nowrap; }
    .data-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Leaderboard filters stack full-width */
    .leaderboard-filters .filter-form { flex-direction: column; align-items: stretch; gap: 0.6rem; }
    .leaderboard-filters .filter-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
    .leaderboard-filters select { width: 100%; }

    /* Comfortable tap targets for small buttons */
    .btn-sm { min-height: 38px; }

    /* The merged why-grid and ai4trade grids already collapse; ensure cards breathe */
    .final-cta-actions { width: 100%; }
}
@media (max-width: 460px) {
    /* Full-width primary actions on phones — no cramped side-by-side buttons */
    .hero-actions .btn, .a4t-actions .btn, .final-cta-actions .btn, .a4t-final .btn { width: 100%; justify-content: center; }
    .hero-traders, .a4t-live, .leaderboard-traders { font-size: 0.86rem; }
}

/* ── Leaderboard on phones: stacked cards (no h-scroll, actions always visible) ─
   At ≤640px the 9-col table becomes one card per row: entity + actions form the
   header, every metric becomes a "label : value" line. (Raised 640->768 so the
   641-768 band gets cards, not a cramped 9-col horizontal scroll.) */
@media (max-width: 768px) {
    .table-leaderboard { display: block; overflow: visible; white-space: normal; }
    .table-leaderboard thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
    .table-leaderboard tbody { display: block; }
    .table-leaderboard tbody tr {
        display: block;
        position: relative;
        padding: 0.85rem 1rem 0.9rem;
        margin-bottom: 0.7rem;
        border: 1px solid var(--border-color, rgba(255,255,255,0.09));
        border-radius: 14px;
        background: var(--surface-raised, rgba(255,255,255,0.025));
    }
    /* Generic metric cells: "Label" floated left, value right-aligned. */
    .table-leaderboard tbody td[data-label] {
        display: block;
        text-align: right;
        padding: 0.3rem 0 !important;
        border: 0 !important;
        white-space: normal;
        font-size: 0.92rem;
    }
    .table-leaderboard tbody td[data-label]::before {
        content: attr(data-label);
        float: left;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 0.8rem;
    }
    /* Rank → small marker pinned top-right of the card. */
    .table-leaderboard tbody td.lb-rank {
        position: absolute;
        top: 0.75rem;
        right: 0.95rem;
        padding: 0 !important;
        border: 0 !important;
        white-space: nowrap;
    }
    .table-leaderboard tbody td.lb-rank strong { color: var(--text-secondary); font-weight: 700; font-size: 0.95rem; }
    /* Entity → full-width card header: name (+ badge) then action buttons below. */
    .table-leaderboard tbody td.lb-entity {
        display: block;
        text-align: left;
        white-space: normal;
        padding: 0 2.6rem 0.55rem 0 !important;
        margin-bottom: 0.5rem;
        border: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.07) !important;
        font-size: 1rem;
        line-height: 1.4;
    }
    .table-leaderboard tbody td.lb-entity .badge { margin-left: 0.35rem; }
    .table-leaderboard tbody td.lb-entity .lb-follow { display: inline-flex; margin: 0.55rem 0.45rem 0 0; }
    .table-leaderboard tbody td.lb-entity .btn-sm { min-height: 40px; }
    .table-leaderboard tbody td.lb-entity .a4t-copy-btn { margin: 0.55rem 0.45rem 0 0; }
    /* Metrics digest line in mono, wrapping to the right. */
    .table-leaderboard tbody td.lb-metrics { font-family: var(--font-mono, monospace); font-size: 0.82rem; color: var(--text-secondary); }
    /* Empty-state cell shouldn't pretend to be a metric row. */
    .table-leaderboard tbody td[colspan]::before { content: none; }
    .table-leaderboard tbody td[colspan] { text-align: center; }
}

/* ── Mobile top nav: protect the wordmark, declutter the bar ─────────────── */
@media (max-width: 640px) {
    .nav-public .nav-brand { flex-shrink: 0; }
    .nav-public .nav-logo { white-space: nowrap; }
    /* The wide auth / dashboard text buttons move into the hamburger menu so the
       brand wordmark no longer collapses under the theme + language controls. */
    .nav-public .nav-actions > .btn { display: none !important; }
    .nav-public .nav-actions { gap: 0.4rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD v5 — clarity, polish & subscriber surfaces
   (loaded last, so these win the cascade over the hand-minified bundle)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Quick-actions bar: an always-visible, scannable entry point ───────────── */
.dash-quick{display:flex;gap:.6rem;flex-wrap:wrap}
.dash-quick-action{
    display:inline-flex;align-items:center;gap:.5rem;
    padding:.6rem 1rem;border-radius:var(--radius-md,12px);
    background:var(--bg-card,rgba(255,255,255,.03));
    border:1px solid var(--border-soft,rgba(255,255,255,.08));
    color:var(--text-secondary);font-size:.9rem;font-weight:500;text-decoration:none;
    transition:transform var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast),background var(--transition-fast);
}
.dash-quick-action .material-symbols-outlined{font-size:1.15rem;color:var(--accent)}
.dash-quick-action:hover{transform:translateY(-2px);border-color:var(--accent);color:var(--text-primary);background:var(--accent-glow,rgba(196,154,71,.08))}
.dash-quick-action--accent{border-color:var(--accent);color:var(--text-primary);background:var(--accent-glow,rgba(196,154,71,.10))}
.dash-quick-action--accent .material-symbols-outlined{color:var(--accent)}
@media(max-width:640px){
    .dash-quick{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:.2rem}
    .dash-quick::-webkit-scrollbar{display:none}
    .dash-quick-action{white-space:nowrap}
}

/* ── Stat cards: reserve a stable height so locking/unlocking never shifts the
      grid, and give the "go live" locked state a clear, premium read. ───────── */
.stats-grid .stat-card-v{min-height:118px;justify-content:flex-start}
.stat-card-v .stat-card-value{transition:color var(--transition-fast)}
.stat-card-value--locked{
    display:inline-flex;align-items:center;gap:.35rem;color:var(--accent)!important;
    font-weight:600;text-decoration:none;font-size:1rem
}
.stat-card-value--locked::before{
    font-family:'Material Symbols Outlined';content:'\e897';/* lock */
    font-size:1rem;opacity:.8
}
.stat-card-value--locked:hover{text-decoration:underline}
.stat-card-locked .stat-card-icon-sm{opacity:.6}

/* ── Sidebar: make the upgrade card visually distinct from nav links, and the
      premium lock chip quiet. ────────────────────────────────────────────── */
.sidebar-upgrade-card{
    margin-top:.5rem;padding:.9rem;border-radius:var(--radius-md,12px);
    background:linear-gradient(155deg,var(--accent-glow,rgba(196,154,71,.12)),rgba(255,255,255,.02));
    border:1px solid var(--accent);display:flex;flex-direction:column;gap:.5rem;align-items:flex-start
}
.sidebar-upgrade-card strong{font-size:.92rem;color:var(--text-primary)}
.sidebar-upgrade-card span{font-size:.78rem;color:var(--text-secondary);line-height:1.45}
.sidebar-upgrade-card .btn{width:100%;justify-content:center;margin-top:.15rem}
.sidebar-link .sidebar-lock{color:var(--text-muted)}

/* ── Analytics page (subscriber feature) ──────────────────────────────────── */
.analytics-kpis{
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1rem
}
@media(max-width:1100px){.analytics-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.analytics-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.analytics-kpi{display:flex;flex-direction:column;gap:.4rem;padding:clamp(1rem,1.5vw,1.35rem)}
.analytics-kpi .label{font-size:.78rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}
.analytics-kpi .value{font-size:clamp(1.25rem,2vw,1.6rem);font-weight:600;font-family:var(--font-mono,monospace)}
.analytics-kpi .value.pos{color:var(--success,#34d399)}
.analytics-kpi .value.neg{color:var(--danger,#f87171)}

/* Equity curve area chart (inline SVG) */
.equity-chart{width:100%;height:220px;display:block}
.equity-chart .area{fill:url(#equityGrad)}
.equity-chart .line{fill:none;stroke:var(--accent);stroke-width:2;vector-effect:non-scaling-stroke}
.equity-chart .baseline{stroke:var(--border-soft,rgba(255,255,255,.12));stroke-width:1;stroke-dasharray:3 4;vector-effect:non-scaling-stroke}

/* Blur-lock: non-subscribers see a real preview of their own data, gently
   blurred, with a centered unlock card — far more compelling than a hard wall. */
.lock-wrap{position:relative;border-radius:var(--radius-lg,16px);overflow:hidden}
.lock-wrap[data-locked="1"] .lock-content{filter:blur(7px);opacity:.55;pointer-events:none;user-select:none}
.lock-veil{
    position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;padding:1.5rem;
    background:radial-gradient(120% 120% at 50% 30%,transparent,rgba(8,8,12,.45))
}
.lock-card{
    text-align:center;max-width:380px;padding:1.6rem 1.5rem;border-radius:var(--radius-lg,16px);
    background:var(--bg-card-strong,rgba(16,16,22,.92));border:1px solid var(--accent);
    box-shadow:var(--shadow-md,0 18px 50px rgba(0,0,0,.45));backdrop-filter:blur(8px)
}
.lock-card .lock-ic{
    display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;
    background:var(--accent-glow,rgba(196,154,71,.14));color:var(--accent);margin-bottom:.75rem;font-size:24px
}
.lock-card h3{margin:0 0 .5rem;font-size:1.1rem;color:var(--text-primary)}
.lock-card p{margin:0 0 1.1rem;font-size:.88rem;line-height:1.55;color:var(--text-secondary)}
[data-theme="clear"] .lock-veil{background:radial-gradient(120% 120% at 50% 30%,transparent,rgba(255,255,255,.5))}
[data-theme="clear"] .lock-card{background:rgba(255,255,255,.97);border-color:var(--accent)}

/* Export menu (data export — subscriber feature) */
.export-menu{position:relative;display:inline-block}
.export-menu-list{
    position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:210px;display:none;
    background:var(--bg-card-strong,rgba(16,16,22,.96));border:1px solid var(--border-medium,rgba(255,255,255,.1));
    border-radius:var(--radius-md,12px);box-shadow:var(--shadow-md,0 18px 50px rgba(0,0,0,.45));padding:.35rem
}
.export-menu.open .export-menu-list{display:block}
.export-menu-list a,.export-menu-list span{
    display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:var(--radius-sm,8px);
    font-size:.85rem;color:var(--text-secondary);text-decoration:none;white-space:nowrap
}
.export-menu-list a:hover{background:var(--accent-glow,rgba(196,154,71,.1));color:var(--text-primary)}
.export-menu-list .locked{color:var(--text-muted);cursor:not-allowed}
.export-menu-list .locked .material-symbols-outlined{margin-left:auto;font-size:1rem}
[dir="rtl"] .export-menu-list{right:auto;left:0}

/* Pricing: concrete per-tier limits, set apart from the feature checklist. */
.pricing-limits{margin-top:.35rem;padding-top:.9rem;border-top:1px solid var(--border-soft,rgba(255,255,255,.08))}
.pricing-limits li .material-symbols-outlined{color:var(--accent)}

/* Copy-trading risk filter toggle (opt-in card on the copies page). */
.copy-risk-toggle{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:1rem 0;padding:1rem 1.25rem}
.copy-risk-toggle-text{max-width:48rem}
.copy-risk-toggle-text p{margin:.3rem 0 0;font-size:.85rem;line-height:1.5}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD v6 — onboarding hero + stat-card refinement
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Getting-started checklist (overview hero for new users) ──────────────── */
.dash-getstarted{padding:clamp(1.25rem,2.5vw,1.75rem)}
.dash-gs-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.dash-gs-title{margin:0;font-size:clamp(1.2rem,2.4vw,1.55rem);font-family:var(--font-display,inherit);letter-spacing:-0.02em;line-height:1.2}
.dash-gs-sub{margin:.3rem 0 0;font-size:.9rem;color:var(--text-secondary)}
.dash-gs-progress{flex:none;font-size:.85rem;color:var(--text-muted);font-family:var(--font-mono,monospace);padding:.3rem .7rem;border:1px solid var(--border-medium,rgba(255,255,255,.1));border-radius:999px}
.dash-gs-progress strong{color:var(--accent);font-size:1rem}
.dash-gs-bar{height:6px;border-radius:999px;background:var(--border-subtle,rgba(255,255,255,.08));overflow:hidden;margin:1rem 0 1.1rem}
.dash-gs-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-strong,var(--accent)));transition:width .6s cubic-bezier(.22,1,.36,1)}
.dash-gs-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.55rem;counter-reset:gs}
.dash-gs-step{display:flex;align-items:center;gap:.8rem;padding:.7rem .9rem;border-radius:var(--radius-md,12px);background:var(--bg-card,rgba(255,255,255,.03));border:1px solid var(--border-subtle,rgba(255,255,255,.07))}
.dash-gs-check{font-size:1.4rem;color:var(--text-muted);flex:none}
.dash-gs-step.is-done .dash-gs-check{color:var(--success,#34d399)}
.dash-gs-label{flex:1;font-size:.92rem;font-weight:500;color:var(--text-primary)}
.dash-gs-step.is-done .dash-gs-label{color:var(--text-muted)}
.dash-gs-cta{flex:none}
@media(max-width:520px){.dash-gs-step{flex-wrap:wrap}.dash-gs-cta{width:100%;justify-content:center}}

/* ── Stat cards: stronger number hierarchy + a quiet hover lift ──────────── */
.stats-grid .stat-card-v{transition:transform var(--transition-fast),border-color var(--transition-fast),box-shadow var(--transition-fast)}
.stats-grid .stat-card-v:hover{transform:translateY(-2px);border-color:var(--border-strong)}
.stat-card-v .stat-card-value{font-family:var(--font-display,inherit);font-weight:600;letter-spacing:-0.02em;line-height:1.05}
.stat-card-v .stat-card-icon-sm{transition:transform var(--transition-fast)}
.stats-grid .stat-card-v:hover .stat-card-icon-sm{transform:scale(1.06)}

/* ═══════════════════════════════════════════════════════════════════════════
   LEADERBOARD v2 — podium spotlight, refined ranking table, copy/follow CTAs.
   Cohesive in dark (glass-gold) AND clear (light) themes. Loaded last → wins.
   Copy keeps a distinct teal accent (mirror/replicate semantics); follow is the
   gold-family secondary. Tokenised teal so both themes stay legible.
   ═══════════════════════════════════════════════════════════════════════════ */
:root{ --lb-copy:#3DE0C8; --lb-copy-text:#7af0dd; --lb-copy-bg:rgba(61,224,200,0.08); --lb-copy-bd:rgba(61,224,200,0.45); }
[data-theme="clear"]{ --lb-copy:#0E8C78; --lb-copy-text:#0E7C6B; --lb-copy-bg:rgba(14,140,120,0.08); --lb-copy-bd:rgba(14,140,120,0.35); }

.lb-section-title{display:flex;align-items:center;gap:.5rem;margin:1.75rem 0 1rem;font-size:1.05rem;font-weight:600;letter-spacing:-0.01em;color:var(--text-primary)}
.lb-section-title .material-symbols-outlined{font-size:1.2rem;color:var(--accent)}
.lb-section-title:first-child{margin-top:0}

/* ── Podium ────────────────────────────────────────────────────────────── */
.lb-podium{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;align-items:stretch}
.lb-podium-card{position:relative;display:flex;flex-direction:column;gap:.85rem;padding:1.4rem 1.25rem 1.25rem;border-radius:var(--radius-lg,16px);
    background:linear-gradient(180deg,var(--bg-card-strong,rgba(20,20,26,.9)),var(--bg-card,rgba(14,14,18,.92)));
    border:1px solid var(--border-medium,rgba(255,255,255,.1));box-shadow:var(--shadow-sm);overflow:hidden;transition:transform var(--transition-fast),box-shadow var(--transition-fast),border-color var(--transition-fast)}
.lb-podium-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}
.lb-podium-card::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:var(--lb-medal,var(--border-medium))}
.lb-medal{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:var(--font-display,inherit);font-weight:700;font-size:1.15rem;
    background:color-mix(in srgb,var(--lb-medal,#888) 18%,transparent);color:var(--lb-medal,var(--text-primary));border:1px solid color-mix(in srgb,var(--lb-medal,#888) 45%,transparent)}
.lb-rank-1{--lb-medal:#E2B23C;border-color:color-mix(in srgb,#E2B23C 40%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,#E2B23C 25%,transparent),0 14px 40px rgba(226,178,60,.12)}
.lb-rank-2{--lb-medal:#B9C0CC}
.lb-rank-3{--lb-medal:#C8864B}
.lb-podium-id{display:flex;flex-direction:column;gap:.2rem;min-width:0}
.lb-podium-name{font-size:1.1rem;font-weight:600;color:var(--text-primary);text-decoration:none;letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis}
.lb-podium-name:hover{color:var(--accent)}
.lb-podium-sub{font-size:.82rem;color:var(--text-muted)}
.lb-kind{align-self:flex-start;font-size:.62rem!important;text-transform:uppercase;letter-spacing:.08em}
.lb-podium-metric{display:flex;flex-direction:column;gap:.1rem;margin-top:auto}
.lb-podium-metric-v{font-family:var(--font-display,inherit);font-size:1.5rem;font-weight:600;letter-spacing:-0.02em;line-height:1}
.lb-podium-metric-l{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted)}
.lb-podium-actions{display:flex;gap:.45rem;flex-wrap:wrap}
.lb-podium-actions .lb-act{flex:1 1 auto;justify-content:center}

/* ── Ranking table refinements ────────────────────────────────────────────── */
.table-leaderboard .lb-rank-badge{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 .4rem;border-radius:8px;
    font-family:var(--font-mono,monospace);font-weight:700;font-size:.82rem;color:var(--text-secondary);background:var(--bg-surface-soft,rgba(255,255,255,.04));border:1px solid var(--border-subtle,rgba(255,255,255,.07))}
.table-leaderboard .lb-rank-badge.lb-rank-1{color:#0A0A0C;background:#E2B23C;border-color:#E2B23C}
.table-leaderboard .lb-rank-badge.lb-rank-2{color:#0A0A0C;background:#B9C0CC;border-color:#B9C0CC}
.table-leaderboard .lb-rank-badge.lb-rank-3{color:#0A0A0C;background:#C8864B;border-color:#C8864B}
.lb-entity-id{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.lb-entity-name{font-weight:600}
.lb-entity-sub{font-size:.85rem}
.lb-num{font-family:var(--font-mono,monospace);white-space:nowrap}
.lb-score{font-family:var(--font-mono,monospace);color:var(--text-secondary)}
.lb-actions-col{text-align:right}
.lb-actions-wrap{display:flex;gap:.4rem;justify-content:flex-end;align-items:center;flex-wrap:wrap}

/* ── Copy / follow action buttons (used in podium + table) ───────────────── */
.lb-act-form{margin:0;display:inline-flex}
.lb-act{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}
.lb-act .material-symbols-outlined{font-size:1rem}
.lb-act-follow{border:1px solid var(--border-medium)!important;background:transparent!important;color:var(--text-secondary)!important}
.lb-act-follow:hover{border-color:var(--accent)!important;color:var(--text-primary)!important;background:var(--accent-glow,rgba(196,132,47,.08))!important}
.lb-act-follow.is-on{border-color:var(--border-accent,var(--accent))!important;color:var(--accent)!important;background:var(--accent-glow,rgba(196,132,47,.10))!important}
.lb-act-copy{border:1px solid var(--lb-copy-bd)!important;color:var(--lb-copy-text)!important;background:var(--lb-copy-bg)!important}
.lb-act-copy:hover{border-color:var(--lb-copy)!important;background:color-mix(in srgb,var(--lb-copy) 18%,transparent)!important}
.lb-act-copy.is-on{border-color:var(--lb-copy)!important;color:var(--lb-copy)!important;background:color-mix(in srgb,var(--lb-copy) 14%,transparent)!important;font-weight:600}
.lb-self{font-size:.78rem;color:var(--text-muted);font-style:italic;padding:.2rem .5rem;border:1px dashed var(--border-subtle);border-radius:999px}

/* ── Clear (light) theme: the base .table-leaderboard hardcodes a dark bg ──── */
[data-theme="clear"] .table-leaderboard{background:rgba(255,255,255,0.92);border:1px solid var(--border-medium)}
[data-theme="clear"] .table-leaderboard thead th{background:rgba(244,242,240,0.95);color:var(--text-muted);border-bottom:1px solid var(--border-medium)}
[data-theme="clear"] .table-leaderboard tbody td{border-bottom:1px solid var(--border-subtle)}
[data-theme="clear"] .table-leaderboard tbody tr:hover{background:var(--accent-glow,rgba(196,132,47,.06))}
[data-theme="clear"] .lb-podium-card{background:linear-gradient(180deg,rgba(255,255,255,0.97),rgba(250,248,245,0.92));border:1px solid var(--border-medium);box-shadow:var(--shadow-sm)}
[data-theme="clear"] .lb-rank-1{box-shadow:0 0 0 1px color-mix(in srgb,#E2B23C 30%,transparent),0 14px 40px rgba(226,178,60,.14)}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width:900px){ .lb-podium{grid-template-columns:1fr;gap:.75rem} .lb-podium-card{flex-direction:row;align-items:center;flex-wrap:wrap} .lb-podium-metric{margin:0 0 0 auto;text-align:right;align-items:flex-end} .lb-podium-actions{flex-basis:100%} }
@media (max-width:768px){
    /* The table collapses to cards (base rule). Make the actions cell full-width
       and drop the auto data-label so the buttons read cleanly. */
    .table-leaderboard tbody td.lb-actions{display:block;width:100%;text-align:left}
    .table-leaderboard tbody td.lb-actions::before{content:none}
    .table-leaderboard tbody td.lb-actions .lb-actions-wrap{justify-content:flex-start;margin-top:.35rem}
    .table-leaderboard tbody td.lb-actions .lb-act{min-height:40px}
    .table-leaderboard tbody td.lb-rank::before{content:none}
    .table-leaderboard tbody td.lb-entity::before{content:none}
    .table-leaderboard tbody td.lb-entity .lb-entity-name{font-size:1.02rem}
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEADERBOARD v5 — segmented filter pills, identity avatars, score-strength
   bars and spaced rounded ranking rows. Pure CSS / no JS. Cohesive in dark +
   clear themes. Loaded last → wins the cascade over the base table styles.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Filters: segmented pills (replace the old <select> dropdowns) ─────────── */
.leaderboard-filters{display:flex;flex-direction:column;gap:.85rem;margin-bottom:1.7rem}
.lb-seg-group{display:flex;align-items:center;gap:.9rem;flex-wrap:wrap}
.lb-seg-label{min-width:84px;font-size:.66rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted)}
.lb-seg{display:inline-flex;gap:.2rem;padding:.28rem;border:1px solid var(--border-subtle);border-radius:999px;background:rgba(12,12,15,.6);box-shadow:inset 0 1px 0 rgba(255,240,214,.05)}
.lb-seg-btn{display:inline-flex;align-items:center;gap:.45rem;padding:.5rem .95rem;border-radius:999px;font-size:.86rem;font-weight:600;color:var(--text-secondary);text-decoration:none;white-space:nowrap;transition:color var(--transition-fast),background var(--transition-fast),box-shadow var(--transition-fast)}
.lb-seg-btn .material-symbols-outlined{font-size:1.05rem}
.lb-seg-btn:hover{color:var(--text-primary)}
.lb-seg-btn.is-active{color:var(--text-inverse,#0A0A0C);background:linear-gradient(135deg,var(--accent) 0%,var(--accent-strong) 100%);font-weight:700;box-shadow:0 6px 16px rgba(196,132,47,.28),inset 0 1px 0 rgba(255,240,214,.18)}
.lb-seg--ghost .lb-seg-btn.is-active{color:var(--accent-gold);background:rgba(196,132,47,.13);border:1px solid var(--border-accent);box-shadow:none}
[data-theme="clear"] .lb-seg{background:rgba(0,0,0,.03);border-color:var(--border-medium)}
[data-theme="clear"] .lb-seg--ghost .lb-seg-btn.is-active{color:var(--accent);background:var(--accent-glow,rgba(196,132,47,.10))}

/* ── Identity avatar / glyph at the head of each row ──────────────────────── */
.lb-avatar{flex:0 0 auto;width:38px;height:38px;border-radius:11px;display:inline-grid;place-items:center;overflow:hidden;background:rgba(255,255,255,.04);border:1px solid var(--border-subtle)}
.lb-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.lb-avatar-glyph{color:var(--accent-gold);background:linear-gradient(135deg,rgba(42,42,51,.9),rgba(20,20,24,.95));border-color:var(--border-medium)}
.lb-avatar-glyph .material-symbols-outlined{font-size:1.25rem}
.lb-avatar-mono{font-family:var(--font-mono,monospace);font-size:.82rem;font-weight:700;color:var(--text-inverse,#0A0A0C);background:linear-gradient(135deg,var(--accent),var(--accent-strong));border:0;box-shadow:inset 0 1px 0 rgba(255,240,214,.18)}
[data-theme="clear"] .lb-avatar-glyph{background:linear-gradient(135deg,rgba(0,0,0,.05),rgba(0,0,0,.02))}

/* entity cell: avatar + stacked name / handle (overrides the inline layout) */
.lb-entity-row{display:flex;align-items:center;gap:.7rem;min-width:0}
.lb-entity-id{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;min-width:0}
.lb-entity-line{display:inline-flex;align-items:center;gap:.45rem;flex-wrap:wrap}

/* ── Score-strength bar inside the score cell ─────────────────────────────── */
.lb-score-v{display:block;font-family:var(--font-mono,monospace);color:var(--text-primary);font-size:.9rem}
.lb-score-bar{display:block;width:84px;max-width:100%;height:4px;margin-top:.42rem;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}
.lb-score-bar > i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--accent-strong))}
[data-theme="clear"] .lb-score-bar{background:rgba(0,0,0,.08)}

/* ── Desktop (≥769px): spaced, rounded ranking rows ───────────────────────── */
@media (min-width:769px){
    .table.table-leaderboard{width:100%;border-collapse:separate;border-spacing:0 .55rem;background:transparent!important;border:0!important;box-shadow:none!important;margin-top:.25rem}
    .table-leaderboard thead th{border:0;background:transparent;padding:.2rem 1rem .55rem;font-size:.66rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--text-muted)}
    .table-leaderboard tbody td{background:var(--bg-card,rgba(16,16,20,.78));border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);padding:.9rem 1rem;vertical-align:middle;transition:background var(--transition-fast),border-color var(--transition-fast)}
    .table-leaderboard tbody td:first-child{border-left:1px solid var(--border-subtle);border-top-left-radius:14px;border-bottom-left-radius:14px;padding-left:1.1rem}
    .table-leaderboard tbody td:last-child{border-right:1px solid var(--border-subtle);border-top-right-radius:14px;border-bottom-right-radius:14px;padding-right:1.1rem}
    .table-leaderboard tbody tr:hover td{background:var(--bg-card-hover,rgba(22,22,28,.92));border-color:var(--border-medium)}
    [data-theme="clear"] .table-leaderboard thead th{background:transparent;color:var(--text-muted)}
    [data-theme="clear"] .table-leaderboard tbody td{background:rgba(255,255,255,.92);border-color:var(--border-subtle)}
    [data-theme="clear"] .table-leaderboard tbody tr:hover td{background:var(--accent-glow,rgba(196,132,47,.06))}
}

/* ── Podium v2: a real stepped podium — centred cards, identity avatar with a
      medal badge, champion raised in the centre. Layout fully redefined here, so
      it wins over the earlier grid + 900px row rules via source order. The raise
      uses margin (not transform) → immune to .reveal.visible and reduced-motion. */
.lb-podium{display:grid;grid-template-columns:1fr;gap:1rem;align-items:stretch}
.lb-podium-card{
    display:flex;flex-direction:column;align-items:center;text-align:center;gap:.7rem;
    padding:1.5rem 1.25rem 1.3rem;border:1px solid var(--border-subtle);
    background:linear-gradient(180deg,rgba(22,21,25,.92),rgba(13,13,16,.96)),radial-gradient(120% 90% at 50% -10%,rgba(196,132,47,.12),transparent 55%);
    box-shadow:var(--shadow-sm),inset 0 1px 0 rgba(255,240,214,.055);
}
.lb-podium-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md),inset 0 1px 0 rgba(255,240,214,.06)}

/* identity figure: avatar with a medal badge clipped to its lower edge */
.lb-podium-figure{position:relative;width:72px;height:72px;margin:.15rem auto 0}
.lb-podium-figure .lb-avatar{width:72px;height:72px;border-radius:20px}
.lb-podium-figure .lb-avatar-glyph .material-symbols-outlined{font-size:2rem}
.lb-podium-figure .lb-avatar-mono{font-size:1.5rem}
.lb-podium-figure .lb-medal{
    position:absolute;bottom:-9px;left:50%;transform:translateX(-50%);
    width:30px;height:30px;border-radius:999px;border:2px solid var(--bg-secondary,#0F0F12);
    display:grid;place-items:center;font-family:var(--font-mono,monospace);font-weight:700;font-size:.82rem;color:#0E0C08;
    background:var(--lb-medal,var(--accent));box-shadow:0 4px 12px color-mix(in srgb,var(--lb-medal,var(--accent)) 45%,transparent);
}
.lb-podium-id{display:flex;flex-direction:column;align-items:center;gap:.25rem;margin:.6rem 0 0;min-width:0;max-width:100%}
.lb-podium-name{font-size:1.12rem}
.lb-podium-sub{font-family:var(--font-mono,monospace)}
.lb-kind{align-self:center!important}
.lb-podium-metric{align-items:center;text-align:center;margin:.25rem 0 0}
.lb-podium-actions{justify-content:center;width:100%}

/* champion keeps & enhances its gold glow (higher specificity than the base card) */
.lb-podium-card.lb-rank-1{
    border-color:rgba(226,178,60,.34);
    box-shadow:0 0 0 1px rgba(226,178,60,.20),0 22px 60px rgba(226,178,60,.12),inset 0 1px 0 rgba(255,240,214,.07);
}
.lb-podium-card.lb-rank-1:hover{box-shadow:0 0 0 1px rgba(226,178,60,.28),0 30px 80px rgba(226,178,60,.16),inset 0 1px 0 rgba(255,240,214,.08)}
.lb-podium-card.lb-rank-1 .lb-podium-figure .lb-avatar{box-shadow:0 0 0 2px rgba(226,178,60,.45),0 10px 30px rgba(226,178,60,.18)}
/* crown over the champion */
.lb-podium-card.lb-rank-1 .lb-podium-figure::after{
    content:"workspace_premium";font-family:'Material Symbols Outlined';
    position:absolute;top:-21px;left:50%;transform:translateX(-50%);font-size:1.2rem;color:#E2B23C;
    font-variation-settings:'FILL' 1;text-shadow:0 2px 10px rgba(226,178,60,.55);
}

/* desktop: arrange 2 – 1 – 3 with the champion bigger and raised in the centre */
@media (min-width:901px){
    .lb-podium{grid-template-columns:1fr 1.08fr 1fr;gap:1.1rem;align-items:end}
    .lb-podium-card.lb-rank-2{order:1}
    .lb-podium-card.lb-rank-1{order:2;margin-bottom:26px;padding:1.9rem 1.35rem 1.5rem}
    .lb-podium-card.lb-rank-3{order:3}
    .lb-podium-card.lb-rank-1 .lb-podium-figure{width:84px;height:84px}
    .lb-podium-card.lb-rank-1 .lb-podium-figure .lb-avatar{width:84px;height:84px;border-radius:22px}
    .lb-podium-card.lb-rank-1 .lb-podium-name{font-size:1.22rem}
}
[data-theme="clear"] .lb-podium-figure .lb-medal{border-color:#fff}
[data-theme="clear"] .lb-podium-card.lb-rank-1{border-color:rgba(226,178,60,.45)}

/* ── Mobile (≤768px): keep the new bits tidy inside the existing card view ──── */
@media (max-width:768px){
    .lb-seg-group{align-items:stretch;gap:.4rem}
    .lb-seg-label{min-width:0}
    .lb-seg{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
    .lb-seg::-webkit-scrollbar{display:none}
    .lb-score-v{display:inline}
    .lb-score-bar{display:none}
    .lb-avatar{width:34px;height:34px;border-radius:10px}
}

/* ═══════════════════════════════════════════════════════════════════════════
   REGISTER / AUTH v2 — fintech credibility: pseudo @handle, trust signals,
   lighter form (optional details collapsed). Cohesive in dark + clear themes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* @handle input with an inline prefix */
.input-affix{display:flex;align-items:center;border:1px solid var(--border-input,rgba(255,255,255,.12));border-radius:var(--radius-md,12px);background:var(--bg-input,rgba(255,255,255,.04));transition:border-color var(--transition-fast),box-shadow var(--transition-fast)}
.input-affix:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow,rgba(196,132,47,.12))}
.input-affix-prefix{padding-inline:.85rem .15rem;color:var(--text-muted);font-weight:600;font-family:var(--font-mono,monospace);user-select:none}
.input-affix .form-input{border:none!important;background:transparent!important;box-shadow:none!important;padding-left:.15rem;flex:1;min-width:0}
.input-affix .form-input:focus{outline:none!important;box-shadow:none!important}

.form-hint{margin:.35rem 0 0;font-size:.78rem;line-height:1.45;color:var(--text-muted)}
.form-optional{font-size:.78rem;font-weight:400;color:var(--text-muted);text-transform:lowercase;letter-spacing:.02em}

/* Collapsible optional contact details — keeps the form light & trustworthy */
.auth-optional{margin:0 0 1.1rem;border:1px solid var(--border-subtle,rgba(255,255,255,.08));border-radius:var(--radius-md,12px);background:var(--bg-surface-soft,rgba(196,132,47,.04));overflow:hidden}
.auth-optional>summary{display:flex;align-items:center;gap:.55rem;padding:.8rem 1rem;cursor:pointer;font-size:.9rem;color:var(--text-secondary);list-style:none}
.auth-optional>summary::-webkit-details-marker{display:none}
.auth-optional>summary .material-symbols-outlined:first-child{color:var(--accent);font-size:1.15rem}
.auth-optional-chevron{margin-inline-start:auto;font-size:1.2rem!important;color:var(--text-muted);transition:transform var(--transition-fast)}
.auth-optional[open]>summary .auth-optional-chevron{transform:rotate(180deg)}
.auth-optional>summary:hover{color:var(--text-primary)}
.auth-optional-body{padding:.25rem 1rem 1rem}

/* Trust row under the submit button */
.auth-trust-row{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;justify-content:center;list-style:none;margin:1rem 0 0;padding:0;font-size:.78rem;color:var(--text-muted)}
.auth-trust-row li{display:inline-flex;align-items:center;gap:.3rem}
.auth-trust-row .material-symbols-outlined{font-size:.95rem;color:var(--accent)}

/* Brand-panel trust badges + live social proof */
.auth-trust-badges{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.35rem}
.auth-trust-badge{display:inline-flex;align-items:center;gap:.35rem;font-size:.72rem;padding:.36rem .65rem;border-radius:999px;border:1px solid var(--border-medium,rgba(255,255,255,.1));color:var(--text-secondary);background:rgba(255,255,255,.03)}
.auth-trust-badge .material-symbols-outlined{font-size:.95rem;color:var(--accent)}
.auth-live-proof{display:flex;align-items:center;gap:.45rem;margin-top:1.1rem;font-size:.88rem;color:var(--text-secondary)}
.auth-live-proof strong{color:var(--text-primary);font-family:var(--font-mono,monospace)}

/* Clear (light) theme tweaks for the white-tinted surfaces above */
[data-theme="clear"] .auth-trust-badge{background:rgba(0,0,0,.025);border-color:var(--border-medium)}
[data-theme="clear"] .input-affix{background:var(--bg-input);border-color:var(--border-input)}

/* ── Agent passport: neutral-relay disclaimer ─────────────────────────────────
   Base (_agent-lab.css) hard-codes a near-black background → it showed as a dark
   grey block in clear theme. Re-skin for light, and add a compact bottom variant. */
[data-theme="clear"] .agent-lab-disclaimer{
    background:var(--bg-surface-soft,rgba(196,132,47,.04));
    border:1px solid var(--border-subtle,rgba(0,0,0,.08));
    color:var(--text-muted);
}
.agent-lab-disclaimer--compact{
    margin-top:1.5rem;
    font-size:.72rem;
    line-height:1.5;
    opacity:.85;
    text-align:center;
    max-width:680px;
    margin-inline:auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENT NETWORK PAGES — consensus, arena, integrate, explore strip
   (ai4trade-inspired). Cohesive in dark + clear themes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Discovery strip on /agents */
.agents-explore{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.agents-explore-card{display:flex;align-items:center;gap:.9rem;padding:1.1rem 1.25rem;text-decoration:none;transition:transform var(--transition-fast),border-color var(--transition-fast)}
.agents-explore-card:hover{transform:translateY(-2px);border-color:var(--accent)}
.agents-explore-card>.material-symbols-outlined{font-size:1.6rem;color:var(--accent);flex:none}
.agents-explore-card strong{display:block;color:var(--text-primary);letter-spacing:-0.01em}
.agents-explore-card span{display:block;font-size:.8rem;color:var(--text-muted)}
@media(max-width:760px){.agents-explore{grid-template-columns:1fr}}

/* AI Consensus */
.consensus-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}
.consensus-card{display:flex;flex-direction:column;gap:.75rem;padding:1.25rem;transition:transform var(--transition-fast),border-color var(--transition-fast)}
.consensus-card:hover{transform:translateY(-2px);border-color:var(--border-strong)}
.consensus-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.consensus-sym{font-size:1.15rem;font-family:var(--font-mono,monospace);letter-spacing:.02em;color:var(--text-primary)}
.consensus-verdict{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:.25rem .6rem;border-radius:999px;white-space:nowrap}
.consensus-verdict--buy{color:#06281c;background:#34d399}
.consensus-verdict--sell{color:#fff;background:#f87171}
.consensus-verdict--flat{color:var(--text-secondary);background:var(--border-subtle,rgba(255,255,255,.1))}
.consensus-bar{display:flex;height:10px;border-radius:999px;overflow:hidden;background:var(--border-subtle,rgba(255,255,255,.08))}
.consensus-bar span{display:block;height:100%}
.consensus-bar .cb-buy{background:#34d399}
.consensus-bar .cb-sell{background:#f87171}
.consensus-bar .cb-flat{background:var(--text-muted)}
.consensus-legend{display:flex;gap:.9rem;flex-wrap:wrap;font-size:.78rem}
.consensus-legend .cl-buy{color:#34d399}
.consensus-legend .cl-sell{color:#f87171}
.consensus-legend .cl-flat{color:var(--text-muted)}
.consensus-meta{display:flex;gap:1rem;flex-wrap:wrap;font-size:.76rem;color:var(--text-muted);border-top:1px solid var(--border-subtle,rgba(255,255,255,.07));padding-top:.7rem;margin-top:auto}
.consensus-meta span{display:inline-flex;align-items:center;gap:.3rem}
.consensus-meta .material-symbols-outlined{font-size:.95rem;color:var(--accent)}
.consensus-note{font-size:.78rem;margin-top:1.25rem;text-align:center;max-width:760px;margin-inline:auto}
[data-theme="clear"] .consensus-legend .cl-buy{color:#1A9E62}
[data-theme="clear"] .consensus-legend .cl-sell{color:#D9434E}

/* Agent Arena */
.arena-picker{padding:1.25rem;margin-bottom:1.5rem}
.arena-picker-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.85rem}
.arena-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.5rem;margin-bottom:1rem}
.arena-pick-item{display:flex;align-items:center;gap:.5rem;padding:.55rem .7rem;border:1px solid var(--border-subtle,rgba(255,255,255,.08));border-radius:var(--radius-md,12px);cursor:pointer;font-size:.88rem;transition:border-color var(--transition-fast),background var(--transition-fast)}
.arena-pick-item:hover{border-color:var(--border-medium)}
.arena-pick-item.is-on{border-color:var(--accent);background:var(--accent-glow,rgba(196,132,47,.08))}
.arena-pick-item input{accent-color:var(--accent)}
.arena-pick-item .material-symbols-outlined{font-size:1rem;color:var(--accent);flex:none}
.arena-pick-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arena-compare .data-table th:first-child,.arena-compare .data-table td:first-child{color:var(--text-muted)}
.arena-col{min-width:120px}

/* Integration steps + code block */
.integrate-steps{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:1.5rem}
.integrate-step{display:flex;gap:1rem}
.integrate-step-n{flex:none;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-family:var(--font-display,inherit);background:var(--accent-glow,rgba(196,132,47,.12));color:var(--accent);border:1px solid var(--border-accent,var(--accent))}
.integrate-step-body{flex:1;min-width:0}
.integrate-step-body h3{margin:.1rem 0 .35rem;font-size:1.05rem}
.integrate-hint{display:flex;align-items:center;gap:.4rem;font-size:.8rem;color:var(--text-muted);margin-top:.6rem}
.integrate-hint .material-symbols-outlined{font-size:1rem;color:var(--accent)}
.integrate-cta-row{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.5rem}
.integrate-note{font-size:.8rem;margin-top:1.75rem;text-align:center}
.code-block{position:relative;margin-top:.75rem;border-radius:var(--radius-md,12px);border:1px solid var(--border-medium,rgba(255,255,255,.1));background:rgba(10,10,14,.7);overflow:hidden}
.code-block pre{margin:0;padding:1rem 1.1rem;overflow-x:auto;font-family:var(--font-mono,monospace);font-size:.82rem;line-height:1.6;color:#d6e7e3;white-space:pre}
.code-copy{position:absolute;top:.5rem;right:.5rem;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);color:#9fb2ad;border-radius:8px;padding:.3rem;cursor:pointer;line-height:1;transition:color var(--transition-fast),border-color var(--transition-fast)}
.code-copy:hover{color:#fff;border-color:rgba(255,255,255,.3)}
.code-copy .material-symbols-outlined{font-size:1rem;display:block}
.code-copy.is-copied{color:#34d399;border-color:#34d399}
[dir="rtl"] .code-copy{right:auto;left:.5rem}

/* Arena equity-curve chart + integrate one-phrase box */
.arena-chart-card{padding:1.25rem;margin-bottom:1.5rem}
.arena-chart{width:100%;height:240px;display:block}
.arena-chart .arena-baseline{stroke:var(--border-medium,rgba(255,255,255,.14));stroke-dasharray:3 5;vector-effect:non-scaling-stroke}
.arena-legend{display:flex;flex-wrap:wrap;gap:1.1rem;margin-top:.85rem;font-size:.82rem;color:var(--text-secondary)}
.arena-legend-item{display:inline-flex;align-items:center;gap:.45rem}
.arena-legend-dot{width:14px;height:3px;border-radius:2px;display:inline-block;flex:none}
.integrate-phrase{padding:1.1rem 1.25rem;margin-bottom:1.5rem}
.integrate-phrase-head{display:flex;align-items:baseline;gap:.75rem;flex-wrap:wrap;margin-bottom:.55rem}
.integrate-phrase-head strong{display:inline-flex;align-items:center;gap:.35rem;color:var(--text-primary)}
.integrate-phrase-head .material-symbols-outlined{color:var(--accent);font-size:1.1rem}

/* ═══════════════════════════════════════════════════════════════════════════
   H. RESPONSIVE OVERHAUL (2026-06-04)
   Additive & reversible. Canonical breakpoints only: 640 / 768 / 1024 / 1280.
   Every rule is gated behind a max-width media query or :where() (specificity 0),
   so desktop >=1025px and existing rules are never disturbed. New code uses
   logical properties (padding-inline / inset) so RTL (ar, he) works for free.
   Backup of pre-overhaul file: _v4-polish.css.bak-2026-06-04
   ═══════════════════════════════════════════════════════════════════════════ */

/* H1 — Card/grid children may shrink, so long/unbreakable content is never
   clipped on phones (the body uses overflow-x:clip; an un-shrinkable child would
   be CUT OFF rather than scrolled). :where() keeps specificity 0 — never fights. */
:where(.glass-card, .panel-card, .surface-card, .stat-card) { min-width: 0; }

/* H2 — Filter bars: neutralize the inline `min-width:NNNpx` on search inputs and
   selects so they shrink and stack on phones. Inline styles require !important.
   Admin list pages use .panel-filters/.admin-filters (their selects carry the
   .form-input class); dashboard orders/performance use a raw inline-flex <form>. */
@media (max-width: 640px) {
  .panel-filters .form-input,  .panel-filters .form-select,
  .admin-filters .form-input,  .admin-filters .form-select,
  .filter-row    .form-input,  .filter-row    .form-select {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    width: 100%;
  }
  /* Raw inline-flex filter forms (e.g. dashboard/orders, dashboard/performance):
     just let the control shrink below its inline min-width. */
  form[style*="display:flex"] .form-select,
  form[style*="display:flex"] .form-input {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* H3 — Auth: the brand+form two-panel grid collapses to one column on
   tablet/phone, with the FORM first (order:-1). The brand/social-proof panel
   stays — it simply flows below the form. Nothing is hidden or cut off. */
@media (max-width: 768px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-grid .auth-panel { order: -1; }
}

/* H4 — Site promo banner: reclaim ~64px of horizontal space on phones
   (base padding is 0 3rem). padding-inline keeps the vertical padding intact
   and stays RTL-correct. */
@media (max-width: 640px) {
  .site-banner { padding-inline: 1rem; font-size: 0.72rem; }
}

/* H5 — Leaderboard cards in RTL: the stacked-card transform (raised to <=768px
   above) positions the rank marker and floats the data-labels with physical
   left/right. Mirror them for ar/he so the card header reads correctly. */
@media (max-width: 768px) {
  [dir="rtl"] .table-leaderboard tbody td[data-label]::before { float: right; }
  [dir="rtl"] .table-leaderboard tbody td.lb-rank { right: auto; left: 0.95rem; }
  [dir="rtl"] .table-leaderboard tbody td.lb-entity {
    padding: 0 0 0.55rem 2.6rem !important;
  }
}
/* H6 — Bot sub-pages (integration / api / paper) cohesive polish.
   `.integration-code-label` = the mono "OUTBOUND/INBOUND" labels above code blocks;
   the json-block guard keeps wide code from widening its panel-card on phones. */
.integration-code-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 0.55rem;
}
:where(.json-block) { min-width: 0; }
/* ── end H. RESPONSIVE OVERHAUL ─────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   ARENA v2 — matchup strip, colour-keyed contenders, head-to-head winner
   highlights and a richer equity chart. Cohesive in dark + clear themes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Picker: live selected feedback before submit (no JS, via :has) */
.arena-pick-item input{accent-color:var(--accent)}
.arena-pick-item:has(input:checked){border-color:var(--accent);background:var(--accent-glow,rgba(196,132,47,.08))}

/* Matchup strip — contenders colour-keyed to the chart line + table column */
.arena-matchup{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1rem;margin-bottom:1.5rem}
.arena-contender{position:relative;display:flex;flex-direction:column;gap:.18rem;padding:1.15rem 1.2rem 1rem;border:1px solid var(--border-subtle);border-radius:var(--radius-lg,16px);background:linear-gradient(180deg,rgba(20,20,24,.9),rgba(13,13,16,.95));box-shadow:var(--shadow-sm),inset 0 1px 0 rgba(255,240,214,.05);overflow:hidden}
.arena-contender::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:var(--c,var(--accent))}
.arena-contender-top{display:flex;align-items:center;justify-content:space-between}
.arena-contender-avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--c,var(--accent));background:color-mix(in srgb,var(--c,var(--accent)) 14%,transparent);border:1px solid color-mix(in srgb,var(--c,var(--accent)) 32%,transparent)}
.arena-contender-avatar .material-symbols-outlined{font-size:1.35rem}
.arena-contender-pos{width:24px;height:24px;border-radius:999px;display:grid;place-items:center;font-family:var(--font-mono,monospace);font-size:.78rem;font-weight:700;color:var(--text-muted);border:1px solid var(--border-subtle)}
.arena-contender-name{margin-top:.5rem;font-size:1.05rem;font-weight:600;letter-spacing:-.01em;color:var(--text-primary);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arena-contender-name:hover{color:var(--c,var(--accent))}
.arena-contender-sub{font-family:var(--font-mono,monospace);font-size:.74rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arena-contender-metric{margin-top:.55rem;font-family:var(--font-mono,monospace);font-size:1.5rem;font-weight:600;letter-spacing:-.02em;line-height:1}
.arena-contender-label{margin-top:.15rem;font-size:.64rem;text-transform:uppercase;letter-spacing:.09em;color:var(--text-muted);display:flex;align-items:center;gap:.4rem}
.arena-contender-foot{display:flex;justify-content:space-between;gap:.5rem;margin-top:.75rem;padding-top:.7rem;border-top:1px solid var(--border-subtle);font-size:.68rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}
.arena-contender-foot strong{display:block;margin-top:.15rem;font-family:var(--font-mono,monospace);font-size:.92rem;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text-secondary)}

/* Equity chart: cleaner baseline + legend chips */
.arena-baseline{stroke:var(--border-medium,rgba(255,255,255,.14));stroke-dasharray:3 5}
.arena-legend{gap:.55rem!important;margin-top:1rem!important}
.arena-legend-item{padding:.32rem .72rem;border:1px solid var(--border-subtle);border-radius:999px;background:rgba(255,255,255,.02)}
.arena-legend-item .pnl-positive,.arena-legend-item .pnl-negative{font-family:var(--font-mono,monospace);font-weight:600;margin-left:.2rem}

/* Comparison table: column colour accent + per-metric winner highlight
   (use .data-table.arena-table specificity so it wins over the row :hover). */
.arena-mono{font-family:var(--font-mono,monospace)}
.arena-col-slug{font-weight:400;font-size:.78rem}
.arena-table .arena-col{min-width:128px;border-top:2px solid var(--c,transparent)}
.data-table.arena-table tbody td.is-best{background:rgba(196,132,47,.12);box-shadow:inset 2px 0 0 var(--accent);font-weight:700;color:var(--text-primary)}
.data-table.arena-table tbody td.is-best.pnl-positive{color:var(--success,#32D88F)}
.data-table.arena-table tbody td.is-best.pnl-negative{color:var(--danger,#FF6B7A)}

/* Clear theme */
[data-theme="clear"] .arena-contender{background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(250,248,245,.92));border-color:var(--border-medium)}
[data-theme="clear"] .arena-contender-foot strong{color:var(--text-primary)}
[data-theme="clear"] .data-table.arena-table tbody td.is-best{background:var(--accent-glow,rgba(196,132,47,.1))}

/* Phones: two-up contenders */
@media (max-width:560px){
    .arena-matchup{grid-template-columns:1fr 1fr;gap:.7rem}
    .arena-contender{padding:.95rem .9rem .85rem}
    .arena-contender-metric{font-size:1.25rem}
    .arena-contender-foot{flex-direction:column;gap:.35rem}
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE — Access-waves FOMO band. FLAT treatment (inspired by the slide deck):
   a bordered surface with a thin copper top-rule + subtle inset highlight — no
   drop-shadow, no radial glow. Two seat tracks (humans + AI agents) fill toward
   the current wave's cap. Server-rendered %, CSS fill animation (no JS).
   ═══════════════════════════════════════════════════════════════════════════ */
.section--waves{padding-top:clamp(2rem,5vw,3.5rem);padding-bottom:clamp(2rem,5vw,3.5rem)}
.waves-panel{position:relative;max-width:760px;margin:0 auto;padding:clamp(1.6rem,3.6vw,2.4rem);text-align:center;display:flex;flex-direction:column;align-items:center;gap:.9rem;background:var(--bg-surface-soft,rgba(255,248,236,.025));border:1px solid var(--border-subtle);border-radius:14px;box-shadow:inset 0 1px 0 rgba(243,222,176,.10)}
.waves-panel::before{content:"";position:absolute;left:0;top:0;width:100%;height:2px;border-radius:14px 14px 0 0;background:linear-gradient(90deg,transparent,var(--accent) 50%,transparent)}
.waves-kicker{display:inline-flex;align-items:center;gap:.7rem;font-size:.72rem;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--accent-gold)}
.waves-kicker::before{content:"";width:30px;height:1px;background:linear-gradient(90deg,transparent,var(--accent))}
.waves-title{margin:0;max-width:20ch;font-family:var(--font-display);font-size:clamp(1.6rem,3.6vw,2.4rem);font-weight:600;letter-spacing:-.02em;line-height:1.14;color:var(--text-primary)}
.waves-grad{background:linear-gradient(98deg,var(--accent-gold-soft,#F3DEAB) 10%,var(--accent) 90%);-webkit-background-clip:text;background-clip:text;color:transparent}
.waves-subtitle{max-width:58ch;margin:0;color:var(--text-secondary);font-size:1rem}

.waves-progress{width:100%;max-width:480px;margin:.3rem auto 0;display:flex;flex-direction:column;align-items:center;gap:.9rem}
.waves-wavetag{display:inline-flex;align-items:center;gap:.45rem;padding:.32rem .85rem;border-radius:999px;border:1px solid var(--border-accent);background:var(--accent-glow,rgba(196,132,47,.10));font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent-gold)}
.waves-pulse{position:relative;width:7px;height:7px;border-radius:50%;background:var(--success,#32D88F)}
.waves-pulse::after{content:"";position:absolute;inset:-3px;border-radius:50%;background:var(--success,#32D88F);opacity:.4;animation:wavesPulse 2s ease-out infinite}
@keyframes wavesPulse{0%{transform:scale(.6);opacity:.5}100%{transform:scale(2.6);opacity:0}}
/* big headline percentage — slide-deck .statbig pattern (big mono figure + tiny label) */
.waves-statbig{text-align:center}
.waves-statbig b{display:block;font-family:var(--font-mono,monospace);font-size:clamp(2.4rem,6vw,3.4rem);font-weight:700;letter-spacing:-.02em;line-height:1;background:linear-gradient(98deg,var(--accent-gold-soft,#F3DEAB) 10%,var(--accent) 90%);-webkit-background-clip:text;background-clip:text;color:transparent}
.waves-statbig span{display:block;margin-top:.5rem;font-size:.66rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted)}
/* single flat progress bar — slide-deck .progress pattern (copper → gold-soft) */
.waves-bar{width:100%;height:8px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}
.waves-bar > i{display:block;height:100%;min-width:.5rem;border-radius:inherit;width:var(--p,0%);background:linear-gradient(90deg,var(--accent),var(--accent-gold-soft,#F3DEAB));animation:wavesFill 1.6s cubic-bezier(.2,.8,.2,1) both}
@keyframes wavesFill{from{width:0}to{width:var(--p,0%)}}
.waves-track-foot{font-size:.78rem;color:var(--text-muted)}
.waves-track-foot::before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--accent);margin-right:.4rem;vertical-align:middle;opacity:.7}
.waves-actions{display:flex;flex-wrap:wrap;gap:.7rem;justify-content:center;margin-top:.4rem}
.waves-note{margin:.1rem 0 0;font-size:.78rem;color:var(--text-muted)}
[data-theme="clear"] .waves-panel{background:rgba(0,0,0,.018);border-color:var(--border-medium);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
[data-theme="clear"] .waves-bar{background:rgba(0,0,0,.07)}
@media (prefers-reduced-motion:reduce){.waves-bar > i{animation:none}.waves-pulse::after{animation:none}}
@media (max-width:560px){
    .waves-statbig b{font-size:clamp(2.2rem,11vw,2.8rem)}
    .waves-actions{flex-direction:column}
    .waves-actions .btn{width:100%;justify-content:center}
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE — "Two doors, one environment" orbital schematic. Refined orbits +
   two colour-keyed entry nodes (AI chip ↔ community cluster) flowing into the
   Orynela core. Subtle CSS-only motion, reduced-motion safe. Dark + clear.
   ═══════════════════════════════════════════════════════════════════════════ */
.eco-diagram svg{overflow:visible}
.eco-label{font-family:'JetBrains Mono','Fira Code',monospace;font-size:8px;letter-spacing:.4px;fill:rgba(235,221,184,.82)}
.eco-core-text{font-family:'DM Sans',sans-serif;font-size:9px;font-weight:600;letter-spacing:1.2px;fill:#F3DEAB}
/* core + door halos pulse in place (own-box origin) */
.eco-core-halo,.eco-door-glow{transform-box:fill-box;transform-origin:center;animation:ecoPulse 3.6s ease-in-out infinite}
.eco-door-glow--b{animation-delay:1.4s}
/* ecosystem nodes orbit the centre (view-box origin) */
.eco-spin{transform-box:view-box;transform-origin:160px 160px;animation:ecoSpin 46s linear infinite}
.eco-spin--rev{animation-duration:62s;animation-direction:reverse}
/* entry flow lines stream toward the core */
.eco-flow{animation:ecoFlow 1.05s linear infinite}
@keyframes ecoSpin{to{transform:rotate(360deg)}}
@keyframes ecoPulse{0%,100%{opacity:.8;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}
@keyframes ecoFlow{to{stroke-dashoffset:-16}}
[data-theme="clear"] .eco-label{fill:rgba(120,90,40,.92)}
[data-theme="clear"] .eco-core-text{fill:#8a6320}
[data-theme="clear"] .eco-diagram circle[fill="#0E0B07"]{fill:#FBF7EF}
@media (prefers-reduced-motion:reduce){
    .eco-core-halo,.eco-door-glow,.eco-spin,.eco-flow{animation:none}
}

/* ════════════════════════════════════════════════════════════════════════════
   HOMEPAGE CINEMATIC HERO + GLASS NAV — scoped to body[data-page="home"] ONLY.
   Appended last in _v4-polish.css → wins on cascade order; the data-page scope
   wins on specificity. Reuses existing design tokens + the .reveal/.fade-delay-*
   entrance system (so the global prefers-reduced-motion guard above covers it).
   No other public/legal page is affected; nav.php markup is unchanged.
   ════════════════════════════════════════════════════════════════════════════ */

/* 1. Full-viewport centered hero over the video; deep-navy fallback (brief --background). */
body[data-page="home"] .hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;                 /* mobile chrome-aware */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    padding-bottom: var(--space-2xl);
    overflow: hidden;
    background: hsl(201 100% 13%);       /* deep-navy fallback if the video never paints */
    isolation: isolate;
}
body:has(.site-banner)[data-page="home"] .hero {
    min-height: calc(100vh - var(--banner-height));
    min-height: calc(100svh - var(--banner-height));
    padding-top: calc(var(--nav-height) + var(--banner-height));
}
body[data-page="home"] .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}
/* Subtle, premium legibility wash — no decorative blobs. */
body[data-page="home"] .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(6,16,24,0.40) 0%, rgba(6,16,24,0.28) 42%, rgba(6,12,18,0.78) 100%),
        radial-gradient(120% 80% at 50% 42%, transparent 45%, rgba(4,10,16,0.40) 100%);
}

/* 2. Centered single-column copy (collapse the 2-col grid). */
body[data-page="home"] .hero-shell {
    position: relative;
    z-index: 2;                         /* above video + overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}
body[data-page="home"] .hero-copy {
    max-width: clamp(20rem, 90vw, 60rem);
    margin-inline: auto;
}
body[data-page="home"] .hero-actions,
body[data-page="home"] .hero-traders,
body[data-page="home"] .hero-note {
    justify-content: center;
}
body[data-page="home"] .hero-kicker { margin-inline: auto; }
body[data-page="home"] .hero-kicker:empty { display: none; }   /* kicker_new is "" → no stray accent line */

/* 3. Premium Instrument-Serif H1 (font already loaded in head.php).
   Do NOT set height — the rotator pins .hero-title min-height inline (lockHeight). */
body[data-page="home"] .hero-title {
    font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    line-height: 1.04;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-wrap: balance;
    text-shadow: 0 1px 30px rgba(0,0,0,0.35);
}
body[data-page="home"] .hero-title strong {
    color: var(--text-accent);
    font-weight: 400;
    font-style: italic;
}
body[data-page="home"] .hero-subtitle {
    color: var(--text-secondary);
    margin-inline: auto;
    text-shadow: 0 1px 20px rgba(0,0,0,0.40);
}

/* 4. Relocated preview-card band — centered, on the page background below the hero. */
body[data-page="home"] .hero-preview-band {
    position: relative;
    z-index: 2;
    padding: clamp(var(--space-2xl), 6vw, var(--space-4xl)) 0 0;
    display: flex;
    justify-content: center;
}
body[data-page="home"] .hero-preview-band .hero-visual {
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
}

/* 5. Liquid-glass fixed nav (homepage only — nav.php is shared, so MUST stay scoped). */
body[data-page="home"] .nav-public {
    background: rgba(8,14,22,0.28);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}
body[data-page="home"] .nav-public.scrolled,
body[data-page="home"] .nav-public.is-open {
    background: rgba(8,14,22,0.55);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 20px 50px rgba(0,0,0,0.30);
}
body[data-page="home"] .nav-links a { color: var(--text-secondary); }
body[data-page="home"] .nav-links a:hover,
body[data-page="home"] .nav-links a.active { color: var(--text-primary); }
body[data-page="home"] .nav-logo { color: var(--text-primary); }

/* 4b. liquid-glass hero CTAs (keep brand-gold primary; glass outline). */
body[data-page="home"] .hero-actions .btn-primary {
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 10px 30px rgba(196,132,47,0.35);
}
body[data-page="home"] .hero-actions .btn-outline {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.20);
    color: var(--text-primary);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
body[data-page="home"] .hero-actions .btn-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(243,222,176,0.45);
}

/* 6. Suppress shared ambient decorations so the video is the sole backdrop (home only). */
body[data-page="home"] .ambient-bg,
body[data-page="home"] .data-threads,
body[data-page="home"] .ambient-orb,
body[data-page="home"] .cursor-glow { display: none; }

/* 7. Force light-on-dark even under the light theme.
   data-theme lives on <html>, data-page on <body> → chain ancestor→descendant.
   Re-pin text tokens so hero/nav children consuming var(--text-*) stay legible. */
[data-theme="clear"] body[data-page="home"] .hero,
[data-theme="clear"] body[data-page="home"] .nav-public {
    --text-primary: #F5F2ED;
    --text-secondary: rgba(235,230,220,0.82);
    --text-muted: rgba(200,195,185,0.65);
    --text-accent: #F2D0A0;
}
[data-theme="clear"] body[data-page="home"] .nav-public {
    background: rgba(8,14,22,0.28);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}
[data-theme="clear"] body[data-page="home"] .nav-public.scrolled,
[data-theme="clear"] body[data-page="home"] .nav-public.is-open {
    background: rgba(8,14,22,0.55);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 20px 50px rgba(0,0,0,0.30);
}
[data-theme="clear"] body[data-page="home"] .nav-toggle {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}
[data-theme="clear"] body[data-page="home"] .hero-title { color: #F5F2ED; }
[data-theme="clear"] body[data-page="home"] .hero-subtitle,
[data-theme="clear"] body[data-page="home"] .hero-traders { color: rgba(235,230,220,0.82); }
[data-theme="clear"] body[data-page="home"] .hero-actions .btn-outline {
    border-color: rgba(255,255,255,0.20);
    color: var(--text-primary);
}

/* 8. Mobile polish. */
@media (max-width: 768px) {
    body[data-page="home"] .hero { padding-inline: 1.25rem; }
    body[data-page="home"] .hero-actions { width: 100%; }
    body[data-page="home"] .hero-actions .btn { flex: 1 1 auto; }
}
