/* A shared gutter with width set by the reading or listing layout. */
:root {
    --bfc-page-gutter:clamp(20px,3vw,32px);
    --bfc-wide-width:1280px;
    --bfc-reading-width:1080px;
    --bfc-path-width:860px;
}
:is(.bfc-home-refresh,.bfc-topic-main,.bfc-author-refresh,.bfc-library-page,.bfc-glossary-page,.bfc-legal-page,.bfc-editorial-page,.bfc-path-refresh,.post-template .gh-article,.bfc-standard-page) {
    --bfc-layout-width:var(--bfc-wide-width);
    --bfc-layout-shell:min(var(--bfc-layout-width),calc(100% - var(--bfc-page-gutter) * 2));
    --bfc-band-inset:max(var(--bfc-page-gutter),calc((100% - var(--bfc-layout-width)) / 2));
}
.bfc-path-simple {--bfc-layout-width:var(--bfc-path-width)}
body main:is(.bfc-readings-refresh,.bfc-glossary-page,.bfc-editorial-page) {--bfc-layout-width:1050px}
body main.bfc-legal-page {--bfc-layout-width:900px}
body main.bfc-editorial-page.is-regular-features {--bfc-layout-width:var(--bfc-wide-width)}
body.post-template .gh-article {--bfc-layout-width:var(--bfc-reading-width);--content-width:var(--bfc-reading-width);--container-gap:var(--bfc-page-gutter)}
.bfc-standard-page {--container-gap:var(--bfc-page-gutter)}

.bfc-home-refresh > .gh-outer {padding-inline:var(--bfc-page-gutter)}
.bfc-home-refresh > .gh-outer > .gh-inner {width:100%;max-width:var(--bfc-layout-width)}

body.tag-template .bfc-topic-main > :is(.bfc-topic-hero,.gh-container),
body .bfc-path-refresh .bfc-path-hero-band {padding-inline:var(--bfc-page-gutter)}
body.tag-template .bfc-topic-main .bfc-topic-hero .gh-archive.gh-inner,
body.tag-template .bfc-topic-main .gh-container-inner.gh-inner {width:100%!important;max-width:var(--bfc-layout-width)!important}
.bfc-path-refresh .bfc-learning-hero.gh-inner {width:100%;max-width:var(--bfc-layout-width)}
.bfc-path-refresh .bfc-learning-path-inner.gh-inner {width:var(--bfc-layout-shell);max-width:none}

body main:is(.bfc-library-page,.bfc-glossary-page,.bfc-legal-page,.bfc-editorial-page):not(.ocean-atlas) .gh-article-header,
body main.bfc-editorial-page .gh-article-header:has(> .bfc-feature-hero-grid) {padding-inline:var(--bfc-band-inset)}
body .bfc-editorial-page .gh-article-header > .bfc-feature-hero-grid {width:100%;max-width:none}
body main:is(.bfc-library-page,.bfc-glossary-page,.bfc-legal-page,.bfc-editorial-page) :is(.gh-content,#bfc-glossary-content) {
    width:var(--bfc-layout-shell)!important;max-width:none!important;
}
.bfc-page-about .bfc-about-portrait {right:var(--bfc-band-inset)}
body .ocean-atlas .ocean-atlas-shell {width:var(--bfc-layout-shell)}
body .ocean-atlas-hero.gh-article-header > .ocean-atlas-shell {width:var(--bfc-layout-shell)}

@media screen {
    body.post-template .bfc-post-opening {padding-inline:var(--bfc-page-gutter)}
    body.post-template .bfc-post-header {max-width:var(--bfc-layout-width)}
}
.bfc-author-refresh.gh-outer {padding-inline:0}
.bfc-author-refresh .gh-archive {padding-inline:var(--bfc-band-inset)}
.bfc-author-refresh .gh-archive-inner {max-width:none}
.bfc-author-refresh .bfc-author-essays.gh-inner {width:var(--bfc-layout-shell);max-width:none}
.bfc-start-gateway > .gh-outer,.bfc-frameworks > .gh-outer,
.bfc-industry-refresh > .gh-outer,.bfc-essays-archive.gh-outer {padding-inline:var(--bfc-page-gutter)}
.bfc-start-gateway > .gh-outer > .gh-inner,
.bfc-frameworks > .gh-outer > .gh-inner,
.bfc-industry-refresh > .gh-outer > .gh-inner,
.bfc-essays-archive > .gh-inner {width:100%;max-width:var(--bfc-wide-width)}
body .bfc-standard-page .gh-content.gh-canvas > :is(h2,h3,h4,h5,h6):not(.kg-width-wide):not(.kg-width-full),
body.post-template .gh-content.gh-canvas > :is(h2,h3,h4,h5,h6):not(.kg-width-wide):not(.kg-width-full) {grid-column:main!important}

body .bfc-standard-page .gh-content.gh-canvas > p:not(.kg-width-wide):not(.kg-width-full) {grid-column:main!important}
body :is(.bfc-standard-page, .post-template .gh-article) :is(.gh-content,.gh-article-header).gh-canvas {width:100%!important;max-width:none!important}

body main.bfc-page-the-blue-register {--bfc-layout-width:var(--bfc-wide-width)}
body .bfc-glossary-page .bfc-glossary-status {width:var(--bfc-layout-shell);max-width:none}
body .bfc-industry-refresh .bfc-industry-directory-inner.gh-inner {
    width:min(var(--bfc-wide-width),calc(100% - var(--bfc-page-gutter) * 2));
    max-width:none;
}


/* Inline prose links. Linked titles, archive actions and embedded UI keep their component styles. */
.gh-content.is-body a:any-link:where(p a, li a, dd a, blockquote a, figcaption a, td a):not(:where(
    :is(h1, h2, h3, h4, h5, h6, nav, noscript) a,
    :is(.kg-button-card, .kg-cta-card, .kg-bookmark-card, .kg-product-card, .kg-file-card, .kg-signup-card) a,
    :is(.bfc-currents-resources, .bf-data-grid, .glossary-index, .ocean-atlas) a,
    .bfc-readings-refresh .gh-content > p > a:first-child,
    .page-ocean-economy .gh-content > p > a:first-child[href$="/industry-profiles/"],
    .page-the-blue-register .gh-content > p > a:first-child[href$="/blue-currents/"],
    .page-glossary a[href^="#"],
    .gh-button, .bfc-button, [role="button"], [href^="#/"], [style][href^="mailto:"],
    :has(img, picture, svg)
)) {
    color: #235d70;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: underline solid #688b98 1px;
    text-underline-offset: 3px;
    text-decoration-skip-ink: auto;

    &:hover {
        color: #123f50;
        text-decoration-color: currentColor;
    }

    &:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 3px;
    }
}
