@import url("tsp-code1-type-scale.css?v=approved-home");
@import url("tsp-code1-reader-typography.css?v=approved-home");
@import url("tsp-code1-header.css?v=approved-home");

@font-face {
    font-family: "TSP Preview Inter";
    src: url("preview-inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

/* Shared by Home, league pages, reading pages and interactive tools. */
:root {
    --tsp-preview-font: "TSP Preview Inter", Inter, Arial, sans-serif;
    --tsp-preview-type-caption: var(--tsp-code1-detail);
    --tsp-preview-type-label: var(--tsp-code1-control);
    --tsp-preview-type-body: var(--tsp-code1-team);
    --tsp-preview-type-subhead: var(--tsp-code1-headline);
    --tsp-preview-type-heading: var(--tsp-code1-section);
    --tsp-preview-type-lead: var(--tsp-code1-hero);
    --tsp-preview-type-page: var(--tsp-code1-hero);
    --tsp-preview-type-score: var(--tsp-code1-score);
    --tsp-preview-type-match-score: var(--tsp-code1-score);
}

/* The older captured components declare their own font shorthands. A shared
   layer takes precedence for type without resetting their colors or layout. */
@layer tsp-preview-typography {
    body, :where(h1, h2, h3, h4, h5, h6, p, li, a, button, input, select, textarea, label, summary, table, th, td, time, figcaption, legend, dt, dd, small) {
        font-family: var(--tsp-preview-font) !important;
    }

    body, :where(p, li, dt, dd, blockquote, .guide-teams, .nsc-team, .nsc-matchup-team strong, .team-name,
        .nhs-game-team, .nbs-game-team, .mbs-game-team, .sc-team, .tsp-home-scoreboard-team-name,
        .tsp-featured-game-team-name, .tsp-vp-card-name, .nsc-line-club-copy strong) {
        font-size: var(--tsp-preview-type-body) !important;
        line-height: 1.45 !important;
    }

    :where(h1) {
        font-size: var(--tsp-preview-type-page) !important;
        line-height: 1.12 !important;
    }

    :where(h2) {
        font-size: var(--tsp-preview-type-heading) !important;
        line-height: 1.2 !important;
    }

    :where(h3, h4, h5, h6) {
        font-size: var(--tsp-preview-type-subhead) !important;
        line-height: 1.4 !important;
    }

    :where(.v3-lead-copy :is(h1, h1 a, h2, h2 a), .tsp-featured-game-headline,
        .tsp-featured-game-headline a, .reading-article h1, .reading-story-header h1,
        .bos-lead h2, .bos-lead h2 a) {
        font-size: var(--tsp-preview-type-lead) !important;
        line-height: 1.12 !important;
        font-weight: 750;
    }

    :where(.v3-band-copy, .home-lead-list__lead, .nfl-collection-lead, .sf-featured-lead,
        .tsp-home-business-story--lead, .tsp-home-big3-lead, .tsp-home-mlb-lead,
        .season-spotlight-card) :where(h3, h3 a, .season-spotlight-title) {
        font-size: var(--tsp-code1-lead) !important;
        line-height: 1.25 !important;
        font-weight: 750;
    }

    :where(.v3-latest :is(li, li a), .v3-related :is(h3, h3 a), .v3-reading-list :is(h3, h3 a),
        .sf-list :is(li, li a), .nfl-collection-items :is(h3, h3 a), .reading-results h3,
        .tsp-home-business-support :is(h3, h3 a), .preview-fantasy-headline, .tsp-home-headlines a,
        .home-lead-list__headlines a, .nfl-fantasy-stories a, .v3-fantasy-story h3,
        .reading-results :is(h2, h2 a, h3 a), .bos-headlines :is(li, a),
        .bos-featured h3, .bos-featured h3 a, .bos-topic h3 a, .bos-league h3 a,
        .pair-headlines a, .nfl-collection-headlines a) {
        font-size: var(--tsp-code1-headline) !important;
        line-height: 1.4 !important;
        font-weight: 650;
    }

    :where(.v3-lead-copy p, .v3-story-copy p, .reading-deck, .bos-summary) {
        font-size: var(--tsp-code1-headline) !important;
        line-height: 1.45 !important;
    }

    :where(nav a, button, label, summary, legend, thead th, .quick-back-top,
        #tsp-desktop-toolbar :is(a, button), #tsp-mobile-masthead :is(a, button),
        #tsp-mobile-review-dialog :is(a, button), #tsp-mobile-league-shortcuts :is(a, button),
        .tsp-compact-ratings-head > a, .nfl-collection-head > a, .v3-latest footer a,
        .nfl-quick li a, .nfl-fantasy-links a, .preview-guide-all, .guide-game-links a,
        .guide-market label span, .guide-filters label > span, .guide-library-filter > span,
        .tsp-home-quick-links .quick-group a, #home-quick-links > summary, .tsp-game-strip-action,
        .tsp-mobile-shortcut-label, .tsp-mobile-scores, .tsp-mobile-context a,
        .tsp-toolbar-context a, .preview-espn-fantasy ul a, .preview-goalie-link, .preview-goalie-status,
        .nsc-game-status :is(time, strong), .nsc-game-status, .tsp-featured-game-status,
        .tsp-featured-game-clock, .nhs-game-status, .nbs-game-status, .mbs-game-status,
        .tsp-home-scoreboard-clock, .tsp-home-scoreboard-status, .nhs-game-info, .nbs-game-info,
        .mbs-game-info, .preview-score-status, .reading-controls a, .nsc-actions a, .nsc-return) {
        font-size: var(--tsp-preview-type-label) !important;
        line-height: 1.35 !important;
    }

    :where(time, figcaption, small, .caption, .eyebrow, .kicker, .snapshot, .source,
        .quick-group > h3, .nfl-story-date, .tsp-home-quick-links__eyebrow, .guide-date,
        .reading-byline, .team-record, .v11-source, .v11-period, .v9-db-kind,
        .rating-date, .rating-network-more, .rating-mark-label, .preview-guide-time,
        .preview-guide-outlets dt, .preview-goalie-start-time, .tsp-game-strip-record,
        .guide-game-note, .guide-game-league, .archive-meta, .nsc-date, .nsc-line-record,
        .nsc-context, .nsc-leader-team,
        .preview-schedule-status, .home-fantasy-stat-context, .home-fantasy-data-context) {
        font-size: var(--tsp-preview-type-caption) !important;
        line-height: 1.35 !important;
    }

    :where(table, tbody :is(th, td), .rating-title, .preview-guide-matchup, .preview-guide-outlets dd,
        .preview-goalie-name, .home-fantasy-row :is(dt, dd), .guide-game-title h4, .guide-game-feeds li) {
        font-size: var(--tsp-code1-data) !important;
        line-height: 1.35 !important;
    }

    :where(input, select, textarea) {
        font-size: var(--tsp-preview-type-label) !important;
        line-height: 1.35 !important;
        min-inline-size: 0;
        max-inline-size: 100%;
    }

    :where(.nsc-team-score, .tsp-featured-game-score, .tsp-featured-game-total,
        .tsp-home-scoreboard-team-score, .tsp-home-scoreboard-strip-score,
        .nhs-game-score, .nhs-team-score, .nbs-game-score, .mbs-game-score, .score-strip-score,
        .archive-final-score, td.nsc-line-total) {
        font-size: var(--tsp-preview-type-score) !important;
        line-height: 1.1 !important;
        font-variant-numeric: tabular-nums;
    }

    :where(.nsc-matchup-score, .score-head .score, .scoreboard .score, .gamecast-score, .kickoff > strong) {
        font-size: var(--tsp-preview-type-match-score) !important;
        line-height: 1.1 !important;
        font-variant-numeric: tabular-nums;
    }

    :where(.tsp-race-details dt, .tsp-race-details dd) {
        font-size: var(--tsp-preview-type-caption) !important;
        line-height: 1.2 !important;
    }

    :where(.reading-article .reading-body, .reading-article .reading-body p,
        .reading-story-body, .reading-story-body p, .story-body, .story-body p) {
        font-size: var(--tsp-preview-type-subhead) !important;
        line-height: 1.65 !important;
    }

    :where(.tsp-home-quick-links a, .quick-links-mark, .tsp-home-scoreboard-team-name, .tsp-race-details) {
        min-width: 0;
    }

    :where(.quick-links-mark, .tsp-section-mark, [class*="sport-glyph"]) {
        font-family: system-ui, sans-serif !important;
    }

    @media (max-width: 460px) {
        :where(.tsp-race-details dt, .tsp-race-details dd) {
            font-size: .625rem !important;
        }
    }
}

@layer tsp-preview-typography {
    :where(.tsp-game-strip-team [data-strip-score], .tsp-featured-game-score strong,
        .tsp-featured-game-score-value, .tsp-game-strip-score, .nsc-team-score, .tls-score) {
        font-size: var(--tsp-preview-type-score) !important;
        line-height: 1.1 !important;
    }

    :where(.pair-heading, .pair-heading :is(h2, a)) {
        font-size: var(--tsp-code1-pair-heading) !important;
        line-height: 1.2 !important;
    }
    :where(.pair-copy :is(h3, h4, h3 a, h4 a)) {
        font-size: var(--tsp-code1-pair-headline) !important;
        line-height: 1.4 !important;
        font-weight: 700;
    }
    :where(.pair-byline, .pair-byline time) {
        font-size: var(--tsp-code1-detail) !important;
        line-height: 1.35 !important;
    }

    :where(.toolbar > div > h1) {
        font-size: var(--tsp-preview-type-heading) !important;
        line-height: 1.2 !important;
    }
}

/* The Business desk keeps its newspaper face at the shared role sizes. */
@font-face {
    font-family: "STIX Two Text";
    src: url("home/business-assets/stix-two-text-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:is(.bos-paper, #sport-business, #nfl-business, #sports-business, #nba-more-business,
    #soccer-business, #soccer-league-business) {
    --tsp-preview-font: "STIX Two Text", "Times New Roman", serif;
}

@layer tsp-preview-typography {
    :where(.bos-paper) :where(nav, button, select, .tsp-home-business-ratings) {
        --tsp-preview-font: "TSP Preview Inter", Inter, Arial, sans-serif;
    }
}

.preview-published-stories {
    margin-block: 1rem;
    padding: 12px;
    border-block: 1px solid #dce1e5;
    background: #fff;
}
.preview-espn-grid > .preview-published-stories,
.v3-page > .preview-published-stories {
    grid-column: 1 / -1;
    order: 30;
}
.preview-current-fantasy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 10px;
    padding: 10px;
}
.preview-current-fantasy article { min-width: 0; }
.preview-current-fantasy .v3-story-cover img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.preview-published-stories summary { cursor: pointer; font-weight: 750; }
.preview-published-stories ul { padding-inline-start: 1.25rem; }
.preview-published-stories li + li { margin-block-start: .35rem; }

body.tsp-home-v3 #tsp-stories .preview-espn-fantasy,
body.tsp-home-v3 #tsp-stories .nfl-fantasy-bottom {
    --nfl-fantasy-surface: #fff;
    --nfl-fantasy-header: transparent;
    --nfl-fantasy-text: #20252d;
    --nfl-fantasy-accent: #183c58;
    --nfl-fantasy-line: #d8dde3;
    --nfl-fantasy-muted: #555e69;
    background-color: #fff;
}
