/* Research page (/research) — moved out of research.php so browsers and Cloudflare cache it */
    .courses-events .archive-pagination .pagination {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .courses-events .archive-pagination .pagination .page-item .page-link {
        border-radius: 6px;
        min-width: 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        box-shadow: none;
    }

    .courses-events .archive-pagination .pagination .page-item.pagination-ellipsis .page-link {
        min-width: 18px;
        width: 18px;
        border-color: transparent;
        background: transparent;
        pointer-events: none;
    }

    @media (max-width: 575px) {
        .courses-events .archive-pagination .pagination {
            gap: 4px;
        }

        .courses-events .archive-pagination .pagination .page-item .page-link {
            min-width: 34px;
            width: 34px;
            height: 34px;
        }

        .courses-events .archive-pagination .pagination .page-item.pagination-ellipsis .page-link {
            min-width: 14px;
            width: 14px;
        }
    }

    .courses-events .daily-commentary-widget {
        padding: 20px 22px;
        display: flex;
        flex-direction: column;
        max-height: min(580px, calc(100vh - 200px));
        overflow: hidden;
    }

    .courses-events .daily-commentary-widget .widget-title {
        margin: 0 0 10px;
        font-size: 18px;
        line-height: 1.15;
        font-weight: 700;
    }

    .courses-events .daily-commentary-widget .research-commentary-feed {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-right: 14px;
        margin-right: -6px;
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--default-color), transparent 78%) transparent;
    }

    .courses-events .daily-commentary-widget .latest-list.research-commentary-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .courses-events .daily-commentary-widget .latest-list.research-commentary-scroll::-webkit-scrollbar {
        width: 4px;
    }

    .courses-events .daily-commentary-widget .latest-list.research-commentary-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .courses-events .daily-commentary-widget .latest-list.research-commentary-scroll::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--default-color), transparent 78%);
        border-radius: 999px;
    }

    .courses-events .daily-commentary-widget .research-commentary-item {
        padding: 12px 0 14px;
        padding-right: 18px;
        border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        position: relative;
    }

    .courses-events .daily-commentary-widget .research-commentary-item:last-child {
        border-bottom: 0;
        padding-bottom: 6px;
    }

    .courses-events .daily-commentary-widget .research-commentary-item[data-feed-href] {
        cursor: pointer;
    }

    .courses-events .daily-commentary-widget .research-commentary-item[data-feed-href]:hover .research-inline-symbol {
        color: inherit;
    }

    .courses-events .daily-commentary-widget .research-commentary-item[data-feed-href]:focus-visible {
        outline: 2px solid color-mix(in srgb, var(--accent-color), transparent 45%);
        outline-offset: 3px;
    }

    .courses-events .daily-commentary-widget .research-commentary-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 7px;
    }

    .courses-events .daily-commentary-widget .research-commentary-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        min-width: 0;
    }

    .courses-events .daily-commentary-widget .research-commentary-label {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        font-size: 10px;
        line-height: 1.2;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: color-mix(in srgb, var(--default-color), transparent 44%);
    }

    .courses-events .daily-commentary-widget .research-commentary-time {
        flex: 0 0 auto;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
        letter-spacing: 0;
        text-transform: none;
        color: color-mix(in srgb, var(--default-color), transparent 48%);
        white-space: nowrap;
        margin-right: -2px;
    }

    .courses-events .daily-commentary-widget .research-commentary-item.is-unread .research-commentary-time::before {
        content: "";
        display: inline-block;
        width: 7px;
        height: 7px;
        margin-right: 7px;
        border-radius: 999px;
        background: var(--accent-color);
        vertical-align: 0.05em;
    }

    .courses-events .daily-commentary-widget .research-commentary-body {
        font-size: 14px;
        line-height: 1.52;
        font-weight: 500;
        white-space: normal;
        overflow-wrap: anywhere;
        color: var(--heading-color);
    }

    .courses-events .daily-commentary-widget .research-commentary-body--activity {
        font-weight: 500;
    }

    .courses-events .daily-commentary-widget .research-commentary-emoji,
    .research-mobile-notes-panel .research-commentary-emoji {
        display: inline-block;
        margin-right: 0.42em;
        vertical-align: -0.04em;
    }

    .courses-events .daily-commentary-widget .research-inline-symbol {
        display: inline !important;
        flex: none !important;
        flex-direction: row !important;
        gap: 0 !important;
        color: inherit;
        font-weight: 700;
        text-decoration: none;
    }

    .courses-events .archive-sidebar .daily-commentary-widget .latest-item a.research-inline-symbol {
        display: inline !important;
        flex: none !important;
        flex-direction: row !important;
        gap: 0 !important;
    }

    .courses-events .daily-commentary-widget a.research-inline-symbol:hover {
        color: inherit;
    }

    .courses-events .daily-commentary-widget .research-inline-pnl {
        display: inline;
        font-weight: inherit;
        white-space: nowrap;
    }

    .courses-events .daily-commentary-widget .research-inline-pnl--positive {
        color: #15803d;
    }

    .courses-events .daily-commentary-widget .research-inline-pnl--negative {
        color: #b42318;
    }

    .courses-events .daily-commentary-widget .research-inline-pnl--neutral {
        color: color-mix(in srgb, var(--default-color), transparent 25%);
    }

    .courses-events .daily-commentary-widget .research-secret {
        display: inline-block;
        filter: blur(3.5px);
        opacity: .72;
        user-select: none;
        pointer-events: none;
    }

    .courses-events .daily-commentary-widget .research-inline-symbol--masked,
    .courses-events .daily-commentary-widget .research-inline-detail--masked {
        color: inherit;
        font-weight: inherit;
        letter-spacing: inherit;
    }

    .courses-events .daily-commentary-widget .research-activity-lines {
        display: flex;
        flex-direction: column;
        gap: 4px;
        color: var(--heading-color);
    }

    .courses-events .daily-commentary-widget .research-activity-line {
        font-size: 14px;
        line-height: 1.42;
        font-weight: 500;
        overflow-wrap: anywhere;
    }

    .courses-events .daily-commentary-widget .research-activity-symbol-row {
        display: flex;
        align-items: baseline;
        gap: 8px;
        min-width: 0;
    }

    .courses-events .daily-commentary-widget .research-activity-symbol {
        flex: 0 0 auto;
        color: var(--heading-color);
        font-size: 14px;
        line-height: 1.2;
        font-weight: 700;
        text-decoration: none;
        letter-spacing: 0;
    }

    .courses-events .daily-commentary-widget a.research-activity-symbol:hover {
        color: var(--accent-color);
    }

    .courses-events .daily-commentary-widget .research-activity-symbol-detail {
        min-width: 0;
        color: color-mix(in srgb, var(--default-color), transparent 32%);
        font-size: 14px;
        line-height: 1.35;
        font-weight: 500;
    }

    .courses-events .daily-commentary-widget .research-activity-line--positive {
        color: #15803d;
    }

    .courses-events .daily-commentary-widget .research-activity-line--negative {
        color: #b42318;
    }

    .courses-events .daily-commentary-widget .research-activity-line--neutral {
        color: color-mix(in srgb, var(--default-color), transparent 25%);
    }

    .courses-events .daily-commentary-widget .research-commentary-footer {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-top: 8px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .courses-events .daily-commentary-widget .research-commentary-footer-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
        min-width: 0;
    }

    .courses-events .daily-commentary-widget .research-commentary-actions {
        display: flex;
        align-items: center;
        gap: 4px;
        flex: 0 0 auto;
        margin-top: 1px;
        opacity: .9;
        flex-shrink: 0;
    }

    .courses-events .daily-commentary-widget .research-commentary-action {
        width: 22px;
        height: 22px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: color-mix(in srgb, var(--heading-color), transparent 18%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        box-shadow: none;
        transition: background-color .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
        opacity: .8;
        flex: 0 0 auto;
    }

    .courses-events .daily-commentary-widget .research-commentary-action:hover {
        background: color-mix(in srgb, var(--accent-color), transparent 90%);
        color: var(--heading-color);
        opacity: 1;
        transform: translateY(-1px);
    }

    .courses-events .daily-commentary-widget .research-commentary-action img {
        width: 14px;
        height: 14px;
        display: block;
        object-fit: contain;
    }

    .courses-events .daily-commentary-widget .research-commentary-action-icon {
        width: 14px;
        height: 14px;
        display: block;
        object-fit: contain;
        flex: 0 0 auto;
    }

    .courses-events .daily-commentary-widget .research-commentary-indicator {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        opacity: .8;
        flex: 0 0 auto;
        margin-top: 1px;
    }

    .courses-events .daily-commentary-widget .research-commentary-indicator-icon {
        width: 14px;
        height: 14px;
        display: block;
        object-fit: contain;
        flex: 0 0 auto;
    }

    .courses-events .daily-commentary-widget .research-commentary-action--danger {
        color: #b42318;
    }

    .courses-events .daily-commentary-widget .research-commentary-action--danger:hover {
        background: color-mix(in srgb, #b42318, transparent 90%);
        color: #b42318;
    }

    .courses-events .daily-commentary-widget .research-pending-section {
        margin-top: 14px;
    }

    .courses-events .daily-commentary-widget .research-subtitle {
        margin: 0 0 8px;
        font-size: 13px;
        line-height: 1.35;
        font-weight: 700;
        letter-spacing: .02em;
        color: color-mix(in srgb, var(--heading-color), transparent 10%);
    }

    .courses-events .daily-commentary-widget .research-pending-list {
        margin-top: 0;
    }

    .courses-events .daily-commentary-widget .research-entry-form {
        margin-top: 10px;
        flex: 0 0 auto;
    }

    .courses-events .daily-commentary-widget .research-entry-form .nl-input-wrap {
        align-items: center;
        min-height: 45px;
        background: var(--surface-color);
        border-radius: var(--bs-border-radius);
        box-shadow: none;
    }

    .courses-events .daily-commentary-widget .research-entry-form .nl-input-wrap input {
        height: 45px;
        padding: 0 48px 0 14px;
        font-size: 14px;
        border: 1px solid color-mix(in srgb, var(--default-color), transparent 82%);
        border-radius: var(--bs-border-radius);
    }

    .courses-events .daily-commentary-widget .research-entry-form .nl-input-wrap input:focus {
        border-color: color-mix(in srgb, var(--accent-color), transparent 55%);
    }

    .courses-events .daily-commentary-widget .research-entry-form .nl-confirm-btn {
        right: 8px;
        width: 28px;
        height: 28px;
    }

    .courses-events .daily-commentary-widget .research-entry-form .nl-confirm-btn .icon {
        width: 20px;
        height: 20px;
    }

    .courses-events .daily-commentary-widget .research-entry-destination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-self: center;
        width: fit-content;
        max-width: 100%;
        gap: 6px;
        margin-top: 8px;
    }

    .courses-events .daily-commentary-widget .research-entry-destination label {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin: 0;
        padding: 5px 10px;
        border: 1px solid color-mix(in srgb, var(--default-color), transparent 82%);
        border-radius: 999px;
        background: color-mix(in srgb, var(--surface-color), var(--default-color) 2%);
        color: color-mix(in srgb, var(--default-color), transparent 18%);
        font-size: 11px;
        line-height: 1.2;
        font-weight: 600;
        cursor: pointer;
    }

    .courses-events .daily-commentary-widget .research-entry-destination input {
        margin: 0;
        transform: scale(.92);
    }

    .courses-events .daily-commentary-widget .research-commentary-empty {
        font-size: 13px;
        line-height: 1.45;
        color: color-mix(in srgb, var(--default-color), transparent 30%);
    }

    .courses-events .archive-sidebar .popular-widget,
    .courses-events .archive-sidebar .latest-widget {
        padding: 18px 20px;
    }

    .courses-events .archive-sidebar .newsletter-widget {
        padding: 18px 20px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        background-color: #f5f8fc;
        background-image: linear-gradient(135deg, rgba(58, 141, 206, 0.12), #ffffff);
    }

    /* desktop: sidebar runs the full height of the list, free-setup card goes first and sticks under the header; the other widgets scroll beneath it */
    @media (min-width: 992px) {
        .courses-events .archive-shell > .archive-sidebar {
            align-self: stretch;
        }

        .courses-events .archive-sidebar .newsletter-widget {
            order: -1;
            position: sticky;
            top: 110px;
            z-index: 2;
            overflow: visible;
        }

        /* sidebar free-setup card has no close button; only the mobile sticky bar (#nl-sticky, outside the sidebar) can be closed */
    .courses-events .archive-sidebar .newsletter-widget .nl-close {
        display: none;
    }

    /* sidebar boxes are flat (border, no shadow) so nothing spills out around the sticky card */
        .courses-events .archive-sidebar .sidebar-widget {
            box-shadow: none;
        }

        /* while stuck, cover the gap above the card so widgets scrolling underneath don't peek out */
        /* covers from the top of the window down to the card's top border, and fills the
           areas outside its rounded top corners; never paints over the card itself */
        .courses-events .archive-sidebar .newsletter-widget.is-stuck::before {
            --zl-r: var(--bs-border-radius);
            content: "";
            position: absolute;
            left: -1px;
            right: -1px;
            bottom: calc(100% + 1px - var(--zl-r));
            height: calc(110px + var(--zl-r));
            background:
                radial-gradient(circle at 100% 100%, transparent calc(var(--zl-r) - 0.5px), var(--surface-color) var(--zl-r)) left bottom / var(--zl-r) var(--zl-r) no-repeat,
                radial-gradient(circle at 0 100%, transparent calc(var(--zl-r) - 0.5px), var(--surface-color) var(--zl-r)) right bottom / var(--zl-r) var(--zl-r) no-repeat,
                linear-gradient(var(--surface-color), var(--surface-color)) left top / 100% calc(100% - var(--zl-r)) no-repeat;
            pointer-events: none;
        }
    }

    /* ---- research list cards ---- */
    @media (min-width: 768px) {
        .courses-events .research-card-link {
            grid-template-columns: 180px minmax(0, 1fr);
            min-height: 156px;
        }

        .courses-events .research-card-media {
            min-height: 156px;
        }

        .courses-events .research-card--featured .research-card-link {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            min-height: 300px;
        }

        .courses-events .research-card--featured .research-card-media {
            min-height: 300px;
        }

        .courses-events .research-card--featured .research-card-body {
            padding: 26px 30px;
        }

        .courses-events .research-card--featured .research-title {
            font-size: 28px;
        }
    }

    .courses-events .research-title {
        font-size: 20px;
        font-weight: 650;
        margin-bottom: 8px;
    }

    .courses-events .research-excerpt {
        font-size: 14px;
        line-height: 1.55;
    }

    /* small lock in the bottom-right corner of the thumbnail */
    .courses-events .research-card-lock {
        top: auto;
        left: auto;
        right: 8px;
        bottom: 8px;
        transform: none;
        width: 30px;
        height: 30px;
    }

    .courses-events .research-card-lock img {
        width: 14px !important;
        height: 14px !important;
    }

    .courses-events .research-hold {
        font-weight: 600;
        opacity: 0.75;
    }

    .courses-events .research-card {
        position: relative;
    }

    /* "New" tab in the card's top-right corner */
    .courses-events .research-new {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 2;
        padding: 4px 10px;
        border-radius: 0 0 0 8px;
        text-transform: uppercase;
        line-height: 1.2;
        background: var(--heading-color);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    .courses-events .research-type--featured {
        color: var(--heading-color);
        font-weight: 700;
    }

    .courses-events .research-ticker {
        margin-left: 4px;
        padding: 3px 6px;
        border: 1px solid rgba(15, 23, 42, 0.18);
        border-radius: 6px;
        color: var(--heading-color);
        font-weight: 700;
        letter-spacing: 0.03em;
    }

    /* desktop: ticker chip sits on the image (top-left, where the date badge was); phones keep it in the meta line */
    .courses-events .research-ticker--media {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 2;
        margin: 0;
        font-size: 11px;
        line-height: 1;
        text-transform: uppercase;
        background: rgba(255, 255, 255, 0.92);
        border-color: rgba(255, 255, 255, 0.6);
    }

    @media (max-width: 767px) {
        .courses-events .research-ticker--media {
            top: 6px;
            left: 6px;
            padding: 2px 5px;
            font-size: 10px;
        }
    }

    /* featured weekly: chart as full-card background, dark fade on the text side */
    .courses-events .research-card--featured {
        position: relative;
        border-color: #0b1220;
        background: #0b1220;
    }

    .courses-events .research-card--featured .research-card-link {
        display: block;
        position: relative;
        min-height: 300px;
    }

    .courses-events .research-card--featured .research-card-media {
        position: absolute;
        inset: 0;
        min-height: 0;
        border: 0;
        background: #0b1220;
    }

    .courses-events .research-card--featured .research-card-media > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
        object-position: right center;
        filter: none;
    }

    .courses-events .research-card--featured .research-card-media::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(11, 18, 32, 0.97) 0%, rgba(11, 18, 32, 0.9) 42%, rgba(11, 18, 32, 0.45) 75%, rgba(11, 18, 32, 0.25) 100%);
    }

    .courses-events .research-card--featured .research-card-lock {
        z-index: 1;
        top: 50%;
        left: auto;
        right: 12%;
        transform: translateY(-50%);
    }

    .courses-events .research-card--featured .research-card-body {
        position: relative;
        z-index: 1;
        max-width: 62%;
        min-height: 300px;
        padding: 30px 34px;
    }

    .courses-events .research-card--featured .research-meta,
    .courses-events .research-card--featured .research-meta time {
        color: rgba(255, 255, 255, 0.62);
    }

    .courses-events .research-card--featured .research-type--featured {
        color: #fff;
    }

    .courses-events .research-card--featured .research-title {
        color: #fff;
    }

    .courses-events .research-card--featured .research-excerpt {
        font-size: 15px;
        color: rgba(255, 255, 255, 0.78);
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }

    .courses-events .research-featured-cta {
        margin-top: 16px;
        font-size: 14px;
        font-weight: 700;
        color: #7cc4ff;
    }

    .courses-events .research-card--featured:hover {
        border-color: #0b1220;
    }

    @media (max-width: 767px) {
        .courses-events .research-card--featured .research-card-link,
        .courses-events .research-card--featured .research-card-body {
            min-height: 0;
        }

        .courses-events .research-card--featured .research-card-body {
            max-width: none;
            padding: 22px 20px 20px;
        }

        .courses-events .research-card--featured .research-card-media::after {
            background: linear-gradient(180deg, rgba(11, 18, 32, 0.62) 0%, rgba(11, 18, 32, 0.82) 100%);
        }

        .courses-events .research-card--featured .research-card-lock {
            display: none;
        }

        .courses-events .research-card--featured .research-title {
            font-size: 22px;
        }

        .courses-events .research-card--featured .research-excerpt {
            font-size: 14px;
            -webkit-line-clamp: 3;
            line-clamp: 3;
        }
    }

    .courses-events .research-featured-wrap {
        margin: 0 0 24px;
    }

    .courses-events .archive-section-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        margin: 0 0 14px;
        scroll-margin-top: 110px;
    }

    .courses-events .archive-section-head .archive-section-title {
        margin: 0;
    }

    .courses-events .archive-page-indicator {
        font-size: 13px;
        font-weight: 600;
        color: color-mix(in srgb, var(--default-color), transparent 35%);
        white-space: nowrap;
    }

    @media (max-width: 767px) {
        .courses-events .archive-section-head {
            scroll-margin-top: 80px;
        }
    }

    .courses-events .research-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0 0 18px;
    }

    .courses-events .research-tab {
        padding: 7px 14px;
        border: 1px solid rgba(15, 23, 42, 0.14);
        border-radius: 999px;
        color: var(--default-color);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        transition: border-color 0.2s ease, background-color 0.2s ease;
    }

    .courses-events .research-tab:hover {
        border-color: rgba(15, 23, 42, 0.32);
    }

    .courses-events .research-tab.is-active {
        background: var(--heading-color);
        border-color: var(--heading-color);
        color: #fff;
    }

    .courses-events .research-result {
        display: none;
    }

    .courses-events .research-result.is-positive {
        color: #15803d;
    }

    .courses-events .research-result.is-negative {
        color: #b91c1c;
    }

    .courses-events .archive-sidebar .results-widget {
        padding: 18px 20px;
    }

    .courses-events .results-list {
        display: flex;
        flex-direction: column;
    }

    .courses-events .results-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 12px;
        padding: 9px 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        color: inherit;
        text-decoration: none;
        font-size: 14px;
    }

    .courses-events .results-symbol {
        font-weight: 700;
        color: var(--heading-color);
    }

    .courses-events .results-symbol--hidden {
        filter: blur(5px);
        user-select: none;
    }

    .courses-events .results-date {
        font-size: 12px;
        color: #64748b;
    }

    .courses-events .results-pct {
        min-width: 58px;
        text-align: right;
        font-weight: 700;
    }

    .courses-events .results-pct.is-positive {
        color: #15803d;
    }

    .courses-events .results-pct.is-negative {
        color: #b91c1c;
    }

    .courses-events .results-all {
        display: block;
        margin-top: 14px;
        padding: 9px 12px;
        border: 1px solid rgba(15, 23, 42, 0.18);
        border-radius: 8px;
        background: #fff;
        color: var(--heading-color);
        font-size: 13px;
        font-weight: 700;
        text-align: center;
        text-decoration: none;
        transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    .courses-events .results-all:hover {
        background: #f8fafc;
        border-color: rgba(15, 23, 42, 0.4);
    }

    .courses-events .research-empty {
        padding: 28px 24px;
        border: 1px dashed rgba(15, 23, 42, 0.18);
        border-radius: var(--bs-border-radius);
        text-align: center;
    }

    .courses-events .research-empty-title {
        margin: 0 0 6px;
        font-size: 18px;
        font-weight: 700;
        color: var(--heading-color);
        overflow-wrap: anywhere;
    }

    .courses-events .research-empty-copy {
        margin: 0 0 14px;
        font-size: 14px;
        color: color-mix(in srgb, var(--default-color), transparent 30%);
    }

    .courses-events .research-empty-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    @media (max-width: 767px) {
        .courses-events .research-card:not(.research-card--featured) .research-card-link {
            grid-template-columns: 104px minmax(0, 1fr);
            min-height: 112px; /* same height for every card; titles are clamped to 2 lines below */
        }

        .courses-events .research-card:not(.research-card--featured) .research-card-media {
            min-height: 0;
            border-bottom: 0;
            border-right: 1px solid rgba(15, 23, 42, 0.08);
        }

        .courses-events .research-card:not(.research-card--featured) .research-card-media > img {
            position: absolute;
            inset: 0;
            height: 100%;
            aspect-ratio: auto;
        }

        .courses-events .research-card:not(.research-card--featured) .research-card-body {
            padding: 12px 14px;
        }

        .courses-events .research-card:not(.research-card--featured) .research-title {
            margin-bottom: 0;
            font-size: 16px;
            line-height: 1.25;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            overflow: hidden;
        }

        .courses-events .research-card:not(.research-card--featured) .research-excerpt {
            display: none;
        }

        /* phones: just "Nov 15" (no year, no read time) so the meta line fits on one row */
        .courses-events .research-card:not(.research-card--featured) .research-year,
        .courses-events .research-card:not(.research-card--featured) .research-readtime,
        .courses-events .research-card:not(.research-card--featured) .research-dot:has(+ .research-readtime) {
            display: none;
        }

        .courses-events .research-card:not(.research-card--featured) .research-meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start;
            gap: 6px;
            margin-bottom: 6px;
        }

        /* compact status pill (open trades), pushed to the right edge */
        .courses-events .research-card:not(.research-card--featured) .research-trade-pill {
            margin-left: auto;
            gap: 4px;
            padding: 2px 7px;
            font-size: 10px;
        }

        .courses-events .research-card:not(.research-card--featured) .research-pill-prefix {
            display: none;
        }

        /* closed trades: the result as a number ("+19.4%") instead of the pill */
        .courses-events .research-card:not(.research-card--featured) .research-trade-pill:has(+ .research-result) {
            display: none;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-left: auto;
            padding: 4px 7px;
            border-radius: 7px;
            border: 1px solid transparent;
            font-size: 13px;
            font-weight: 700;
            line-height: 1;
            letter-spacing: -0.01em;
            font-variant-numeric: tabular-nums;
        }

        /* days held don't fit next to the % on phones */
        .courses-events .research-card:not(.research-card--featured) .research-hold {
            display: none;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-positive {
            color: #15803d;
            background: color-mix(in srgb, #16a34a, white 90%);
            border-color: color-mix(in srgb, #16a34a, white 78%);
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-negative {
            color: #b91c1c;
            background: color-mix(in srgb, #dc2626, white 92%);
            border-color: color-mix(in srgb, #dc2626, white 80%);
        }

        /* no direction arrow: the +/- sign already says it */
        .courses-events .research-card:not(.research-card--featured) .research-result::before {
            display: none;
            content: "";
            width: 0;
            height: 0;
            border-left: 3.5px solid transparent;
            border-right: 3.5px solid transparent;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-positive::before {
            border-bottom: 5px solid currentColor;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-negative::before {
            border-top: 5px solid currentColor;
        }


        .courses-events .research-card:not(.research-card--featured) .research-card-lock {
            right: 6px;
            bottom: 6px;
            width: 24px;
            height: 24px;
        }

        .courses-events .research-card:not(.research-card--featured) .research-card-lock img {
            width: 12px !important;
            height: 12px !important;
        }

    }


    .courses-events .archive-sidebar .newsletter-widget .widget-title {
        margin: 0 0 8px;
        font-size: 18px;
        line-height: 1.15;
        font-weight: 700;
    }

        .courses-events .archive-sidebar .newsletter-widget .widget-copy {
            margin: 0 0 16px;
            font-size: 13px;
            line-height: 1.45;
            color: color-mix(in srgb, var(--default-color), transparent 30%);
        }

        .courses-events .archive-sidebar .newsletter-widget .newsletter-promo {
            margin: 12px 0 0;
            font-size: 12px;
            line-height: 1.4;
            color: color-mix(in srgb, var(--default-color), transparent 26%);
        }

    .courses-events .archive-sidebar .popular-widget .widget-title,
    .courses-events .archive-sidebar .latest-widget .widget-title {
        margin: 0 0 8px;
        font-size: 18px;
        line-height: 1.15;
        font-weight: 700;
    }

    .courses-events .archive-sidebar .popular-widget .latest-list,
    .courses-events .archive-sidebar .latest-widget .latest-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .courses-events .archive-sidebar .popular-widget .latest-item,
    .courses-events .archive-sidebar .latest-widget .latest-item {
        padding: 3px 0;
    }

    .courses-events .archive-sidebar .popular-widget .latest-item a,
    .courses-events .archive-sidebar .latest-widget .latest-item a {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .courses-events .archive-sidebar .popular-widget .latest-date,
    .courses-events .archive-sidebar .latest-widget .latest-date {
        font-size: 10px;
        line-height: 1.1;
        font-weight: 600;
        letter-spacing: .01em;
        text-transform: none;
        color: color-mix(in srgb, var(--default-color), transparent 30%);
    }

    .courses-events .archive-sidebar .popular-widget .latest-title,
    .courses-events .archive-sidebar .latest-widget .latest-title {
        font-size: 14px;
        line-height: 1.4;
        font-weight: 600;
        color: var(--heading-color);
    }

    .research-mobile-notes-toggle,
    .research-mobile-notes-panel {
        display: none;
    }

    @media (max-width: 768px) {
        .courses-events .archive-head {
            display: contents;
        }

        .courses-events .archive-search-wrap {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .research-mobile-notes-toggle {
            display: inline-flex;
            width: 36px;
            height: 36px;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 8px;
            background: transparent;
            padding: 0;
            cursor: pointer;
            flex: 0 0 auto;
            align-self: center;
            margin-top: 0;
            line-height: 0;
            vertical-align: middle;
            margin-right: 12px;
            position: relative;
        }

        .research-mobile-notes-toggle--hidden {
            display: none !important;
        }

        .research-mobile-notes-badge {
            position: absolute;
            top: 0;
            right: 0;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: #dc2626;
            color: #fff;
            font-size: 10px;
            line-height: 18px;
            font-weight: 700;
            letter-spacing: 0.01em;
            text-align: center;
            display: none;
            transform: translate(30%, -30%);
            box-shadow: 0 0 0 2px rgba(44, 41, 41, 0.92);
        }

        .research-mobile-notes-badge.is-visible {
            display: inline-block;
        }

        .research-mobile-notes-toggle img {
            width: 32px;
            height: 32px;
            display: block;
        }

        .research-mobile-notes-panel {
            display: block;
            position: fixed;
            top: 72px;
            left: 10px;
            right: 10px;
            bottom: 10px;
            z-index: 100100;
            transform: translateY(110%);
            opacity: 0;
            pointer-events: none;
            transition: transform 0.24s ease, opacity 0.24s ease;
            background: color-mix(in srgb, var(--surface-color), white 1%);
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 18px;
            box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
            overflow: hidden;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .research-mobile-notes-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 100099;
            background: rgba(33, 37, 41, 0.8);
        }

        body.research-mobile-notes-open .research-mobile-notes-panel {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        body.research-mobile-notes-open .research-mobile-notes-backdrop {
            display: block;
        }

        body.research-mobile-notes-open {
            overflow: hidden;
        }

        .research-mobile-notes-panel .daily-commentary-widget {
            margin: 0;
            padding: 0 15px 14px;
            border: 0;
            box-shadow: none;
            border-radius: 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1 1 auto;
            min-height: 0;
            overflow: hidden;
        }

        .research-mobile-notes-panel .daily-commentary-widget .widget-title {
            display: none;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-feed {
            order: 1;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            display: flex;
            flex-direction: column;
            gap: 12px;
            justify-content: flex-start;
            padding-right: 12px;
            margin-right: -6px;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-form {
            order: 3;
            position: sticky;
            bottom: 0;
            z-index: 4;
            margin-top: 0;
            padding: 10px 0 2px;
            background: color-mix(in srgb, var(--surface-color), white 1%);
            width: 100%;
            align-self: stretch;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-scroll {
            order: 1;
            flex: 0 0 auto;
            overflow: visible;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-pending-section {
            order: 2;
            flex: 0 0 auto;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-footer {
            margin-top: 6px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            width: 100%;
            flex-wrap: nowrap;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-footer-right {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            flex: 0 0 auto;
            min-width: 0;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-action {
            width: 20px;
            height: 20px;
            min-width: 20px;
            min-height: 20px;
            padding: 0;
            border: 0;
            background: transparent;
            -webkit-appearance: none;
            appearance: none;
            box-shadow: none;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-action-icon {
            width: 14px;
            height: 14px;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-time {
            flex: 0 0 auto;
            font-size: 11px;
            line-height: 1.2;
            font-weight: 600;
            letter-spacing: 0.04em;
            color: color-mix(in srgb, var(--default-color), transparent 56%);
        }

        .research-mobile-notes-panel .research-commentary-item {
            padding: 14px 0 16px;
        }

        .research-mobile-notes-panel .research-commentary-item:last-child {
            padding-bottom: 10px;
        }

        .research-mobile-notes-panel .research-commentary-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 8px;
        }

        .research-mobile-notes-panel .research-commentary-label {
            display: inline-flex;
            align-items: center;
            font-size: 10px;
            line-height: 1.2;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
            color: color-mix(in srgb, var(--default-color), transparent 50%);
        }

        .research-mobile-notes-panel .research-commentary-body {
            font-size: 16px;
            line-height: 1.58;
            font-weight: 500;
        }

        .research-mobile-notes-panel .research-commentary-body--activity {
            font-weight: 500;
        }

        .research-mobile-notes-panel .research-inline-symbol {
            display: inline !important;
            flex: none !important;
            flex-direction: row !important;
            gap: 0 !important;
            color: inherit;
            font-weight: 700;
            text-decoration: none;
        }

        .research-mobile-notes-panel .latest-item a.research-inline-symbol {
            display: inline !important;
            flex: none !important;
            flex-direction: row !important;
            gap: 0 !important;
        }

        .research-mobile-notes-panel a.research-inline-symbol:hover {
            color: inherit;
        }

        .research-mobile-notes-panel .research-inline-pnl {
            display: inline;
            font-weight: inherit;
            white-space: nowrap;
        }

        .research-mobile-notes-panel .research-inline-pnl--positive {
            color: #15803d;
        }

        .research-mobile-notes-panel .research-inline-pnl--negative {
            color: #b42318;
        }

        .research-mobile-notes-panel .research-inline-pnl--neutral {
            color: color-mix(in srgb, var(--default-color), transparent 25%);
        }

        .research-mobile-notes-panel .research-activity-lines {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .research-mobile-notes-panel .research-activity-line {
            font-size: 15px;
            line-height: 1.45;
            font-weight: 500;
            overflow-wrap: anywhere;
        }

        .research-mobile-notes-panel .research-activity-symbol-row {
            display: flex;
            align-items: baseline;
            gap: 9px;
            min-width: 0;
        }

        .research-mobile-notes-panel .research-activity-symbol {
            flex: 0 0 auto;
            color: var(--heading-color);
            font-size: 15px;
            line-height: 1.2;
            font-weight: 700;
            text-decoration: none;
            letter-spacing: 0;
        }

        .research-mobile-notes-panel a.research-activity-symbol:hover {
            color: var(--accent-color);
        }

        .research-mobile-notes-panel .research-activity-symbol-detail {
            min-width: 0;
            color: color-mix(in srgb, var(--default-color), transparent 34%);
            font-size: 15px;
            line-height: 1.35;
            font-weight: 500;
        }

        .research-mobile-notes-panel .research-activity-line--positive {
            color: #15803d;
        }

        .research-mobile-notes-panel .research-activity-line--negative {
            color: #b42318;
        }

        .research-mobile-notes-panel .research-activity-line--neutral {
            color: color-mix(in srgb, var(--default-color), transparent 25%);
        }

        .research-mobile-notes-close {
            position: sticky;
            top: 0;
            right: 0;
            z-index: 3;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            width: 32px;
            height: 32px;
            margin: 0 0 0 auto;
            border: 0;
            color: var(--heading-color);
            background: transparent;
            font-size: 28px;
            line-height: 1;
            padding: 0;
            cursor: pointer;
            transform: none;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-form .nl-input-wrap {
            min-height: 45px;
            background: var(--surface-color);
            border-radius: var(--bs-border-radius);
            box-shadow: none;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-form .nl-input-wrap input {
            border: 1px solid color-mix(in srgb, var(--default-color), transparent 82%);
            border-radius: var(--bs-border-radius);
            box-shadow: none;
            width: 100%;
            padding-right: 48px;
            outline: none;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-form .nl-input-wrap input:focus {
            border-color: color-mix(in srgb, var(--accent-color), transparent 55%);
            box-shadow: none;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-destination {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-self: center;
            width: fit-content;
            max-width: 100%;
            gap: 6px;
            margin-top: 8px;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-destination label {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin: 0;
            padding: 5px 10px;
            border: 1px solid color-mix(in srgb, var(--default-color), transparent 82%);
            border-radius: 999px;
            background: color-mix(in srgb, var(--surface-color), var(--default-color) 2%);
            color: color-mix(in srgb, var(--default-color), transparent 18%);
            font-size: 11px;
            line-height: 1.2;
            font-weight: 600;
            cursor: pointer;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-entry-destination input {
            margin: 0;
            transform: scale(.92);
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-indicator {
            width: 22px;
            height: 22px;
        }

        .research-mobile-notes-panel .daily-commentary-widget .research-commentary-indicator-icon {
            width: 14px;
            height: 14px;
        }

        #nl-sticky.sidebar-widget.newsletter-widget p:not(.newsletter-promo) {
            display: none !important;
        }

        #nl-sticky.sidebar-widget.newsletter-widget .newsletter-promo {
            display: block !important;
            margin: 12px 0 0;
            font-size: 12px;
            line-height: 1.4;
            color: color-mix(in srgb, var(--contrast-color), transparent 18%);
        }

        .courses-events .archive-sidebar {
            display: none !important;
        }
    }
        /* very narrow phones: shrink the result badge and meta so they stay on one line */
    @media (max-width: 420px) {
        .courses-events .research-card:not(.research-card--featured) .research-meta {
            gap: 4px;
            font-size: 10px;
            letter-spacing: 0.01em;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result {
            padding: 3px 5px;
            gap: 3px;
            border-radius: 6px;
            font-size: 11px;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-positive::before,
        .courses-events .research-card:not(.research-card--featured) .research-result.is-negative::before {
            border-left-width: 3px;
            border-right-width: 3px;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-positive::before {
            border-bottom-width: 4px;
        }

        .courses-events .research-card:not(.research-card--featured) .research-result.is-negative::before {
            border-top-width: 4px;
        }
    }



/* the navbar has its own search below 1200px, so hide the page one there */
@media (max-width: 1199px) {
    .courses-events .archive-search-wrap {
        display: none;
    }
}

/* Live Track Record widget (alpaca/alpaca_portfolio_widget.php) */
.pf-mini-card {
    position: relative;
    background: var(--surface-color);
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
    border-radius: 0.375rem;
    padding: 15px 15px 14px;
    color: #111827;
    overflow: hidden;
    margin-bottom: 2rem;
}

.pf-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 12px;
}

.pf-mini-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.pf-mini-subtitle {
    margin: 5px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
}

.pf-mini-periods {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    max-width: 360px;
    min-height: 34px;
    padding: 6px;
    backdrop-filter: blur(10px);
}

.pf-period-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 9px 4px 10px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
    cursor: pointer;
    overflow: hidden;
}

.pf-period-shell::after {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-1px);
    margin-left: 6px;
    pointer-events: none;
}

.pf-period-shell:focus-within {
    border-color: rgba(59, 130, 246, 0.36);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.pf-period-shell-label {
    font-size: 8px;
    line-height: 1;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #64748b;
    flex: 0 0 auto;
    white-space: nowrap;
    pointer-events: none;
}

.pf-period-shell-value {
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    color: #0f172a;
    margin-right: auto;
    white-space: nowrap;
    pointer-events: none;
}

.pf-mode {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    border-radius: 10px;
    padding: 5px 11px;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
    min-height: 30px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pf-mode:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.16);
    transform: translateY(-1px);
}

.pf-mode.is-active {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    border-color: #0f172a;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.pf-mode:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.pf-period-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: transparent;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.pf-period-select::-ms-expand {
    display: none;
}

/* Windows draws the open list with the select's own (transparent, 11px) text — give options real styling */
.pf-period-select option {
    color: #0f172a;
    background-color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.pf-period-select option:checked {
    color: #ffffff;
    background-color: #0f172a;
}

.pf-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 10px;
}

.pf-mini-stat {
    min-width: 0;
    min-height: 56px;
    padding: 8px 9px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #fbfdff;
}

.pf-mini-stat-label {
    display: block;
    margin: 0 0 4px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #6b7280;
}

.pf-mini-stat-value {
    display: block;
    min-width: 0;
    font-size: 17px;
    line-height: 1.1;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-more-stats {
    margin: 0 0 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: #ffffff;
}

.pf-more-toggle {
    width: 100%;
    appearance: none;
    border: 0;
    background: transparent;
    color: #0f172a;
    text-align: left;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    padding: 11px 12px;
    cursor: pointer;
}

.pf-more-toggle::after {
    content: '';
    float: right;
    width: 7px;
    height: 7px;
    margin-top: 1px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform .16s ease;
}

.pf-more-toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(-1px);
}

.pf-more-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 12px;
}

.pf-more-item {
    min-width: 0;
    min-height: 50px;
    padding: 7px 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #fbfdff;
}

.pf-more-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}

.pf-more-item-link:hover,
.pf-more-item-link:focus-visible {
    border-color: rgba(15, 23, 42, 0.18);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    background: #ffffff;
    color: inherit;
}

.pf-more-item-link:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.pf-more-item-link.is-disabled {
    cursor: default;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.pf-more-label {
    display: block;
    margin: 0 0 5px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: none;
    color: #6b7280;
}

.pf-premium-stat-value {
    display: block;
    min-width: 0;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-winloss-win {
    color: #15803d;
}

.pf-winloss-loss {
    color: #b91c1c;
}

.pf-premium-kicker {
    display: block;
    margin: 0 0 4px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #64748b;
}

.pf-premium-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    margin: 0 0 6px;
    padding: 7px 9px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background-color: #f5f8fc;
    background-image: linear-gradient(135deg, rgba(58, 141, 206, 0.12), #ffffff);
}

.pf-premium-teaser--bottom {
    margin: 14px 0 0;
}

.pf-premium-teaser-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 2px;
}

.pf-premium-line {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: #334155;
}

.pf-premium-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
}

.pf-premium-link:hover {
    color: #fff;
    background: #1f2937;
}

.pf-mini-chart-wrap {
    position: relative;
    width: 100%;
    height: 136px;
    margin: 0 0 8px;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.pf-mini-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

.pf-mini-canvas-bg,
.pf-mini-canvas-hover {
    position: absolute;
    inset: 0;
}

.pf-mini-canvas-hover {
    pointer-events: none;
}

.pf-mini-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
    z-index: 2;
}

.pf-mini-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 118px;
    max-width: 200px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    color: rgba(15, 23, 42, 0.96);
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transform: translate(-50%, calc(-100% - 10px));
    white-space: nowrap;
}

.pf-mini-tooltip-time {
    font-size: 11px;
    line-height: 1.2;
    color: #64748b;
    margin: 4px 0 0;
}

.pf-mini-tooltip-value {
    font-size: 14px;
    line-height: 1.1;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.96);
}

.pf-mini-tooltip.is-positive .pf-mini-tooltip-value {
    color: #15803d;
}

.pf-mini-tooltip.is-negative .pf-mini-tooltip-value {
    color: #b91c1c;
}

.pf-mini-disclaimer {
    margin-top: 6px;
    padding-top: 0;
    padding-left: 44px;
    padding-right: 8px;
    text-align: left;
}

.pf-mini-disclaimer-label {
    display: block;
    margin: 0 0 3px;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.pf-mini-disclaimer-text {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(71, 85, 105, 0.72);
}

.portfolio-positive {
    color: #15803d;
}

.portfolio-negative {
    color: #b91c1c;
}

@media (max-width: 980px) {
    .pf-mini-head {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .pf-mini-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
    }

    .pf-mini-copy {
        min-width: 0;
        flex: 1 1 auto;
    }

    .pf-mini-subtitle {
        display: none;
    }

    .pf-mini-periods {
        width: auto;
        max-width: none;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .pf-period-shell,
    .pf-mode {
        flex: 0 0 auto;
        min-width: 0;
    }

    .pf-period-shell {
        justify-content: flex-start;
    }

    .pf-mode {
        width: auto;
    }

    .pf-mini-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 6px;
    }

    .pf-mini-stat {
        min-height: 42px;
        padding: 6px 7px;
    }

    .pf-mini-stat-label {
        font-size: 9px;
    }

    .pf-mini-stat-value {
        font-size: 13px;
    }

    .pf-more-stats {
        margin-bottom: 6px;
    }

    .pf-more-toggle {
        padding: 8px 9px;
        font-size: 12px;
    }

    .pf-more-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .pf-more-label,
    .pf-premium-kicker {
        font-size: 9px;
    }

    .pf-more-item {
        min-height: 40px;
        padding: 5px 6px;
    }

    .pf-more-body {
        padding: 0 9px 6px;
    }

    .pf-premium-stat-value {
        font-size: 13px;
    }

    .pf-premium-teaser {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        min-height: 42px;
        padding: 6px 8px;
        margin-bottom: 6px;
    }

    .pf-premium-kicker {
        margin-bottom: 0;
        font-size: 10px;
    }

    .pf-premium-teaser-copy {
        gap: 0;
    }

    .pf-premium-line {
        display: none;
    }

    .pf-premium-link {
        min-height: 30px;
        padding: 8px 11px;
        font-size: 12px;
    }

    .pf-mini-chart-wrap {
        height: 108px;
    }

}

@media (max-width: 520px) {
    .pf-mini-card {
        padding: 10px;
        margin-bottom: 1.25rem;
    }

    .pf-mini-head {
        gap: 8px;
    }

    .pf-mini-title {
        font-size: 16px;
        line-height: 1.1;
    }

    .pf-mode {
        padding: 5px 7px;
        font-size: 9px;
    }

    .pf-mini-chart-wrap {
        height: 104px;
    }

    .pf-mini-tooltip {
        min-width: 100px;
        padding: 7px 8px;
    }

    .pf-mini-disclaimer {
        margin-top: 4px;
        padding-left: 0;
        padding-right: 0;
        text-align: left;
    }

    .pf-mini-disclaimer-text {
        font-size: 10px;
        line-height: 1.35;
    }

}

.research-feed-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.research-feed-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--default-color), transparent 40%);
    white-space: nowrap;
}

.research-feed-status.is-open {
    color: #15803d;
}

.research-feed-status.is-closed .research-feed-pulse,
.research-feed-status.is-closed .research-feed-pulse::after {
    background: #dc2626;
}

.research-feed-status.is-closed .research-feed-pulse::after {
    animation: none;
    opacity: 0;
}

.research-feed-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
}

.research-feed-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #16a34a;
    animation: research-feed-pulse 1.8s ease-out infinite;
}

@keyframes research-feed-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .research-feed-pulse::after { animation: none; }
}

.courses-events .archive-sidebar .sidebar-widget p.results-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--heading-color);
}

.results-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: color-mix(in srgb, #16a34a, white 85%);
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
}

/* Trading Desk in the desktop sidebar: no inner scroll; first 6 items, then "Show more" */
.courses-events .archive-sidebar .daily-commentary-widget {
    max-height: none;
    overflow: visible;
}

.courses-events .archive-sidebar .daily-commentary-widget .research-commentary-feed {
    overflow: visible;
    padding-right: 0;
    margin-right: 0;
}

.courses-events .archive-sidebar .daily-commentary-widget:not(.is-expanded) .research-commentary-item:nth-of-type(n+7) {
    display: none;
}

.research-feed-more {
    display: none;
}

.courses-events .archive-sidebar .research-feed-more {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 7px 0;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
    background: transparent;
    color: var(--heading-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.courses-events .archive-sidebar .research-feed-more:hover {
    color: var(--accent-color);
}

.courses-events .archive-sidebar .daily-commentary-widget:not(:has(.research-commentary-item:nth-of-type(7))) .research-feed-more {
    display: none;
}

/* compact items */
.courses-events .daily-commentary-widget .research-commentary-item {
    padding: 9px 18px 10px 0;
}

.courses-events .daily-commentary-widget .research-commentary-body {
    font-size: 13px;
    line-height: 1.45;
}

.courses-events .daily-commentary-widget .research-commentary-feed {
    gap: 6px;
}

/* Trading Desk: items new since the last visit get a soft tint (returning visitors only) */
.courses-events .daily-commentary-widget.has-seen-history .research-commentary-item.is-unread {
    background: color-mix(in srgb, #f59e0b, white 92%);
    box-shadow: -10px 0 0 color-mix(in srgb, #f59e0b, white 92%), 8px 0 0 color-mix(in srgb, #f59e0b, white 92%);
}

.courses-events .daily-commentary-widget .research-feed-sep {
    margin: 0 2px;
    color: color-mix(in srgb, var(--default-color), transparent 50%);
}

/* desktop sidebar: the tint marks new items; no blue unread dots there */
.courses-events .archive-sidebar .daily-commentary-widget .research-commentary-item.is-unread .research-commentary-time::before {
    display: none !important;
}

/* small links to the same post on LinkedIn / Facebook / Instagram / YouTube, bottom-right of the card */
.courses-events .research-card { position: relative; }
.courses-events .research-card--social .research-card-body { padding-bottom: 34px; }
.courses-events .research-social {
    position: absolute;
    right: 14px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    gap: 4px;
}
.courses-events .research-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    opacity: 0.45;
    transition: opacity 0.2s ease, background 0.2s ease;
}
.courses-events .research-social a:hover,
.courses-events .research-social a:focus-visible {
    opacity: 1;
    background: color-mix(in srgb, var(--default-color), transparent 92%);
}
.courses-events .research-social img { width: 14px; height: 14px; display: block; }
html[data-bs-theme="dark"] .courses-events .research-social img { filter: invert(1); }
