/*
Theme Name: Bivio
Description: Italian short-story theme: centred two-row masthead, horizontal lead story, four-column story grid, serif reading column.
Version: 1.0.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bivio
Tags: blog, news, custom-menu, featured-images
*/
:root{
    --th-ink: #121a26;
    --th-text: #3b4554;
    --th-muted: #667184;
    --th-line: #dde2e8;
    --th-soft: #f1f4f7;
    --th-white: #ffffff;
    --th-brand: #1a5f7a;
    --th-brand-dark: #12475c;
    --th-night: #121a26;
    --th-night-text: #b7c1cf;
    --th-font-ui: "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --th-font-read: "Source Serif 4", Georgia, serif;
    --th-radius: 2px;
    --th-container: 1200px;
    --th-text-width: 680px;
    --th-gutter: 24px;
}
@media screen{
    /*
    * BASE.
    */
    *,
    *::before,
    *::after{ box-sizing: border-box; }
    html{ -webkit-text-size-adjust: 100%; }
    body{
        margin: 0px;
        background: var(--th-white);
        color: var(--th-ink);
        font-family: var(--th-font-ui);
        font-size: 16px;
        line-height: 24px;
        -webkit-font-smoothing: antialiased;
    }
    img{ max-width: 100%; height: auto; }
    a{ color: var(--th-brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
    a:hover{ color: var(--th-brand-dark); }
    button,
    input{ font: inherit; }
    :focus-visible{ outline: 2px solid var(--th-brand); outline-offset: 2px; }
    .container{ width: min(100% - 48px, var(--th-container)); margin-inline: auto; }
    .container-text{ width: min(100% - 48px, var(--th-text-width)); margin-inline: auto; }
    .thumb-cover{ display: block; overflow: hidden; border-radius: var(--th-radius); background: var(--th-soft); }
    .thumb-cover img{ display: block; width: 100%; height: 100%; object-fit: cover; }
    .screen-reader-text{
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0px, 0px, 0px, 0px);
        white-space: nowrap;
        border: 0px;
    }
    .skip-link{ position: absolute; left: 16px; top: -64px; z-index: 100; padding: 8px 16px; background: var(--th-white); color: var(--th-brand); font-weight: 600; }
    .skip-link:focus{ top: 8px; }
    .btn{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        padding: 0px 20px;
        border: 0px;
        border-radius: var(--th-radius);
        background: var(--th-brand);
        color: var(--th-white);
        font-size: 15px;
        line-height: 20px;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }
    .btn:hover{ background: var(--th-brand-dark); color: var(--th-white); }
    .btn-line{ background: transparent; color: var(--th-ink); box-shadow: inset 0px 0px 0px 1px var(--th-ink); }
    .btn-line:hover{ background: var(--th-ink); color: var(--th-white); }
    .post-cat{ margin: 0px 0px 8px; color: var(--th-brand); font-size: 13px; line-height: 16px; font-weight: 600; }
    .post-cat a{ color: inherit; text-decoration: none; }
    .post-cat a:hover{ text-decoration: underline; }
    .post-date{ margin: 0px; color: var(--th-muted); font-size: 13px; line-height: 16px; }

    /*
    * HEADER: CENTRED MASTHEAD + NAV ROW.
    */
    .site-header{ position: relative; background: var(--th-white); border-bottom: 1px solid var(--th-line); }
    .header-top{ display: grid; grid-template-columns: 40px minmax(0px, 1fr) 40px; align-items: center; gap: 16px; height: 72px; }
    .header-brand{ grid-column: 2; justify-self: center; display: flex; align-items: center; gap: 10px; color: var(--th-ink); text-decoration: none; }
    .header-brand:hover{ color: var(--th-ink); }
    .brand-mark{ display: block; flex: 0 0 28px; width: 28px; height: 28px; }
    .header-brand-name{ font-size: 28px; line-height: 32px; font-weight: 800; letter-spacing: -.02em; }
    .header-icon{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0px;
        border: 0px;
        border-radius: var(--th-radius);
        background: transparent;
        color: var(--th-ink);
        cursor: pointer;
    }
    .header-icon:hover{ background: var(--th-soft); }
    .header-icon svg{ display: block; width: 22px; height: 22px; }
    .header-icon .icon-close{ display: none; }
    .header-icon[aria-expanded="true"] .icon-open{ display: none; }
    .header-icon[aria-expanded="true"] .icon-close{ display: block; }
    .header-toggle{ grid-column: 1; grid-row: 1; visibility: hidden; }
    .header-search-toggle{ grid-column: 3; grid-row: 1; }
    .header-nav{ border-top: 1px solid var(--th-line); }
    .header-nav .menu{ display: flex; justify-content: center; gap: 32px; list-style: none; margin: 0px; padding: 0px; }
    .header-nav .menu a{ display: block; padding: 12px 0px 10px; border-bottom: 2px solid transparent; color: var(--th-ink); font-size: 15px; line-height: 24px; font-weight: 600; text-decoration: none; }
    .header-nav .menu a:hover{ color: var(--th-brand); }
    .header-nav .current-menu-item > a{ border-bottom-color: var(--th-ink); }
    .header-search{ padding: 16px 0px; border-top: 1px solid var(--th-line); background: var(--th-soft); }
    .header-search[hidden]{ display: none; }
    .search-form{ display: flex; gap: 8px; max-width: 680px; margin-inline: auto; }
    .search-form .search-field{
        flex: 1 1 auto;
        min-width: 0px;
        height: 44px;
        padding: 0px 14px;
        border: 1px solid var(--th-line);
        border-radius: var(--th-radius);
        background: var(--th-white);
        color: var(--th-ink);
        font-size: 16px;
    }
    .search-form .search-field:focus{ border-color: var(--th-brand); outline: none; }

    /*
    * BLOCK HEAD.
    */
    .block-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-top: 12px; border-top: 3px solid var(--th-ink); }
    .block-title{ margin: 0px; font-size: 20px; line-height: 28px; font-weight: 700; }
    .block-link{ flex: 0 0 auto; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; }
    .block-link:hover{ text-decoration: underline; }

    /*
    * HOME LEAD: IMAGE 7 COLUMNS, TEXT 5 COLUMNS.
    */
    .home-lead-wrap{ padding-top: 40px; }
    .home-lead{ display: grid; grid-template-columns: repeat(12, minmax(0px, 1fr)); column-gap: var(--th-gutter); align-items: center; }
    .home-lead-thumb{ grid-column: span 7; aspect-ratio: 3 / 2; }
    .home-lead-body{ grid-column: span 5; }
    .home-lead-title{ margin: 0px 0px 16px; font-size: 34px; line-height: 42px; font-weight: 800; letter-spacing: -.015em; }
    .home-lead-title a{ color: var(--th-ink); text-decoration: none; }
    .home-lead-title a:hover{ text-decoration: underline; text-decoration-thickness: 2px; }
    .home-lead-excerpt{ margin: 0px 0px 16px; color: var(--th-text); font-family: var(--th-font-read); font-size: 18px; line-height: 28px; }

    /*
    * POST GRID: FOUR COLUMNS.
    */
    .home-more{ padding-top: 56px; }
    .post-grid{ display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 40px var(--th-gutter); }
    .post-item-thumb{ aspect-ratio: 3 / 2; margin-bottom: 12px; }
    .post-item-title{ margin: 0px 0px 8px; font-size: 17px; line-height: 24px; font-weight: 700; }
    .post-item-title a{ color: var(--th-ink); text-decoration: none; }
    .post-item-title a:hover{ color: var(--th-brand); text-decoration: underline; }
    .home-more-foot{ margin-top: 40px; text-align: center; }

    /*
    * ARCHIVE.
    */
    .archive-head{ padding: 48px 0px 0px; }
    .archive-title{ margin: 0px 0px 32px; font-size: 36px; line-height: 44px; font-weight: 800; letter-spacing: -.015em; }
    .archive-desc{ max-width: 680px; margin: -16px 0px 32px; color: var(--th-text); }
    .archive-empty{ margin: 0px 0px 24px; color: var(--th-text); }
    .block-pagination{ margin-top: 48px; }
    .block-pagination ul{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0px; padding: 0px; }
    .block-pagination a,
    .block-pagination span{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        height: 40px;
        padding: 0px 12px;
        border: 1px solid var(--th-line);
        border-radius: var(--th-radius);
        color: var(--th-ink);
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
    }
    .block-pagination a:hover{ border-color: var(--th-ink); }
    .block-pagination .current{ border-color: var(--th-ink); background: var(--th-ink); color: var(--th-white); }

    /*
    * SINGLE & PAGE: CENTRED HEAD, SERIF READING COLUMN.
    */
    .single-head{ padding-top: 48px; text-align: center; }
    .single-head .post-cat{ margin-bottom: 12px; font-size: 14px; }
    .single-title{ margin: 0px 0px 16px; font-size: 40px; line-height: 48px; font-weight: 800; letter-spacing: -.015em; overflow-wrap: break-word; }
    .single-meta{ display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin: 0px 0px 32px; color: var(--th-muted); font-size: 14px; line-height: 20px; }
    .single-thumb{ margin-top: 0px; margin-bottom: 32px; }
    .single-thumb img{ display: block; width: 100%; height: auto; border-radius: var(--th-radius); }
    .single-thumb figcaption{ margin-top: 8px; color: var(--th-muted); font-size: 13px; line-height: 20px; }
    .article-body{ color: var(--th-ink); font-family: var(--th-font-read); font-size: 20px; line-height: 34px; overflow-wrap: break-word; }
    .article-body > *:first-child{ margin-top: 0px; }
    .article-body p{ margin: 0px 0px 24px; }
    .article-body h2{ margin: 40px 0px 16px; font-family: var(--th-font-ui); font-size: 26px; line-height: 34px; font-weight: 700; }
    .article-body h3{ margin: 32px 0px 12px; font-family: var(--th-font-ui); font-size: 21px; line-height: 28px; font-weight: 700; }
    .article-body ul,
    .article-body ol{ margin: 0px 0px 24px; padding-left: 24px; }
    .article-body li{ margin-bottom: 8px; }
    .article-body img{ border-radius: var(--th-radius); }
    .article-body figure{ margin: 32px 0px; }
    .article-body figcaption{ margin-top: 8px; color: var(--th-muted); font-family: var(--th-font-ui); font-size: 13px; line-height: 20px; }
    .article-body blockquote{ margin: 32px 0px; padding: 0px 0px 0px 20px; border-left: 3px solid var(--th-brand); color: var(--th-text); font-style: italic; }
    .article-body blockquote p:last-child{ margin-bottom: 0px; }
    .article-body .bbmsa-slot{ margin: 32px auto; }
    .article-body .la-rg-cta{ margin: 32px 0px; padding: 24px 16px; border: 0px; border-top: 3px solid var(--th-ink); border-radius: 0px; background: var(--th-soft); }
    .article-body .la-rg-cta button{ height: 48px; padding: 0px 24px; border-radius: var(--th-radius); background: var(--th-brand); font: 600 16px/24px var(--th-font-ui); }
    .article-body .la-rg-cta button:hover{ background: var(--th-brand-dark); }
    .article-body .la-rg-cta p{ margin: 12px 0px 0px; color: var(--th-text); font: 14px/20px var(--th-font-ui); }
    .la-rg-tail{ scroll-margin-top: 24px; }
    /* Read-gate dialog: the plugin gives the ad box overflow:auto, and full-width responsive ads grow past it, so both scrollbars showed. */
    .la-rg-panel .la-rg-ad{ width: 100%; overflow: hidden; }
    .la-rg-panel .la-rg-ad iframe{ max-width: 100%; }
    .single-related{ padding-top: 64px; }

    /*
    * 404.
    */
    .not-found{ padding: 64px 0px 0px; text-align: center; }
    .not-found-text{ margin: 0px 0px 24px; color: var(--th-text); }
    .not-found .search-form{ margin-bottom: 24px; }

    /*
    * FOOTER: DARK.
    */
    .site-footer{ margin-top: 96px; background: var(--th-night); color: var(--th-night-text); font-size: 15px; line-height: 24px; }
    .footer-inner{ display: grid; grid-template-columns: repeat(12, minmax(0px, 1fr)); column-gap: var(--th-gutter); padding: 56px 0px 48px; }
    .footer-col-brand{ grid-column: span 6; }
    .footer-col{ grid-column: span 3; }
    .footer-brand{ display: inline-flex; align-items: center; gap: 10px; color: var(--th-white); text-decoration: none; font-size: 24px; line-height: 28px; font-weight: 800; letter-spacing: -.02em; }
    .footer-brand:hover{ color: var(--th-white); }
    .footer-about{ max-width: 360px; margin: 16px 0px 0px; }
    .footer-title{ margin: 0px 0px 12px; color: var(--th-white); font-size: 15px; line-height: 24px; font-weight: 700; }
    .footer-list,
    .footer-col .menu{ list-style: none; margin: 0px; padding: 0px; }
    .footer-list li,
    .footer-col .menu li{ margin-bottom: 8px; }
    .footer-col a{ color: var(--th-night-text); text-decoration: none; }
    .footer-col a:hover{ color: var(--th-white); text-decoration: underline; }
    .footer-bottom{ display: flex; justify-content: space-between; gap: 16px; padding: 20px 0px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; line-height: 20px; }
}
