/* ========================================================================== */
/*  VIEW_ARTICLES.CSS — Structured For Maintainability                        */
/*  Architecture layers follow a light ITCSS‑style order:                     */
/*  1. Settings    → variables (handled in global sheet)                      */
/*  2. Tools       → resets / helpers (minimal here)                          */
/*  3. Generic     → broad element defaults                                   */
/*  4. Objects     → layout primitives, utility wrappers                      */
/*  5. Components → discrete, reusable UI blocks                             */
/*  6. Utilities  → quick one‑off overrides                                   */
/*  Comment markers use MDN’s “|| Section” convention for quick navigation.   */
/* ========================================================================== */


/* || Generic / Global tweaks
   -------------------------------------------------------------------------- */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background-color: var(--section-darkest-background-color);
}


/* || Object: Article Layout Shell
   -------------------------------------------------------------------------- */
.article {
    position: relative;
    display: flex;
    flex-direction: column;
}


.article-footer {
    background-color: var(--section-dark-background-color);
    padding-top: 40px;
    padding-bottom: 36px;
}


.article-header-wrapper {
    background-color: var(--section-dark-background-color);
    margin-bottom: clamp(24px, 10.9091px + 2.1818vw, 36px)
}



.article-header {
    position: relative;
    display: flex;
    flex-direction: column;
    width: calc(100% - 2 * (clamp(17px, 13.2667px + 0.9333vw, 24px)));
    margin: 0 auto;
    padding: 24px 0 24px 0;
}

.article-header.full,
.article-header.side {
    max-width: var(--site-width)
}


.article-header.wide {
    max-width: calc(var(--site-width) + 100px)
}


.article-section:first-of-type>*:first-child,
.article-section.layout-side:first-of-type .article-main>*:first-child {
    margin-block-start: 0;
    /* modern logical property */
    margin-top: 0;
    /* fallback for older browsers */
}


/* || Layout Variants (full / wide / side)
   -------------------------------------------------------------------------- */
.article-section.layout-full,
.article-section.layout-wide,
.article-section.layout-side {
    width: calc(100% - 2 * (clamp(17px, 13.2667px + 0.9333vw, 24px)));
    margin: 0 auto;
}


.article-section.layout-full,
.article-section.layout-side {
    max-width: var(--site-width)
}


.article-section.layout-wide {
    max-width: calc(var(--site-width) + 100px)
}

.article-section.layout-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 30px;
}

.article-sidebar {
    width: 300px;
    min-height: 1px;
}

.article-main {
    min-width: 0;
}



@media (max-width: 1150px) {
    .article-section.layout-side {
        display: flex;
        flex-direction: column;
    }

    .article-sidebar {
        display: none;
    }
}


/*     -------------------------------------------------------------------------- */
/* GRID!!
   -------------------------------------------------------------------------- */


/* /public/css/view_articles.css — REPLACE THE PREVIOUS GRID BLOCKS WITH THIS */
.brands .article-header.layout-grid,
.games .article-header.layout-grid,
.article-section.layout-grid {
    width: calc(100% - 2 * (clamp(17px, 13.2667px + 0.9333vw, 24px)));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1000px 300px;
    column-gap: 30px;
    max-width: calc(300px + 1000px + 300px + 2*24px);
}

.brands .article-header.layout-grid,
.games .article-header.layout-grid {
    padding: 24x 0 24px 0;
}

.article-section.layout-grid {
    margin-bottom: clamp(24px, 10.9091px + 2.1818vw, 36px);
}

.brands .article-header.layout-grid .article-main,
.games .article-header.layout-grid .article-main,
.article-section.layout-grid .article-main {
    min-width: 0;
}

.article-sidebar-left,
.article-sidebar-right,
.article-sidebar {
    width: 300px;
    min-height: 1px;
}

@media (max-width: 1800px) {

    .brands .article-header.layout-grid,
    .games .article-header.layout-grid,
    .article-section.layout-grid {
        max-width: calc(1150px + 300px + 24px);
        grid-template-columns: 1fr 300px;
    }

    .brands .article-header.layout-grid .article-sidebar-left,
    .games .article-header.layout-grid .article-sidebar-left,
    .article-section.layout-grid .article-sidebar-left {
        display: none;
    }
}

@media (max-width: 1150px) {

    .brands .article-header.layout-grid,
    .games .article-header.layout-grid,
    .article-section.layout-grid {
        display: block;
        max-width: none;
    }

    .brands .article-header.layout-grid .article-sidebar-right,
    .games .article-header.layout-grid .article-sidebar-right,
    .article-section.layout-grid .article-sidebar-right {
        display: none;
    }
}








/* || Component: Divider Lines
   -------------------------------------------------------------------------- */

.article-divider-line-full {
    border: none;
    border-top: 1px solid var(--section-light-background-color);
    margin-top: 36px;
    margin-bottom: 36px;
    width: 100%;
}

.article-divider-line-half {
    border: none;
    border-top: 1px solid var(--section-light-background-color);
    margin-top: 36px;
    margin-bottom: 36px;
    width: 85%;
}


/* || Component: Headings (H1–H5 reset + article variants)
   -------------------------------------------------------------------------- */

.article-h1,
.article-h2,
.article-h3,
.article-h4,
.article-h5 {
    color: var(--white-color-1);
    font-family: var(--identity-font);
    font-weight: var(--font-weight8);
    letter-spacing: -0.25px;
    line-height: 1.2;
    margin: 0;
    scroll-margin-top: 7rem;
}

.article-h1 {
    font-size: clamp(var(--font-size-40px), 31.2px + 2.18vw, var(--font-size-52px));
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 32px;
}

.article-h2 {
    font-size: var(--font-size-32px);
    line-height: 1.2;
    margin-bottom: 12px;
    margin-top: 36px;
    /* space below the underline */
    display: block;
    /* ensures next block starts on a new line */
    text-decoration-skip-ink: auto;
}

.article-h3 {
    font-size: var(--font-size-26px);
    line-height: 1.25;
    margin-top: 24px;
    margin-bottom: 12px;
}

.article-h4 {
    font-size: var(--font-size-22px);
    line-height: 1.3;
    margin-top: 20px;
    margin-bottom: 12px;
}

.article-h5 {
    font-size: var(--font-size-18px);
    line-height: 1.35;
    margin-top: 16px;
    margin-bottom: 10px;
}





/* || Component: Body Copy & Links
   -------------------------------------------------------------------------- */
.article-p {
    color: var(--grey-color-1);
    font-family: var(--identity-font);
    font-weight: var(--font-weight4);
    font-size: var(--font-size-17px);
    line-height: 1.7;
    letter-spacing: -0.25px;
    margin-bottom: 20px;
}

.article-p a {
    color: var(--card-color, var(--site-start-color));
}

.article-p a:hover {
    text-decoration: underline;
}

@media (max-width:1150px) {
    .article-p {
        font-size: var(--font-size-16px);
    }
}

/* || Component: Inline Highlight & Blockquotes
   -------------------------------------------------------------------------- */

/* ==highlight== */
.article mark {
    background-color: var(--card-color, var(--site-color));
    color: var(--white-color-1);
    padding: 0 0.35em;
    border-radius: 0.15em;
}

/* > Blockquote */
.article-quote {
    margin: 0px 0 36px;
    padding: 1.25rem 2rem;
    border-left: 4px solid var(--card-color, var(--site-color));
    background-color: var(--card-highlight, var(--site-highlight));
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.article-quote p {
    color: var(--grey-color-1);
    font-family: var(--identity-font);
    font-weight: var(--font-weight4);
    font-size: var(--font-size-16px);
    line-height: var(--font-size-30px);
    letter-spacing: -0.25px;
    margin-top: 0px;
    margin-bottom: 24px;
    color: var(--grey-color-1);
}


/* FILE: public/css/view_articles.css — APPEND TO “Inline Highlight & Blockquotes” */

/* Trim inner edges so the quote’s padding controls spacing */
.article-quote>*:first-child {
    margin-top: 0;
}

.article-quote>*:last-child {
    margin-bottom: 0;
}

/* If the quote itself is the first/last block in a section, collapse its outer edges */
.article-section>.article-quote:first-child {
    margin-top: 0;
}

.article-section>.article-quote:last-child {
    margin-bottom: 0;
}

.article-section.layout-side>.article-main>.article-quote:first-child {
    margin-top: 0;
}

.article-section.layout-side>.article-main>.article-quote:last-child {
    margin-bottom: 0;
}

.article-section.layout-grid>.article-main>.article-quote:first-child {
    margin-top: 0;
}

.article-section.layout-grid>.article-main>.article-quote:last-child {
    margin-bottom: 0;
}



/* === block (callout) ========================================= */

.article-block {
    margin: 24px 0;
    padding: 3.5rem 2.5rem;
    border-left: 4px solid var(--card-color, var(--site-color));
    background-color: var(--card-highlight, var(--site-highlight));
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.article-block p {
    color: var(--grey-color-1);
    font-family: var(--identity-font);
    font-weight: var(--font-weight4);
    font-size: var(--font-size-16px);
    line-height: var(--font-size-30px);
    letter-spacing: -0.25px;
    margin-top: 12px;
    margin-bottom: 12px;
    color: var(--grey-color-1);
}

.article-block>*:first-child {
    margin-top: 0;
}

.article-block>*:last-child {
    margin-bottom: 0;
}


/* || Utility: Bold Inline Span (Markdown **strong**)
   -------------------------------------------------------------------------- */
.article-body-bold {
    font-weight: bold;
}


/* || Component: Lists
   -------------------------------------------------------------------------- */
.article-bullets-list,
.article-numbers-list,
.article-tasks-list {
    margin: 0px 0 24px;
    padding-left: 1.5rem;
}



/* --- Shared list item typography -------------------------------- */
.article-bullets-list li,
.article-numbers-list li,
.article-tasks-list li {
    margin-bottom: .5rem;
    color: var(--grey-color-2);
    font-family: var(--identity-font);
    font-weight: var(--font-weight4);
    font-size: var(--font-size-17px);
    line-height: var(--font-size-30px);
    letter-spacing: -0.25px;
}

.article-bullets-list li a,
.article-numbers-list li a,
.article-tasks-list li a {
    text-decoration: underline;
    color: var(--grey-color-2);
}

.article-bullets-list li a:hover,
.article-numbers-list li a:hover,
.article-tasks-list li a:hover {
    color: var(--card-color, var(--site-color));
}

/* --- Unordered (bullet) lists ----------------------------------- */
.article-bullets-list {
    list-style-type: disc;
}

.article-bullets-list ul {
    margin: .5rem 0 0 1.25rem;
    list-style-type: circle;
}

.article-bullets-list ul ul {
    list-style-type: square;
}

/* --- Ordered (numbered) lists ----------------------------------- */
.article-numbers-list {
    list-style-type: decimal;
}



.article-numbers-list ol {
    margin: .5rem 0 0 1.25rem;
    list-style-type: lower-alpha;
}

.article-numbers-list ol ol {
    list-style-type: lower-roman;
}

/* --- Task (checkbox) lists -------------------------------------- */
.article-tasks-list {
    list-style-type: decimal;
}

.article-tasks-list li {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin-bottom: .65rem;
    line-height: 1.4;
}

.article-tasks-list li>ul,
.article-tasks-list li>ol {
    flex-basis: 100%;
    margin: .45rem 0 0 1.8rem;
}

.article-tasks-list input[type="checkbox"] {
    transform: scale(1.25);
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--card-color, var(--site-color));
}

/* view_articles.css  – APPEND TO “|| Component: Body Copy & Links” 
   -------------------------------------------------------------------------- */
.article-table-wrapper {
    margin: 0px 0 36px;
    overflow-x: auto;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--identity-font);
    font-size: var(--font-size-15px);
}

.article-table th,
.article-table td {
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.article-table th {
    background-color: rgba(var(--card-rgb, var(--site-start-color)), 0.12);
    color: var(--white-color-1);
    font-weight: var(--font-weight7);
}

.article-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

@media (max-width: 600px) {

    .article-table th,
    .article-table td {
        padding: 0.55rem;
        font-size: var(--font-size-14px);
    }
}








/* === Widget margin wrapper ========================================= */
.article-widget {
    margin-bottom: clamp(32px, 23.2727px + 1.4545vw, 40px);
}






/* === note ========================================= */

.article-note {
    background-color: var(--section-dark-background-color);
    border: 1px solid var(--section-light-background-color);
    border-radius: 8px;
    padding: clamp(14px, 10px + 0.8vw, 20px);
    margin: 0px 0 36px;
}


.article-note>*:first-child {
    margin-top: 0;
}

.article-note>*:last-child {
    margin-bottom: 0;
}




/* ── Image display & zoom — REPLACE the current `.article-photo‑*`,
   `.article-logo-badge`, `.fullscreen‑*` blocks ───────────────────────── */

.article-photo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0px 0 36px 0;
    overflow: hidden;
    font-size: var(--ft-40-24);
}

.article-photo-container picture {
    position: relative;
    aspect-ratio: 16/9;
}

.article-photo {
    width: 100%;
    height: 100%;
    border-radius: 0px;
    display: block;
    object-fit: cover;
}

.article-photo-credit {
    margin-top: 10px;
    font-family: var(--identity-font);
    font-size: var(--font-size-13px);
    color: var(--grey-color-1);
    text-align: left;
    /* credit aligned right */
}




/* brand badge – now bottom‑right at ~6 % of image width */
.article-logo-badge {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    fill: var(--card-color, var(--site-color)) !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4));
    pointer-events: none;
    width: 1em;
    height: 1em;
}

.article-logo-badge {
    width: 1em;
    height: 1em;
}

.article-logo-badge path {
    fill: var(--card-color, var(--site-color)) !important;
}












/* || Component: Table Of Contents (desktop side‑panel)
   -------------------------------------------------------------------------- */

/* ------------------------------------------------------------------ */
/*  TOC active‑link styling                                           */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/*  TOC active‑link styling  – REPLACE THIS WHOLE BLOCK               */
/* ------------------------------------------------------------------ */
.toc-list li a.active {
    color: var(--card-color, var(--site-color));
    font-weight: 600;
}



.toc-container {
    position: absolute;
    left: calc(((100vw - var(--site-width)) / 2) - clamp(275px, -675px + 50vw, 325px));
    width: 250px;
    padding: 1rem;
    visibility: hidden;

    z-index: 9999;
}

.toc-container h4 {
    color: var(--white-color-2);
    font-family: var(--identity-font);
    font-weight: var(--font-weight7);
    font-size: var(--font-size-16px);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.toc-container h4::after {
    content: "";
    display: block;
    height: 2px;
    width: 55%;
    background: var(--card-color, var(--site-color));
    margin-top: 3px;
    border-radius: 1px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 16px;
}

.toc-list li a {
    color: var(--grey-color-1);
    text-decoration: none;
    font-family: var(--identity-font);
    font-weight: 400;
    font-size: var(--font-size-15px);
    line-height: var(--font-size-20px);
    letter-spacing: -0.5px;
}

.toc-list ul {
    margin-bottom: 15px;
    /* indent */
    padding: 0;
    list-style: none;
    /* remove default bullets */
}

.toc-list ul li a {
    font-size: var(--font-size-13px);
    /* slightly smaller for sub‑items */
}

.toc-list li a:hover {
    text-decoration: underline;
}

/* Hide TOC on narrower viewports for simplicity */
@media (max-width: 1900px) {
    .toc-container {
        display: none;
    }

    .article-container {
        margin-left: 0;
    }
}















/* ------------------------------------------------------------------ */
/*  Toggle                                          */
/* ------------------------------------------------------------------ */



.article-toggle {
    border-radius: 0.5rem;
    /* 1150 to 400 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 0;
    transition: margin-top 0.3s ease;
}


.article-toggle .section-toggle-content p {
    margin-top: 24px;
    margin-bottom: 0px;
    /* tweak as needed */
}

.section-toggle-content .article-numbers-list,
.section-toggle-content .article-tasks-list,
.section-toggle-content .article-bullets-list {
    margin-top: 24px;

}


.article-widget .article-toggle {
    border-radius: 8px;
    padding: 0 clamp(15px, -7.9091px + 3.8182vw, 36px) clamp(12px, 3.2727px + 1.4545vw, 20px) clamp(15px, -7.9091px + 3.8182vw, 36px);
    /*1150 - 600 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: clamp(18px, -1.6364px + 3.2727vw, 36px);
}

.article-widget .article-toggle {
    background-color: var(--egxxl-surface-2);
    border: 1px solid var(--egxxl-surface-1);
}




.xxl-no-bg .article-toggle {
    border-radius: 8px;
    padding: 0 clamp(15px, -7.9091px + 3.8182vw, 36px) clamp(12px, 3.2727px + 1.4545vw, 20px) clamp(15px, -7.9091px + 3.8182vw, 36px);
    /*1150 - 600 */
    display: flex;
    background: transparent;
    border: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: clamp(18px, -1.6364px + 3.2727vw, 36px);
}

.xxl-no-bg .article-toggle {
    padding: 0;
    margin-top: 0;
}


/* CLOSED-ONLY HOVER CUE — tiny + accessible */
.article-toggle .section-toggle[aria-expanded="false"] {
    cursor: pointer;
}

/* underline the label on hover (closed only) */
.article-toggle .section-toggle[aria-expanded="false"]:hover .toggle-label-popup {
    text-decoration: underline;
    text-underline-offset: .14em;
    text-decoration-thickness: .08em;
    text-decoration-color: var(--card-color, var(--site-start-color));
}

/* micro icon cue (closed only) */
.article-toggle .section-toggle .toggle-icon {
    opacity: .7;
    transition: opacity .12s ease;
}

.article-toggle .section-toggle[aria-expanded="false"]:hover .toggle-icon {
    opacity: 1;
}

/* ------------------------------------------------------------------ */
/* Buttons                                      */
/* ------------------------------------------------------------------ */



/* APPEND TO: view_articles.css  —  Component: Buttons (multi‑CTA strip) */
.article-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    align-items: stretch;
}

.article-button {
    flex: 1 1 clamp(220px, 26vw, 200px);
    /* equal width per row; wraps cleanly */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--identity-font);
    font-weight: var(--font-weight7);
    font-size: var(--ft-16-15);
    line-height: 1.3;
    border: 1px solid var(--section-light-background-color);
    color: var(--white-color-2);
    background: transparent;
}



.article-button-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    fill: var(--white-color-1);
    color: var(--white-color-1);
}

.article-button.primary {
    background: var(--card-color, var(--site-start-color));
    border: none;
    color: var(--white-color-1);
}

.article-button.primary .article-button-icon {
    filter: brightness(0) invert(1);
    /* ensure icons show on solid bg */
}

.article-button.primary:hover {
    background: var(--card-glow)
}

.article-button.ghost {
    background: transparent;
    border-color: var(--section-light-background-color);
    color: var(--white-color-2);
}

.article-button.ghost:hover {
    border-color: var(--card-color, var(--site-start-color));
}


/* FILE: public/css/view_articles.css — REPLACE THIS ONE RULE */
.article-button.is-primary .article-button-icon {
    filter: brightness(0) invert(1);
    /* ensure icons show on solid bg */
}

/* WITH THIS EXACT RULE (prevents double-filtering when using mask) */
.article-button.is-primary .article-button-icon:not(.svg-mask) {
    filter: brightness(0) invert(1);
}

/* FILE: public/css/view_articles.css — APPEND THESE RULES (no other changes) */
.article-button .article-button-icon.svg-mask {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: var(--eg-icon);
    mask-image: var(--eg-icon);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Keep your currentColor inheritance for inline <svg> (no change needed) */
.article-button svg.article-button-icon,
.article-button .article-button-icon svg,
.article-button .article-button-icon path,
.article-button .article-button-icon use {
    fill: currentColor !important;
    stroke: currentColor !important;
}











/* ------------------------------------------------------------------ */
/* dropdown                                 */
/* ------------------------------------------------------------------ */

/* FILE: public/css/view_articles.css — REPLACE ONLY THE DROPDOWN BLOCK WITH THIS */

/* container */
.article-dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    align-items: stretch
}

.article-dropdown {
    position: relative;
    flex: 1 1 clamp(220px, 26vw, 200px)
}

/* head button (mirror .article-button styles) */
.article-dropdown>summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--identity-font);
    font-weight: var(--font-weight7);
    font-size: var(--ft-16-15);
    line-height: 1.3;
    border: 1px solid var(--section-light-background-color);
    color: var(--white-color-2);
    background: transparent;
    width: 100%;
    box-sizing: border-box
}

.article-dropdown>summary::-webkit-details-marker {
    display: none
}

.article-dropdown>summary::marker {
    content: ""
}

.article-dropdown>summary.primary {
    background: var(--card-color, var(--site-start-color));
    border: none;
    color: var(--white-color-1)
}

.article-dropdown>summary.primary:hover {
    background: var(--card-glow)
}

.article-dropdown>summary.ghost:hover {
    border-color: var(--card-color, var(--site-start-color))
}

/* icon parity with .article-button */
.article-dropdown>summary .article-button-icon {
    color: var(--white-color-1)
}

/* fallback for raster <img> icons in the head button (force white for ALL variants) */
.article-dropdown>summary img.article-button-icon {
    filter: brightness(0) invert(1) !important
}

/* SVG mask support (same behavior as buttons) */
.article-dropdown .article-button-icon.svg-mask,
.article-dropdown .article-dropdown-item-icon.svg-mask {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: var(--eg-icon);
    mask-image: var(--eg-icon);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain
}

/* FORCE WHITE for masked SVG in the head button (ALL variants) */
.article-dropdown>summary .article-button-icon.svg-mask {
    background-color: var(--white-color-1) !important;
    color: var(--white-color-1) !important
}

/* Menu icons: force white whether masked or plain <img> */
.article-dropdown-menu .article-dropdown-item-icon.svg-mask {
    background-color: var(--white-color-1) !important
}

.article-dropdown-menu img.article-dropdown-item-icon {
    filter: brightness(0) invert(1) !important
}

/* caret: DOWN by default; rotate UP when open */
.article-dropdown-caret {
    margin-left: auto;
    width: .85rem;
    height: .85rem;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(45deg);
    transition: transform .18s ease
}

.article-dropdown[open] .article-dropdown-caret {
    transform: rotate(-135deg)
}

.article-dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 4000;
    min-width: 100%;
    list-style: none;
    margin: 0;
    padding: 6px;
    border-radius: 8px;
    background-color: var(--egxxl-surface-2, var(--section-dark-background-color));
    border: 1px solid var(--egxxl-surface-1, var(--section-light-background-color));
    box-shadow: 0 8px 28px rgba(0, 0, 0, .35);

    /* keep the panel fully visible near the bottom of the page */
    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* when there isn't space below, flip the panel to open upward */
.article-dropdown.drop-up .article-dropdown-menu {
    top: auto;
    bottom: calc(100% + 6px);
}

.article-dropdown-item+.article-dropdown-item {
    margin-top: 2px
}

.article-dropdown-link {
    display: grid;
    grid-template-columns: var(--icon-col-w, 1.65em) 1fr;
    /* ← uniform start for all texts */
    align-items: center;
    column-gap: 1rem;
    font-family: var(--identity-font);
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: var(--ft-15-14);
    height: 40px;
    color: var(--white-color-2);
    text-decoration: none;
    min-height: 2.25rem;
    /* keeps rows even when icons differ */
}


.article-dropdown-link:hover {
    background-color: rgba(255, 255, 255, .06);
    text-decoration: none
}

.article-dropdown-item-icon {
    width: 1.5em;
    height: 2em;
    flex-shrink: 0;
    display: inline-block
}

.list-hub .article-dropdown-item-icon {
    width: 1.5em;
    height: 1.15em;
    flex-shrink: 0;
    display: inline-block
}






/* == Feed embed ==================================================== */

.feed-divider-text {
    color: var(--white-color-1);
    font-family: var(--identity-font);
    font-weight: 800;
    letter-spacing: -0.15px;
    line-height: 1.2;
    font-size: var(--font-size-25px);
    line-height: 1.25;
    margin-bottom: 18px;
}















/* == Video embed ==================================================== */
.video-embed {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 0px;
}

.video-embed-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Match article widget spacing/look */
.article .video-embed {
    margin-bottom: 36px;
}


























/* === Feed block (Trending style) ======================================== */

.side-feed {
    padding: 0;
}

.side-feed__title {
    margin: 0 0 1.85rem 0;
    font-family: var(--identity-font);
    font-weight: 700;
    font-size: var(--font-size-16px);
    color: var(--grey-color-2, #9aa4af);
    letter-spacing: -.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.side-feed__title::before {
    content: '';
    width: var(--font-size-18px);
    height: var(--font-size-18px);
    border-radius: 3px;
    background: var(--card-color, var(--site-color));
}

.side-feed__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-feed__item {
    margin-bottom: 1.35rem
}

.side-feed__link {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}

.side-feed__thumb {
    width: 110px;
    height: 68px;
    border-radius: 4px;
    object-fit: cover;
    background-color: var(--section-dark-background-color);
    border: 1px solid var(--section-medium-background-color);
    ;
    display: block;
}

.side-feed__meta {
    display: grid;
    gap: 4px;
    min-width: 0;
    align-self: flex-start;
    justify-self: start;
}

.side-feed__title-text {
    color: var(--white-color-1, #e6edf3);
    font-size: var(--font-size-14px, .9rem);
    font-family: var(--identity-font);
    font-weight: 700;
    letter-spacing: -.25px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-feed__link:hover .side-feed__title-text,
.side-feed__link:focus .side-feed__title-text,
.side-feed__link:focus-visible .side-feed__title-text {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: from-font;
    text-decoration-skip-ink: auto;
}

/* ───────────────────── Sticky sidebars (unchanged behavior) ────────────── */

.article-sidebar,
.article-sidebar-right,
.article-sidebar-left,
.sidebars.-hero-left,
.sidebars.-hero-right {
    position: relative;
    overflow: visible !important;
    align-self: start;
    height: 100%;
}

.sidebars {
    display: block;
    height: 100%;
}


.sidebars .side-widget {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    z-index: 0;
    margin-bottom: 20px;
}

.side-feed__list>*:last-child {
    margin-bottom: 0;
}

.sticky-stack>*:last-child {
    padding-bottom: 36px;
}

.js-sticky-stack>.sticky-stack {
    position: sticky;
    top: calc(var(--top-bar-H, 64px) + 32px);
    will-change: top;
    isolation: isolate;
    z-index: 1000;
}

.js-sticky-stack>.sticky-stack>.side-widget {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}



@media (max-width:1149px) {

    .js-sticky-stack>.sticky-stack {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
    }
}
























/* public/css/view_articles.css — THREAD BRIDGE BLOCK (FULL REPLACEMENT) */
/* ================================================================== */
/*  Component: Thread Bridge (body→footer transition)                  */
/*  Behavior update:
    • Default (≤1800px): no left offset — starts at the leftmost edge.
    • ≥1801px (when left rail is visible): add 330px start padding so the
      content aligns with MAIN column (300px rail + 30px gap).            */
/* ================================================================== */
.thread-bridge {
    background: var(--section-dark-background-color);
    padding-bottom: 0;
    margin: 0 0 10px 0;
}

html.logged .thread-bridge {
    display: none !important;
}

.thread-bridge__inner {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}

/* NOTE: No left padding by default at ≤1800px so it hugs the left edge */

/* Apply the MAIN start offset only when the left rail is visible */
@media (min-width: 1801px) {
    .article-section.layout-grid>.thread-bridge .thread-bridge__inner {
        padding-inline-start: calc(300px + 30px);
    }
}

.thread-bridge__left {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.thread-bridge__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.thread-bridge__icon svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: var(--white-color-2);
}

.thread-bridge__label {
    font-family: var(--identity-font);
    font-weight: 800;
    letter-spacing: -.25px;
    text-transform: uppercase;
    color: var(--white-color-1);
    font-size: var(--font-size-24px);
    line-height: 1;
}

.thread-bridge__note {
    margin: 0;
    font-family: var(--identity-font);
    font-weight: 400;
    font-size: var(--font-size-14px);
    color: var(--grey-color-2);
}

.thread-bridge__note {
    width: 100%;
    box-sizing: border-box;
    margin: 10px 0 0 0;
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}

@media (max-width: 1150px) {
    .thread-bridge__note {
        margin-bottom: 14px;
    }
}



/* NOTE: No left padding by default at ≤1800px so it hugs the left edge */

/* Apply the MAIN start offset only when the left rail is visible */
@media (min-width: 1801px) {
    .article-section.layout-grid>.thread-bridge .thread-bridge__note {
        padding-inline-start: calc(300px + 30px);
    }
}

.thread-bridge__signin {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white-color-1);
    font-family: var(--identity-font);
    font-weight: 700;
    font-size: var(--font-size-15px);
    white-space: nowrap;
    cursor: pointer;
}

@media (max-width: 1150px) {
    .thread-bridge__signin {
        display: none;
    }
}

/* TEXT-ONLY HOVER UNDERLINE */
.thread-bridge__signin-text {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    position: relative;
}

.thread-bridge__signin-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: var(--card-color, var(--site-color));
    transform: scaleX(0);
}

.thread-bridge__signin:hover .thread-bridge__signin-text::after {
    transform: scaleX(1);
}

.thread-bridge__signin-text .logo-container {
    padding: 0;
    display: inline-flex;
    font-size: var(--font-size-17px);
}

.thread-bridge__signin-text .site-name {
    display: inline-flex;
    gap: 0;
}

.thread-bridge__signin-text .navsitename1 {
    margin: 0 !important;
}

.thread-bridge__signin-text .navsitename2 {
    margin: 0 !important;
}

/* Avatar */
.thread-bridge .comment-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--section-medium-background-color);
    border: 1px solid var(--section-light-background-color);
    overflow: hidden;
}

.thread-bridge .comment-avatar svg,
.thread-bridge .comment-avatar use {
    fill: currentColor;
    color: var(--white-color-2);
}

/* Full-width accent rule with EG orange leading edge */
.thread-bridge__rule {
    width: 100%;
    height: 2px;
    margin-top: 12px;
    background:
        linear-gradient(to right,
            var(--card-color, var(--site-color)) 0 320px,
            rgba(255, 255, 255, .1) 320px 100%);
}

@media (max-width: 700px) {
    .thread-bridge__inner {
        gap: 12px;
    }

    .thread-bridge__label {
        font-size: var(--font-size-16px);
    }

    .thread-bridge__signin-text {
        display: none;
    }
}

/* Always fill the layout container (not the full page) */
.article-section.layout-grid>.thread-bridge {
    grid-column: 1 / -1;
}

.article-section.layout-side>.thread-bridge {
    grid-column: 1 / -1;
}

.article-section.layout-wide>.thread-bridge,
.article-section.layout-full>.thread-bridge {
    width: 100%;
}






/* FILE: public/css/article_footer_ads.css — FULL FILE (UPDATED)
   Footer inline FLUID ad: full-width & centered across layouts.

   Works with:
   • OLD footer partial:  .article-inline-ad.-anywhere
   • NEW footer partial:  {{> ads/inline-manual registry="inline-ad"}}
     → wrapper emits: .article-inline-ad.-anywhere[data-placement="inline-ad"]
*/

/* ──────────────────────────────────────────────────────────────
   GRID (main + right): span full grid and center contents
   ────────────────────────────────────────────────────────────── */
.article-section.layout-grid>.article-inline-ad.-anywhere,
.article-section.layout-grid>.article-inline-ad.-anywhere[data-placement="inline-ad"] {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin: 24px 0 32px;
    width: 100%;
}

/* ──────────────────────────────────────────────────────────────
   SIDE layout:
   • If placed as a direct child of the grid "rail", span full grid.
   • If placed inside .article-main, still center and go full width.
   ────────────────────────────────────────────────────────────── */
.article-section.layout-side>.article-inline-ad.-anywhere,
.article-section.layout-side>.article-inline-ad.-anywhere[data-placement="inline-ad"] {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin: 24px 0 32px;
    width: 100%;
}

.article-section.layout-side .article-main>.article-inline-ad.-anywhere,
.article-section.layout-side .article-main>.article-inline-ad.-anywhere[data-placement="inline-ad"] {
    display: flex;
    justify-content: center;
    margin: 24px 0 32px;
    width: 100%;
}

/* ──────────────────────────────────────────────────────────────
   WIDE / FULL layouts: centered and full container width
   ────────────────────────────────────────────────────────────── */
.article-section.layout-wide>.article-inline-ad.-anywhere,
.article-section.layout-full>.article-inline-ad.-anywhere,
.article-section.layout-wide>.article-inline-ad.-anywhere[data-placement="inline-ad"],
.article-section.layout-full>.article-inline-ad.-anywhere[data-placement="inline-ad"] {
    display: flex;
    justify-content: center;
    margin: 24px 0 32px;
    width: 100%;
}

/* ──────────────────────────────────────────────────────────────
   Clamp the ad container width and make the creative fluid
   ────────────────────────────────────────────────────────────── */
.article-inline-ad.-anywhere .ad-slot,
.article-inline-ad.-anywhere[data-placement="inline-ad"] .ad-slot {
    width: 100%;
}

/* Ensure AdSense inline is fluid & never overflow */
.article-inline-ad.-anywhere .ad-slot ins.adsbygoogle,
.article-inline-ad.-anywhere[data-placement="inline-ad"] .ad-slot ins.adsbygoogle {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Placeholder reserve (SSR preview): keep centered box.
   NEW partial sets data-placeholder on the WRAPPER, not the inner .ad-slot. */
.article-inline-ad.-anywhere[data-placeholder="true"] .ad-slot,
.article-inline-ad.-anywhere[data-placement="inline-ad"][data-placeholder="true"] .ad-slot {
    min-height: var(--ad-h, 250px);
}

/* ──────────────────────────────────────────────────────────────
   Mobile: natural full width with tighter spacing
   ────────────────────────────────────────────────────────────── */
@media (max-width: 1150px) {

    .article-inline-ad.-anywhere,
    .article-inline-ad.-anywhere[data-placement="inline-ad"] {
        margin: 20px 0 28px;
    }
}




































/* ==========================================================================
   Article sections: remove top margin on the FIRST content block
   so main content aligns flush with the sidebar feed/ads.

   Targets (when they are the first new element in a section):
   - .article-widget
   - .article-p
   - .article-note
   - .article-block
   - ul.article-bullets-list
   - ul.article-tasks-list
   - ol.article-numbers-list
   - figure.article-photo-container
   - .egXXL-section-wrappers (XXL/toggle section container)

   Covers both structures the renderer outputs:
   • layout-full / layout-wide  → content is direct child of .article-section
   • layout-side / layout-grid  → content is direct child of .article-main
   Also handles the XXL card wrapper that encloses .egXXL-section-wrappers.

   Uses !important to override any inline aw_mt styles on widgets when first.
   ========================================================================== */

/* Full/Wide layouts: first child inside the section */
.article-section> :is(.article-widget,
    .article-p,
    .article-note,
    .article-block,
    ul.article-bullets-list,
    ul.article-tasks-list,
    ol.article-numbers-list,
    figure.article-photo-container,
    .egXXL-section-wrappers):first-child {
    margin-top: 0 !important;
}

/* Side/Grid layouts: content is inside .article-main */
.article-section.layout-side>.article-main> :is(.article-widget,
    .article-p,
    .article-note,
    .article-block,
    ul.article-bullets-list,
    ul.article-tasks-list,
    ol.article-numbers-list,
    figure.article-photo-container,
    .egXXL-section-wrappers):first-child,
.article-section.layout-grid>.article-main> :is(.article-widget,
    .article-p,
    .article-note,
    .article-block,
    ul.article-bullets-list,
    ul.article-tasks-list,
    ol.article-numbers-list,
    figure.article-photo-container,
    .egXXL-section-wrappers):first-child {
    margin-top: 0 !important;
}

/* XXL/toggle wrapper case: the first block is an .egXXL-card containing .egXXL-section-wrappers */
.article-section>section.egXXL-card:first-child .egXXL-section-wrappers,
.article-section.layout-side>.article-main>section.egXXL-card:first-child .egXXL-section-wrappers,
.article-section.layout-grid>.article-main>section.egXXL-card:first-child .egXXL-section-wrappers {
    margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   Fallback (older browsers that might not support :is()) — explicit selectors
   -------------------------------------------------------------------------- */
.article-section>.article-widget:first-child,
.article-section>.article-p:first-child,
.article-section>.article-note:first-child,
.article-section>.article-block:first-child,
.article-section>ul.article-bullets-list:first-child,
.article-section>ul.article-tasks-list:first-child,
.article-section>ol.article-numbers-list:first-child,
.article-section>figure.article-photo-container:first-child,
.article-section>.egXXL-section-wrappers:first-child,
.article-section.layout-side>.article-main>.article-widget:first-child,
.article-section.layout-side>.article-main>.article-p:first-child,
.article-section.layout-side>.article-main>.article-note:first-child,
.article-section.layout-side>.article-main>.article-block:first-child,
.article-section.layout-side>.article-main>ul.article-bullets-list:first-child,
.article-section.layout-side>.article-main>ul.article-tasks-list:first-child,
.article-section.layout-side>.article-main>ol.article-numbers-list:first-child,
.article-section.layout-side>.article-main>figure.article-photo-container:first-child,
.article-section.layout-side>.article-main>.egXXL-section-wrappers:first-child,
.article-section.layout-grid>.article-main>.article-widget:first-child,
.article-section.layout-grid>.article-main>.article-p:first-child,
.article-section.layout-grid>.article-main>.article-note:first-child,
.article-section.layout-grid>.article-main>.article-block:first-child,
.article-section.layout-grid>.article-main>ul.article-bullets-list:first-child,
.article-section.layout-grid>.article-main>ul.article-tasks-list:first-child,
.article-section.layout-grid>.article-main>ol.article-numbers-list:first-child,
.article-section.layout-grid>.article-main>figure.article-photo-container:first-child,
.article-section.layout-grid>.article-main>.egXXL-section-wrappers:first-child {
    margin-top: 0 !important;
}























.pages.pages-basic {
    --basic-width: 950px;
    padding: 5rem 1.5rem 0;
}

/* Center the header/sections and clamp the reading width */
.pages.pages-basic .article-header,
.pages.pages-basic .article-section {
    width: var(--basic-width);
    max-width: var(--basic-width);
    margin-left: auto;
    margin-right: auto;
}

/* If a specific layout class is present, cap it to the same width */
.pages.pages-basic .article-header.full,
.pages.pages-basic .article-header.wide,
.pages.pages-basic .article-section.layout-full,
.pages.pages-basic .article-section.layout-wide,
.pages.pages-basic .article-section.layout-side,
.pages.pages-basic .article-section.layout-grid {
    max-width: var(--basic-width);
}

/* Neutralize side/grid structures and hide rails on basic pages */
.pages.pages-basic .article-section.layout-side,
.pages.pages-basic .article-section.layout-grid {
    display: block;
}

.pages.pages-basic .article-sidebar,
.pages.pages-basic .article-sidebar-left,
.pages.pages-basic .article-sidebar-right {
    display: none !important;
}

.pages.pages-basic .article-main {
    min-width: 0;
}


/* APPEND to: public/css/view_articles.css
   Override TOC offset ONLY when rendering a BASIC page.
   (Keeps your existing .toc-container rule for all other layouts.) */
@supports selector(body:has(.pages.pages-basic)) {
    body:has(.pages.pages-basic) .toc-container {
        left: calc(((100vw - 925px) / 2) - clamp(275px, -675px + 50vw, 325px));
        top: 16.5rem !important
    }
}