@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* Narrow right sidebar by ~10% */
.container.th-flex .site-main {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: 75% !important;
}
.container.th-flex #secondary.widget-area {
    flex: 0 0 200px !important;
    width: 200px !important;
    max-width: 200px !important;
    min-width: 180px !important;
    align-self: flex-start !important;
}
.container.th-flex {
    flex-wrap: nowrap !important;
}

/* Override inline background-image on ALL page headers */
#primary-header {
    --tw-bg-image: none;
    background-image: linear-gradient(to right, #001E60 50%, #ffffff) !important;
    background-size: cover !important;
}

/* This targets the specific inline style the Fortune theme sets */
.page-header[data-image-title] {
    background-image: linear-gradient(to right, #001E60 50%, #ffffff) !important;
}

/* Ensure title and meta text stays white */
#primary-header .entry-title,
#primary-header h1,
#primary-header .entry-meta,
#primary-header .entry-meta a {
    color: #ffffff !important;
}

/* Smaller font helper */
.smaller {
    font-size: 80%;
}

/* ── Font: article + page title only (menu, sidebar, footer untouched) ── */
#main, #primary-header,
#main :is(h1,h2,h3,h4,h5,h6,p,li,a,td,th,blockquote,figcaption,.wp-block-post-date),
#primary-header :is(h1,p,a) {
    font-family: 'Schibsted Grotesk', system-ui, sans-serif !important;
}
#main .entry-content :is(p,li):not([style*="font-size"]):not([class*="-font-size"]) {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #100118;
}
#main :is(h1,h2,h3,h4), #primary-header h1 { font-weight: 600 !important; }
#main .entry-content :is(h1,h2,h3,h4) { color: #100118; }
#main :is(strong,b) { font-weight: 600; }
#main :is(pre,code,kbd,.wp-block-preformatted) {
    font-family: 'JetBrains Mono', ui-monospace, monospace !important;
}

/* ── TOC box: width follows its longest line, text column takes the rest ── */
@media (min-width: 782px) {
    .entry-content .wp-block-column[style*="flex-basis:32%"]:has(> .wp-block-group.has-background) {
        flex: 0 0 auto !important;
    }
    .entry-content .wp-block-column[style*="flex-basis:32%"]:has(> .wp-block-group.has-background) p {
        white-space: nowrap;
    }
    .entry-content .wp-block-column[style*="flex-basis:32%"]:has(> .wp-block-group.has-background) + .wp-block-column {
        flex: 1 1 0 !important;
        min-width: 0;
    }
}
/* Date above the intro text */
#main .wp-block-post-date,
#main .wp-block-post-date time {
    font-size: 15px !important;
    color: #3d3a45 !important;
}
/* Tables: wrap long paths instead of scrolling sideways */
#main .entry-content .wp-block-table td {
    overflow-wrap: anywhere;
}