/* ============================================================
   style.css
   ============================================================ */


@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@400;600;700&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Reset ─────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
    font-size: 1.125rem;
    letter-spacing: .05px;
    line-height: 1.5;
    color: #111;
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #2c40d0;
    text-decoration: underline;
}

a:hover {
    color: #2333a6;
    text-decoration: none;
}

b,
strong {
    font-family: 'Cabin', sans-serif;
    font-weight: 600;
}

blockquote,
ol,
p,
ul {
    margin-top: 0;
    margin-bottom: 1.75rem;
}

ul {
    padding-left: 1.5rem;
    list-style: disc;
}

ol {
    padding: 0;
    list-style: none;
    counter-reset: section;
}

ol>li {
    padding-left: 1rem;
    text-indent: -1rem;
    counter-increment: section;
    margin-bottom: .375rem;
}

ol>li::before {
    content: counter(section) ".";
    display: inline-block;
    width: 1rem;
    margin-right: .5rem;
    font-family: 'Cabin', sans-serif;
    font-weight: 600;
    text-align: right;
}

/* ── Fixed Top Nav (Investopedia Style) ── */
.inv-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.25rem;
    z-index: 9000;
    background: #fff;
    box-shadow: 0 .125rem .375rem rgba(0, 0, 0, .15);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1.5rem;
}

.inv-logo {
    font-family: 'Cabin', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c40d0;
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.inv-nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.inv-nav a {
    font-family: 'Cabin', sans-serif;
    font-size: .875rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #0d0d0d;
}

.inv-nav a:hover {
    text-decoration: underline;
}

.inv-header-spacer {
    height: 3.25rem;
}

/* ── Article Grid ── */
.inv-article {
    display: grid;
    padding: 0 2rem;
    position: relative;
    margin: 0 auto;
    grid-template-columns: 1fr;
    grid-template-areas:
        "left-rail"
        "pre-content"
        "content"
        "art-footer";
}

@media (min-width: 50em) {
    .inv-article {
        grid-template-columns: 14rem 1fr;
        column-gap: 3rem;
        padding: 0 3rem;
        grid-template-areas:
            "pre-content pre-content"
            "left-rail content"
            "art-footer art-footer";
    }
}

@media (min-width: 64em) {
    .inv-article {
        grid-template-columns: 16.5rem 1fr;
        column-gap: 4rem;
        padding: 0 4rem;
    }
}

/* ── Grid Areas ── */
.inv-left-rail {
    grid-area: left-rail;
    padding: 0;
}

.inv-pre-content {
    grid-area: pre-content;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.inv-content {
    grid-area: content;
}

.inv-art-footer {
    grid-area: art-footer;
}

/* ── Sticky TOC ── */
.inv-sticky-toc {
    position: sticky;
    top: 75px;
}

.inv-toc-heading {
    display: none;
    font-family: 'Cabin', sans-serif;
    font-size: 1.375rem;
    margin-bottom: .5rem;
}

.inv-toc-list {
    display: none;
    margin: 0;
    padding: 0;
    margin-left: -20px;
    list-style: none;
    font-size: .9375rem;
}

@media (min-width: 50em) {
    .inv-toc-heading {
        display: block;
    }

    .inv-toc-list {
        display: block;
    }
}

.inv-toc-item {
    position: relative;
    font-size: 1rem;
}

.inv-toc-link {
    display: inline-block;
    max-width: calc(100% - 1rem);
    margin-left: .2rem;
    padding: .5rem 0 .5rem .75rem;
    border-left: 1.5px solid #d4d4d4;
    line-height: 1.2;
    text-decoration: none;
    color: #444;
}

.inv-toc-link:hover {
    color: #000;
}

.inv-toc-link.active {
    border-color: transparent;
    font-weight: 600;
    color: #000;
}

.inv-toc-link.active::before {
    content: "";
    width: 0;
    height: 0;
    position: absolute;
    left: -15px;
    margin-top: 5px;
    border-radius: 3px;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #2c40d0;
}

/* ── Breadcrumbs ── */
.inv-breadcrumbs {
    margin: 2rem 0 .5rem;
    padding-left: 0;
    list-style: none;
    font-family: 'Cabin', sans-serif;
    font-size: .875rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.inv-breadcrumbs li+li::before {
    content: "›";
    color: #2c40d0;
    margin-right: .5rem;
}

.inv-breadcrumbs a {
    text-decoration: none;
    color: #2c40d0;
}

/* ── Article H1 ── */
.inv-art-heading {
    margin: 0 0 1rem;
    font-family: 'Cabin', sans-serif;
    font-size: 2.125rem;
    font-weight: 400;
    line-height: 1.1;
    position: relative;
    padding-bottom: 1rem;
    color: #111;
}

.inv-art-heading::after {
    content: "";
    width: 1.875rem;
    height: .3125rem;
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #2c40d0;
}

/* ── Video Section (exact source layout) ── */
.inv-video-title {
    font-family: 'Cabin', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
    color: #111;
    margin: 2rem 0 .75rem;
}

.inv-video-wrap {
    text-align: center;
    margin-bottom: .5rem;
}

.inv-video-wrap iframe {
    max-width: 100%;
    border: none;
}

.inv-video-reload {
    text-align: center;
    font-size: .85rem;
    color: #777;
    margin-bottom: 1.5rem;
}

/* ── Bylines ── */
.inv-bylines {
    margin: 0 0 .75rem;
}

.inv-byline-row {
    font-size: .875rem;
    line-height: 2;
    color: #555;
}

.inv-byline-label {
    margin-right: .25rem;
}

.inv-byline-name {
    letter-spacing: .05rem;
    text-transform: uppercase;
    font-family: 'Cabin', sans-serif;
    font-weight: 600;
    line-height: 1;
    border-bottom: 1px dashed;
    text-decoration: none;
    color: #111;
}

.inv-byline-name:hover {
    border-bottom-style: solid;
    color: #333e8b;
}

.inv-byline-date::before {
    content: "|";
    margin: 0 .375rem 0 .125rem;
}

/* ── Article Body ── */
.inv-body h2,
.inv-sc-heading {
    font-family: 'Cabin', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
    margin: 2rem 0 .5rem;
}

.inv-body p {
    margin-bottom: 1.75rem;
}

.inv-body ol>li::before {
    font-family: 'Cabin', sans-serif;
    font-weight: 600;
}

/* ── Footer Notice ── */
.inv-dotdash {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .5rem;
    padding: 1.25rem 1.5rem .875rem;
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

.inv-dotdash p {
    font-family: Helvetica, Arial, sans-serif;
    font-size: .8125rem;
    color: #000;
    margin: 0;
}

.inv-dotdash a {
    text-decoration: underline;
    color: #000;
}

.inv-dotdash .inv-tos-link {
    color: #c00;
}


/* ── Debug warning banner ── */
.inv-debug-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffcc00;
    color: #000;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-family: sans-serif;
    border-top: 3px solid #cc0000;
    z-index: 99999999;
}

/* ── Responsive ── */
@media (max-width: 49.9375em) {
    .inv-art-heading {
        font-size: 1.75rem;
    }

    .inv-article {
        padding: 0 1rem;
    }

    .inv-header .inv-nav {
        display: none;
    }
}