/* ==============================================================================================
   Blog — index, archives, search, and the post itself.

   Loaded by bnt_page_stylesheets() on any blog context (see bnt_is_blog()). It sits on top of
   design-om.css, so the hero, the section rhythm, .om-btn and .om-cta all come from there and
   nothing below repeats them. Everything here is either a component the OM design does not have
   (a post card, a filter row, a prose column) or a correction to one it has that was built for a
   product page.

   Tokens come from .om-page's own scope, not from theme.css: inside .om-page, --orange is #f9b233
   and --pale is #f6f7f9, which differ from the global values. Referencing them with a fallback
   keeps this file working if it is ever loaded outside that scope.
   ============================================================================================== */

/* ---------------------------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------------------------- */

/* The product heroes carry a button and a rating row; these carry a heading and one line, so they
   need about half the room. */
.bnt-blog-hero { padding: 54px 0 48px; }
.bnt-blog-hero h1 { margin-bottom: 14px; }
.bnt-blog-hero .om-hero-lead { margin-bottom: 0; }

.bnt-post-hero { padding: 54px 0 44px; text-align: center; }
.bnt-post-hero h1 {
    /* A post title is a sentence, not a slogan: smaller than a product h1 and set to wrap
       sensibly rather than at the 276px the generated sheet pins .om-hero h1 to on mobile. */
    max-width: 860px;
    width: auto;
    font-size: clamp(28px, 4.2vw, 42px);
    line-height: 1.18;
    margin-bottom: 18px;
    text-wrap: balance;
}
/* The category, in the meta line under the title -- it moved here when the eyebrow went. */
.bnt-post__cat {
    color: #f9b233;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12.5px;
}
.bnt-post__cat:hover { text-decoration: underline; }

.bnt-post__meta {
    margin: 0;
    align-items: center;
    color: #9fb0c4;
    font-size: 14px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* .om-hero p is width:718px with a 56px bottom margin in the generated sheet -- both sized for a
   hero lead paragraph, neither wanted by a one-line meta row. (0,2,0) to beat it. */
.bnt-post-hero .bnt-post__meta { width: auto; max-width: none; margin: 0; }

/* ---------------------------------------------------------------------------------------------
   Filter row: search box + category chips
   --------------------------------------------------------------------------------------------- */

.bnt-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 24px;
    margin-bottom: 38px;
}

.bnt-search { display: flex; min-width: 260px; flex: 0 1 340px; }
.bnt-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line, #dbe0e6);
    border-right: 0;
    border-radius: 3px 0 0 3px;
    font: inherit;
    font-size: 15px;
    color: inherit;
    background: #fff;
}
.bnt-search__input:focus { outline: 2px solid var(--orange, #f9b233); outline-offset: -2px; }
.bnt-search__btn {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 0 3px 3px 0;
    background: var(--orange, #f9b233);
    color: #092b54;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.bnt-search__btn:hover { filter: brightness(.94); }

.bnt-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.bnt-cat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--line, #dbe0e6);
    border-radius: 999px;
    background: #fff;
    color: #172d49;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
}
.bnt-cat:hover { border-color: var(--orange, #f9b233); }
.bnt-cat.is-active {
    background: var(--orange, #f9b233);
    border-color: var(--orange, #f9b233);
    color: #092b54;
}
.bnt-cat__n { color: #8a939d; font-weight: 400; font-size: 12px; }
.bnt-cat.is-active .bnt-cat__n { color: #3c4a5c; }

/* ---------------------------------------------------------------------------------------------
   Card grid

   Not .om-card-grid: that component is pinned to fixed per-card heights (225px, then 210px from
   the fourth) because the OM comp's cards hold a fixed amount of copy. Post titles are two to
   five lines, so the row has to size to its tallest card.
   --------------------------------------------------------------------------------------------- */

.bnt-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.bnt-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line, #dbe0e6);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}
.bnt-card:hover { box-shadow: 0 10px 30px -18px #15304c59; transform: translateY(-2px); }

.bnt-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--pale, #f6f7f9);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.bnt-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Stand-in for a missing featured image. Several hundred older posts have none. */
.bnt-card__mark { font-size: 26px; font-weight: 700; color: #c6ced8; letter-spacing: -.02em; }
.bnt-card__mark em { font-style: normal; color: #aab4c0; }

.bnt-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 22px 22px 20px; }

.bnt-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #7a838e;
}
/* Above the stretched link, so a category chip on a card is still its own target. */
.bnt-card__cat {
    position: relative;
    z-index: 1;
    color: #b4740a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.bnt-card__cat:hover { text-decoration: underline; }

.om-page .bnt-card__title { margin: 0 0 10px; font-size: 18px; line-height: 1.3; font-weight: 700; }
.bnt-card__title a { color: #032d60; }

/* The whole card is clickable, but only the title is a link: the pseudo-element carries the hit
   area, so the accessible name stays the title and the card is announced once, not twice. */
.bnt-card__link::after { content: ''; position: absolute; inset: 0; }
.bnt-card__link:focus-visible { outline: none; }
.bnt-card:focus-within { box-shadow: 0 0 0 3px #dd8210; }

.bnt-card__excerpt {
    margin: 0 0 16px;
    color: #616b76;
    font-size: 14px;
    line-height: 1.5;
    /* Three lines, so a row of cards has one text block height whatever the excerpt length. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bnt-card__more { margin: auto 0 0; color: #032d60; font-size: 13px; font-weight: 700; }
.bnt-card__more::after { content: ' →'; color: var(--orange, #f9b233); }

/* The newest post, on page 1 of the index only: full width, image beside the copy. */
@media (min-width: 900px) {
    .bnt-grid--with-feature .bnt-card--feature {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: stretch;
    }
    .bnt-card--feature .bnt-card__media { flex: 0 0 52%; aspect-ratio: auto; }
    .bnt-card--feature .bnt-card__body { justify-content: center; padding: 34px 38px; }
    .om-page .bnt-card--feature .bnt-card__title { font-size: 27px; line-height: 1.22; }
    .bnt-card--feature .bnt-card__excerpt { font-size: 15.5px; -webkit-line-clamp: 4; max-width: 52ch; }
    .bnt-card--feature .bnt-card__mark { font-size: 40px; }
}

.bnt-empty { margin: 0; padding: 60px 0; text-align: center; color: #616b76; font-size: 17px; }

/* ---------------------------------------------------------------------------------------------
   Pagination
   --------------------------------------------------------------------------------------------- */

.bnt-pagination { margin-top: 44px; }
.bnt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bnt-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line, #dbe0e6);
    border-radius: 3px;
    background: #fff;
    color: #032d60;
    font-size: 14px;
    font-weight: 600;
}
.bnt-pagination .page-numbers:hover { border-color: var(--orange, #f9b233); }
.bnt-pagination .page-numbers.current {
    background: var(--orange, #f9b233);
    border-color: var(--orange, #f9b233);
    color: #092b54;
}
.bnt-pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ---------------------------------------------------------------------------------------------
   The post
   --------------------------------------------------------------------------------------------- */

.bnt-post__body { padding-top: 48px; }
.bnt-post__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
}

.bnt-post__figure { margin: 0 0 32px; }
.bnt-post__figure img { width: 100%; border-radius: 10px; display: block; }

/* --- Prose ---------------------------------------------------------------------------------
   The only styling a post body gets. Post content is authored HTML going back ten years, so
   these are element selectors, not classes: whatever the editor typed has to land somewhere.
   Scoped to .bnt-post__main so it cannot reach the sidebar form.
   ------------------------------------------------------------------------------------------- */

.bnt-post__main {
    font-size: 17px;
    line-height: 1.68;
    color: #2e3033;
}
.bnt-post__main > p { margin: 0 0 22px; }
.bnt-post__main h2 { font-size: 26px; line-height: 1.25; text-align: left; margin: 42px 0 14px; }
.bnt-post__main h3 { font-size: 20px; line-height: 1.3; margin: 32px 0 12px; }
.bnt-post__main h4 { font-size: 17px; margin: 26px 0 10px; }
.bnt-post__main a { color: #b4740a; text-decoration: underline; }
.bnt-post__main a:hover { color: #8c5a06; }
.bnt-post__main ul,
.bnt-post__main ol { margin: 0 0 22px; padding-left: 24px; }
.bnt-post__main li { margin-bottom: 8px; }
.bnt-post__main img { height: auto; border-radius: 8px; }
.bnt-post__main figure { margin: 30px 0; }
.bnt-post__main figcaption { margin-top: 8px; font-size: 13.5px; color: #7a838e; }
.bnt-post__main blockquote {
    margin: 30px 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--orange, #f9b233);
    color: #032d60;
    font-size: 19px;
    line-height: 1.5;
}
.bnt-post__main blockquote p:last-child { margin-bottom: 0; }
.bnt-post__main hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line, #dbe0e6); }
.bnt-post__main code {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--pale, #f6f7f9);
    font-size: .9em;
}
.bnt-post__main pre {
    margin: 0 0 24px;
    padding: 18px;
    border-radius: 8px;
    background: #032d60;
    color: #e6ecf3;
    font-size: 14px;
    overflow-x: auto;
}
.bnt-post__main pre code { background: none; padding: 0; }
/* Legacy bodies contain tables laid out for a 1170px column. Scroll rather than overflow. */
.bnt-post__main table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.bnt-post__main th,
.bnt-post__main td { padding: 10px 12px; border: 1px solid var(--line, #dbe0e6); text-align: left; }
.bnt-post__main th { background: var(--pale, #f6f7f9); }
/* Ten years of posts carry <iframe> embeds sized in fixed pixels. */
.bnt-post__main iframe { max-width: 100%; }

.bnt-post__pages { margin: 30px 0 0; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.bnt-post__tags { margin: 30px 0 0; font-size: 14px; color: #7a838e; }
.bnt-post__tags span { font-weight: 700; margin-right: 6px; }
.bnt-post__tags a { color: #b4740a; }

.bnt-author {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 40px;
    padding: 24px;
    border: 1px solid var(--line, #dbe0e6);
    border-radius: 10px;
    background: var(--pale, #f6f7f9);
}
.bnt-author__photo { border-radius: 50%; width: 64px; height: 64px; }
.bnt-author__name { margin: 0 0 4px; font-weight: 700; color: #032d60; }
.bnt-author__bio { margin: 0; font-size: 14.5px; line-height: 1.55; color: #616b76; }

.bnt-post__nav { display: flex; gap: 16px; margin-top: 40px; }
/* (0,2,0): the prose rules above colour and underline every <a> in the article, and the
   previous/next links sit inside it. They are navigation, not prose. */
.bnt-post__main .bnt-post__nav-link,
.bnt-post__nav-link {
    flex: 1 1 0;
    color: #032d60;
    text-decoration: none;
    padding: 18px 20px;
    border: 1px solid var(--line, #dbe0e6);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}
.bnt-post__nav-link:hover { border-color: var(--orange, #f9b233); }
.bnt-post__nav-link span {
    display: block;
    margin-bottom: 6px;
    color: #7a838e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.bnt-post__nav-link--next { text-align: right; }

.bnt-related h2 { text-align: left; margin-bottom: 26px; }

/* ---------------------------------------------------------------------------------------------
   Sidebar
   --------------------------------------------------------------------------------------------- */

.bnt-sidebar__sticky { position: sticky; top: 96px; display: grid; gap: 24px; }
.bnt-sidebar__block {
    padding: 22px;
    border: 1px solid var(--line, #dbe0e6);
    border-radius: 10px;
    background: #fff;
}
/* (0,1,1), to beat `.om-page h2` -- which is 32px and centred, and was winning against a
   plain .bnt-sidebar__title. */
.om-page .bnt-sidebar__title { margin: 0 0 14px; font-size: 16px; font-weight: 700; text-align: left; }
.bnt-sidebar .bnt-search { flex: 1 1 auto; min-width: 0; }
.bnt-cats--stack { flex-direction: column; align-items: flex-start; }
.bnt-cats--stack .bnt-cat { width: 100%; justify-content: space-between; }

/* ---------------------------------------------------------------------------------------------
   Demo form
   --------------------------------------------------------------------------------------------- */

.bnt-demo-card {
    padding: 24px 22px 26px;
    border-radius: 10px;
    background: #032d60;
    color: #cfd8e3;
}
.om-page .bnt-demo-card__title { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: #fff; text-align: left; }
.bnt-demo-card__sub { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: #9fb0c4; }

.bnt-field { margin: 0 0 12px; display: grid; gap: 5px; }
.bnt-field label { font-size: 12.5px; font-weight: 600; color: #9fb0c4; }
.bnt-field input {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #154d90;
    border-radius: 3px;
    background: #0a3973;
    color: #fff;
    font: inherit;
    font-size: 15px;
}
.bnt-field input:focus { outline: 2px solid var(--orange, #f9b233); outline-offset: -2px; }
.bnt-field input:user-invalid { border-color: #d26b6b; }

.bnt-demo-form__submit { width: 100%; margin-top: 6px; height: 50px; font-size: 16px; }
.bnt-demo-form__submit[disabled] { opacity: .75; cursor: progress; }
.bnt-demo-form__legal { margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: #8a97a8; }
.bnt-demo-form__legal a { color: #f9b233; text-decoration: underline; }

/* The verification dialog and the honeypot are in component-webform.css. */

/* ---------------------------------------------------------------------------------------------
   Narrower
   --------------------------------------------------------------------------------------------- */

@media (max-width: 1099px) {
    .bnt-post__layout { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    /* Sticky only earns its place beside the article; below it, it would pin the form to the
       viewport while the reader is trying to leave the page. */
    .bnt-sidebar__sticky { position: static; max-width: 560px; }
    .bnt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 767px) {
    .bnt-blog-hero,
    .bnt-post-hero { padding: 36px 0 34px; }
    .bnt-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .bnt-filters { gap: 16px; }
    .bnt-search { flex: 1 1 100%; }
    .bnt-post__body { padding-top: 32px; }
    .bnt-post__main { font-size: 16px; }
    .bnt-post__main h2 { font-size: 22px; }
    .bnt-post__nav { flex-direction: column; }
    .bnt-post__nav-link--next { text-align: left; }
    .bnt-related h2 { text-align: center; }
}
