/*
 * Sports Analytics public Astra presentation.
 * Visual rules adapted from the existing ANL public theme. All selectors require
 * the server-owned spt-public body class; content, routes and form controls stay
 * owned by their existing WordPress components.
 */

/* The header is shared by public theme pages, including the unchanged homepage. */
body.spt-public #masthead {
    color: #181818;
    font-family: "Inter", sans-serif;
    font-weight: 500;
}

body.spt-public #masthead .ast-primary-header-bar {
    background: #fff;
    border-bottom: 1px solid #b6c4bd;
}

body.spt-public #masthead .main-header-menu > .menu-item > .menu-link {
    color: #181818;
    font-weight: 500;
    line-height: 1.6;
}

body.spt-public #masthead .main-header-menu > .current-menu-item > .menu-link,
body.spt-public #masthead .main-header-menu .menu-link:hover,
body.spt-public #masthead .main-header-menu .menu-link:focus-visible {
    color: #1b9156;
}

body.spt-public #masthead .main-header-menu .menu-link:focus-visible,
body.spt-public #masthead .menu-toggle:focus-visible,
body.spt-public #masthead .ast-menu-toggle:focus-visible {
    outline: 2px solid #159451;
    outline-offset: -3px;
}

body.spt-public #masthead .ast-header-button-1 .ast-custom-button {
    padding: 4px 22px;
    border-width: 1.6px;
    border-radius: 10px;
    font-family: "DM Sans", sans-serif;
    font-weight: 480;
}

/* Restyle only the existing language submenu; no switcher or language is added. */
body.spt-public #ast-desktop-header .main-header-menu > .menu-item-has-children > .sub-menu {
    box-sizing: border-box;
    width: max-content;
    min-width: 0;
    max-width: calc(100vw - 32px);
    padding: 6px 0;
    border: 1px solid #d1d1d1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 40, 42, .14);
}

body.spt-public #ast-desktop-header .main-header-menu > .menu-item-has-children > .sub-menu > .menu-item {
    margin: 0;
    padding: 0;
    border: 0;
}

body.spt-public #ast-desktop-header .main-header-menu > .menu-item-has-children > .sub-menu > .menu-item > .menu-link {
    padding: 10px 15px;
    border: 0;
    border-radius: 5px;
    color: #181818;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

body.spt-public #ast-desktop-header .main-header-menu > .menu-item-has-children > .sub-menu .menu-link:hover,
body.spt-public #ast-desktop-header .main-header-menu > .menu-item-has-children > .sub-menu .menu-link:focus-visible {
    background: #edf7f1;
}

/* Only listing and article pages receive the reference canvas and text palette. */
body.spt-public:is(.blog, .archive, .search, .single-post) {
    --spt-canvas: #f0f1f2;
    --spt-surface: #fff;
    --spt-text: #181818;
    --spt-accent: #1b9156;
    color: var(--spt-text);
    background-color: var(--spt-canvas);
    font-family: "Inter", sans-serif;
    font-weight: 500;
    line-height: 1.65;
}

body.spt-public:is(.blog, .archive, .search, .single-post) #content {
    background-color: var(--spt-canvas);
}

body.spt-public:is(.blog, .archive, .search) #primary {
    margin-top: 28px;
}

/* The destination's existing page title is the only hero copy. */
body.spt-public:is(.blog, .archive, .search) .blog-page-search > h1,
body.spt-public:is(.blog, .archive, .search) .spt-blog-heading {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 130px;
    margin: 0 0 24px;
    padding: 12px 24px;
    border-radius: 22px;
    color: #fff;
    background: #062e30;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(32px, 4.2vw, 54px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: .025em;
    text-align: center;
    text-transform: none;
    text-wrap: balance;
    overflow-wrap: break-word;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search {
    margin-bottom: 24px;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin: 0;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-form > label {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-field {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #d1d1d1;
    border-radius: 10px 0 0 10px;
    color: var(--spt-text);
    background: #fff;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-field::placeholder {
    color: #62696a;
    opacity: 1;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-submit {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 42px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid #d1d1d1;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    color: var(--spt-text);
    background-color: #f5f6f6;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
}

body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-field:focus-visible,
body.spt-public:is(.blog, .archive, .search) .blog-page-search .search-submit:focus-visible {
    position: relative;
    outline: 2px solid #159451;
    outline-offset: -2px;
}

/* Retain Astra's existing column counts, gutter calculation and post ordering. */
body.spt-public:is(.blog, .archive, .search) #main .ast-article-post {
    border-bottom: 0;
    background: transparent;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-article-inner {
    height: 100%;
    padding: 1.5em;
    border-radius: 14px;
    overflow: hidden;
    color: var(--spt-text);
    background: var(--spt-surface);
    box-shadow: 0 6px 15px -2px rgba(16, 24, 40, .05);
    transition: background-color .16s ease, box-shadow .16s ease;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title,
body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title a {
    color: var(--spt-text);
    font-family: "DM Sans", sans-serif;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.03em;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title {
    margin-bottom: 14px;
}

body.spt-public:is(.blog, .archive, .search) #main .entry-meta {
    color: var(--spt-text);
    font-size: 14px;
    line-height: 1.65;
}

body.spt-public:is(.blog, .archive, .search) #main .entry-meta .posted-on,
body.spt-public:is(.blog, .archive, .search) #main .entry-meta .posted-on a {
    color: var(--spt-accent);
}

body.spt-public:is(.blog, .archive, .search) #main .ast-excerpt-container,
body.spt-public:is(.blog, .archive, .search) #main .ast-excerpt-container p {
    color: var(--spt-text);
    line-height: 1.65;
}

/* Fit only featured-media frames. Inline emoji and avatar images are excluded. */
body.spt-public:is(.blog, .archive, .search) #main .ast-blog-featured-section .post-thumb-img-content > a {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-blog-featured-section .post-thumb-img-content > a > picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-blog-featured-section .post-thumb-img-content > a > img,
body.spt-public:is(.blog, .archive, .search) #main .ast-blog-featured-section .post-thumb-img-content > a > picture > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-read-more-container a {
    font-size: 15px;
}

body.spt-public:is(.blog, .archive, .search) #main .ast-article-inner:focus-within {
    background: #f7f9fa;
    box-shadow: 0 8px 20px -2px rgba(16, 24, 40, .09);
}

/* Main article: preserve the real headline, author, avatar, date and prose. */
body.spt-public.single-post.ast-separate-container #primary {
    margin-top: calc(4em / 1.5);
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) {
    padding: 25px 40px 30px;
    border-radius: 20px;
    color: var(--spt-text);
    background: var(--spt-surface);
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) > .ast-post-format- > .entry-header > .entry-title {
    margin-bottom: 8px;
    color: var(--spt-text);
    font-family: "DM Sans", sans-serif;
    font-size: 29px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.03em;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) > .ast-post-format- > .entry-header > .entry-meta {
    margin-top: 0;
    margin-bottom: 17px;
    color: var(--spt-text);
    line-height: 1.45;
}

body.spt-public.single-post #primary .entry-meta a[rel="author"] {
    color: var(--spt-accent);
    font-weight: 700;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) > .ast-post-format- > .entry-header > .post-thumb {
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 14px;
    overflow: hidden;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) > .ast-post-format- > .entry-header > .post-thumb > img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    object-fit: cover;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content {
    color: var(--spt-text);
    font-size: 17px;
    line-height: 1.45;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content :is(p, li, dd, dt, td, th, blockquote, figcaption) {
    color: var(--spt-text);
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content :is(p, li) {
    font-size: inherit;
    line-height: 1.45;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content :is(h1, h2, h3, h4, h5, h6) {
    color: var(--spt-text);
    font-family: "DM Sans", sans-serif;
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content > p:not(:last-child) {
    margin-bottom: calc(1.6em / 1.5);
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content > :is(ul, ol) {
    margin-top: calc(1em / 1.5);
    margin-bottom: calc(1em / 1.5);
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content > h3.wp-block-heading {
    margin-top: 1em;
    margin-bottom: calc(8px / 1.4);
}

body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content :is(em, i, cite, dfn, blockquote) {
    font-style: italic;
}

body.spt-public.single-post #primary .entry-content figure.wp-block-image img {
    border-radius: 14px;
}

body.spt-public.single-post #primary .entry-content img:is(.emoji, .sa-apple-emoji) {
    border-radius: 0;
    box-shadow: none;
}

/* Existing related posts only: no replacement query, markup or editorial copy. */
body.spt-public.single-post #primary .ast-single-related-posts-container {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--spt-canvas);
}

body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-posts-wrapper {
    gap: 32px;
    margin-top: 0;
    background: var(--spt-canvas);
}

body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-posts-inner-section {
    height: 100%;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 15px -2px rgba(16, 24, 40, .05);
    transition: background-color .16s ease, box-shadow .16s ease;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-content,
body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-featured-section,
body.spt-public.single-post #primary .ast-single-related-posts-container .post-thumb-img-content {
    min-width: 0;
    margin: 0;
    padding: 0;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .post-thumb-img-content > a {
    display: block;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .post-thumb-img-content img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    object-fit: cover;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .entry-header {
    margin: 0;
    padding: 24px 24px 0;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title,
body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title a {
    color: var(--spt-text);
    font-family: "DM Sans", sans-serif;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.03em;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title {
    margin: 0 0 14px;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .entry-meta {
    margin: 0;
    color: var(--spt-text);
    font-size: 14px;
    line-height: 1.65;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .entry-meta .posted-on {
    color: var(--spt-accent);
}

body.spt-public.single-post #primary .ast-single-related-posts-container .entry-content {
    margin: 0;
    padding: 0 24px 24px;
    color: var(--spt-text);
}

body.spt-public.single-post #primary .ast-single-related-posts-container .entry-content > :first-child {
    margin-top: 16px;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .entry-content > :last-child {
    margin-bottom: 0;
}

body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-posts-inner-section:focus-within {
    background: #f7f9fa;
    box-shadow: 0 8px 20px -2px rgba(16, 24, 40, .09);
}

@media (hover: hover) {
    body.spt-public:is(.blog, .archive, .search) #main .ast-article-inner:hover,
    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-posts-inner-section:hover {
        background: #f7f9fa;
        box-shadow: 0 8px 20px -2px rgba(16, 24, 40, .09);
    }
}

@media (max-width: 921px) {
    body.spt-public #ast-mobile-header .ast-primary-header-bar,
    body.spt-public #ast-mobile-header .site-primary-header-wrap {
        min-height: 64px;
    }

    body.spt-public #ast-mobile-header .ast-site-identity {
        padding-block: 8px;
    }

    body.spt-public #ast-mobile-header .main-header-menu-toggle {
        border-radius: 10px;
    }

    body.spt-public #ast-mobile-header .site-header-primary-section-right {
        gap: 8px;
    }

    body.spt-public #ast-mobile-header [data-section="section-header-mobile-trigger"] {
        padding: 0;
    }

    body.spt-public:is(.blog, .archive, .search) .blog-page-search > h1,
    body.spt-public:is(.blog, .archive, .search) .spt-blog-heading {
        min-height: 115px;
    }

    body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title,
    body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title a,
    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title,
    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title a {
        font-size: 22px;
    }

    body.spt-public:is(.blog, .archive, .search) #main .ast-read-more-container a {
        font-size: 13px;
    }

    body.spt-public.single-post.ast-separate-container #primary {
        margin-top: calc(40px / 1.5);
    }
}

@media (max-width: 767px) {
    body.spt-public:is(.blog, .archive, .search) #main .ast-article-inner {
        margin-top: 3px;
    }

    body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) {
        padding: 15px;
    }
}

@media (max-width: 544px) {
    body.spt-public #masthead .custom-logo {
        max-width: 200px;
        height: auto;
    }

    body.spt-public:is(.blog, .archive, .search) #primary {
        margin-top: 22px;
    }

    body.spt-public:is(.blog, .archive, .search) .blog-page-search > h1,
    body.spt-public:is(.blog, .archive, .search) .spt-blog-heading {
        min-height: 105px;
        margin-bottom: 20px;
        padding: 10px 16px;
        border-radius: 16px;
        font-size: clamp(24px, 7.5vw, 34px);
    }

    body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title,
    body.spt-public:is(.blog, .archive, .search) #main .ast-article-post .entry-title a,
    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title,
    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-post-title a {
        font-size: 19.8px;
    }

    body.spt-public:is(.blog, .archive, .search) #main .ast-excerpt-container,
    body.spt-public:is(.blog, .archive, .search) #main .ast-excerpt-container p {
        font-size: 15.4px;
    }

    body.spt-public:is(.blog, .archive, .search) #main .ast-read-more-container a {
        font-size: 15.8px;
    }

    body.spt-public.single-post.ast-separate-container #primary {
        margin-top: 20px;
    }

    body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) > .ast-post-format- > .entry-header > .entry-title {
        margin-bottom: 7px;
        font-size: 24px;
    }

    body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) > .ast-post-format- > .entry-header > .entry-meta {
        margin-bottom: 15px;
    }

    body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content h2 {
        font-size: 26px;
    }

    body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content h3 {
        font-size: 22px;
    }

    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-posts-wrapper {
        gap: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.spt-public:is(.blog, .archive, .search) #main .ast-article-inner,
    body.spt-public.single-post #primary .ast-single-related-posts-container .ast-related-posts-inner-section {
        transition: none;
    }
}

/* Existing Astra archive title: preserve its exact text, use the reference hero. */
body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner{display:block;height:auto;min-height:0;padding:28px 40px 0;background:transparent;border:0}
body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner > .ast-container{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:130px;height:auto;max-width:1200px;margin:0 auto 24px;padding:16px 24px;border:1px solid rgba(0,63,66,.08);border-radius:22px;overflow:hidden;background-color:#062e30;background-image:linear-gradient(90deg,rgba(0,25,27,.87),rgba(0,29,32,.62) 46%,rgba(0,24,26,.38)),url("blog-hero.webp");background-position:center,center 54%;background-size:cover;color:#fff;text-align:center}
body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner h1{max-width:1100px;margin:0;color:#fff;font-family:"DM Sans",sans-serif;font-size:clamp(32px,4.2vw,54px);font-weight:700;letter-spacing:.025em;line-height:1.12;text-transform:none;text-wrap:balance}
body.spt-public.blog #primary{margin-top:0}
@media(max-width:921px){body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner{padding:24px 20px 0}body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner > .ast-container{min-height:115px}}
@media(max-width:544px){body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner{padding:22px 8px 0}body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner > .ast-container{min-height:105px;margin-bottom:20px;padding:12px 16px;border-radius:16px}body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner h1{font-size:clamp(24px,7.5vw,34px)}}

body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner h1 :is(span,em,strong){color:inherit}
body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner > .ast-container > :not(h1){max-width:74ch;margin:8px 0 0;color:rgba(255,255,255,.92);font-size:16px;line-height:1.5}
body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner > .ast-container > :not(h1) :is(p,span,a){color:inherit}
/* Legal documents use the reference reading measure, only on managed policy pages. */
body.spt-public.spt-policy-page{background:#f0f1f2;color:#181818}
body.spt-public.spt-policy-page #content{background:#f0f1f2}
body.spt-public.spt-policy-page #primary{width:100%;max-width:960px;margin:32px auto}
body.spt-public.spt-policy-page #primary article.ast-article-single{padding:28px 32px;border-radius:16px;background:#fff}
body.spt-public.spt-policy-page .entry-title{font-family:"DM Sans",sans-serif;font-size:32px;font-weight:600;line-height:1.2;color:#181818}
body.spt-public.spt-policy-page .entry-content{font:500 16px/1.65 "Inter",sans-serif;color:#181818;overflow-wrap:anywhere}
body.spt-public.spt-policy-page .entry-content h2{margin:28px 0 12px;font-size:24px;line-height:1.3;color:#181818}
body.spt-public.spt-policy-page .entry-content h2:first-child{margin-top:0}
body.spt-public.spt-policy-page .entry-content p{margin:12px 0;color:#181818}
body.spt-public.spt-policy-page .entry-content a{color:#08723f;text-underline-offset:3px}
body.spt-public.spt-policy-page .entry-content a:focus-visible{outline:2px solid #159451;outline-offset:3px}
@media(max-width:544px){body.spt-public.spt-policy-page #primary{margin:20px auto}body.spt-public.spt-policy-page #primary article.ast-article-single{padding:22px 20px}body.spt-public.spt-policy-page .entry-title{font-size:26px}body.spt-public.spt-policy-page .entry-content h2{font-size:22px}}
@supports not (aspect-ratio:16/9){body.spt-public:is(.blog,.archive,.search) #main .ast-blog-featured-section .post-thumb-img-content > a{height:0;padding-top:56.25%}}

body.spt-public:is(.blog,.search,.archive) .ast-archive-entry-banner > .ast-container *{color:inherit}

/* The legacy theme moves every search form by -43px/23px with !important.
   Reset only this native listing search, after the new non-overlapping hero. */
body.spt-public:is(.blog,.archive,.search) .blog-page-search .search-form{margin-top:0 !important}
/* Keep existing editorial tables readable within the article on narrow screens. */
@media(max-width:921px){body.spt-public.single-post #primary article.ast-article-single:not(.ast-related-post) .entry-content table{display:block;box-sizing:border-box;width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}}
