/* ESPN mobile story page.
   Type scale, colors and spacing taken from ESPN's shell-mobile.css and story.css. */

:root {
    --espn-red: #d00;
    --espn-red-dark: #b40000;
    --ink: #1d1e1f;
    --muted: #6c6d6f;
    --rule: #cecfcf;
    --link: #06c;
    --placeholder: #e8e8e8;
    --sans: -apple-system, BlinkMacSystemFont, "Roboto", "Arial", "Helvetica Neue", "Helvetica", sans-serif;
    --serif: Georgia, "Times New Roman", Times, serif;
    --shell-width: 480px;
    --gutter: 16px;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #f1f2f3;
    font-family: var(--sans);
    color: var(--ink);
}

#global-viewport {
    max-width: var(--shell-width);
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

@media (min-width: 481px) {
    #global-viewport {
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
    }
}

img, svg { display: block; }

a { text-decoration: none; }


/* ---------- Scoreboard strip ---------- */

#global-scoreboard {
    background: var(--ink);
    color: #fff;
}

.scoreboard-content {
    display: flex;
    align-items: stretch;
    height: 54px;
}

.league-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 0 10px;
    border-right: 1px solid #3a3b3c;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.mobile-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #b0b1b2;
}

.scores-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scores-carousel::-webkit-scrollbar { display: none; }

#leagues {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

.score-chip {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 7px 12px;
    border-right: 1px solid #3a3b3c;
    font-size: 11px;
    line-height: 14px;
}

.score-chip-status {
    display: block;
    color: #9b9c9d;
    font-size: 10px;
    margin-bottom: 3px;
    white-space: nowrap;
}

.score-chip-status.is-live { color: #ff5a5a; }

.score-chip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.score-chip-team { font-weight: 600; }

.score-chip-score { color: #d9dadb; }


/* ---------- Red sticky header ---------- */

#global-header {
    position: sticky;
    top: 0;
    z-index: 1000045;
    background: var(--espn-red);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

#global-header .container {
    display: flex;
    align-items: center;
    height: 44px;
}

/* Hamburger: 54px tap target, three 20x3 white bars */
#global-nav-mobile-trigger {
    position: relative;
    flex: 0 0 54px;
    height: 44px;
    cursor: pointer;
}

#global-nav-mobile-trigger span {
    position: absolute;
    top: 21px;
    left: 17px;
    width: 20px;
    height: 3px;
    border-radius: 3px;
    background: #fff;
    color: transparent;
    font: 0/0 a;
}

#global-nav-mobile-trigger span::before,
#global-nav-mobile-trigger span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 3px;
    border-radius: 3px;
    background: #fff;
}

#global-nav-mobile-trigger span::before { margin-top: -7px; }
#global-nav-mobile-trigger span::after { margin-top: 7px; }

/* ESPN wordmark with the signature skewed block behind it */
.logo-header {
    position: relative;
    margin: 0 0 0 13px;
    font-size: inherit;
}

.logo-header::before {
    content: '';
    position: absolute;
    top: 0;
    height: 43px;
    left: -26px;
    right: -18px;
    background: var(--espn-red-dark);
    transform: skew(-25deg, 0);
    z-index: 0;
}

.logo-header a {
    position: relative;
    z-index: 1;
    display: block;
    height: 44px;
    line-height: 44px;
    padding-right: 2px;
    color: #fff;
    font-family: var(--sans);
    font-size: 21px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.6px;
}

.tools {
    display: flex;
    align-items: center;
    margin: 0 4px 0 auto;
    padding: 0;
    list-style: none;
}

.tools a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.tools svg {
    width: 21px;
    height: 21px;
    fill: #fff;
}

.tools svg.icon-stroke {
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
}


/* ---------- CSS-only nav drawer ---------- */

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.nav-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    z-index: 1000060;
    background: var(--ink);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
}

@media (min-width: 481px) {
    .nav-drawer { left: calc(50% - 240px); }
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000050;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

.nav-toggle:checked ~ .nav-drawer { transform: translateX(0); }

.nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

.nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 0 8px 0 16px;
    background: var(--espn-red);
}

.nav-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.nav-drawer-close svg {
    width: 19px;
    height: 19px;
    fill: #fff;
}

.nav-drawer-title {
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.5px;
}

.nav-drawer-list {
    margin: 0;
    padding: 8px 0;
    list-style: none;
    border-bottom: 1px solid #3a3b3c;
}

.nav-drawer-list a {
    display: block;
    padding: 11px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.nav-drawer-list .is-current a {
    box-shadow: inset 3px 0 0 var(--espn-red);
}

.nav-drawer-list--secondary {
    border-bottom: 0;
}

.nav-drawer-list--secondary a {
    color: #b0b1b2;
    font-size: 12px;
    font-weight: 400;
}


/* ---------- Placeholders ---------- */

.placeholder {
    position: relative;
    background: var(--placeholder);
    overflow: hidden;
}

.placeholder--16x9 {
    padding-bottom: 56.25%;
}

.placeholder-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9b9b9b;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.placeholder--thumb {
    flex: 0 0 96px;
    height: 54px;
    margin-left: 12px;
}


/* ---------- Article ---------- */

#article-feed .container {
    padding: 0 var(--gutter);
}

.article-figure {
    clear: both;
    margin: 0 calc(var(--gutter) * -1) 20px;
    overflow: hidden;
}

.article-figure .img-wrap {
    position: relative;
}

.article-figure .img-wrap img {
    width: 100%;
    height: auto;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.video-play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 52%;
    transform: translate(-50%, -50%);
    border-left: 14px solid var(--espn-red);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

figcaption {
    padding: 10px var(--gutter) 0;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
}

figcaption .headline {
    font-weight: 600;
    color: var(--ink);
}

figcaption .credit {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #9b9b9b;
}

.article-figure.inline-figure {
    margin-top: 4px;
}

.article-header .kicker {
    margin: 0 0 8px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--espn-red);
}

/* Headline: 24px / 1.2 / 700 */
.article-header h1 {
    clear: left;
    margin: 0 0 6px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.article-body {
    max-width: 640px;
    margin: 18px auto 0;
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink);
}

/* Byline row: 11px / 20px, rule underneath */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 11px;
    line-height: 20px;
    color: var(--muted);
}

.article-meta .author {
    color: var(--ink);
    font-weight: 600;
}

.article-meta-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.icon-button svg {
    width: 17px;
    height: 17px;
    fill: var(--muted);
}

.article-body p {
    margin: 0 0 20px;
}

.article-body a {
    color: var(--link);
}

.article-body h2 {
    margin: 0 0 20px;
    font-family: var(--sans);
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
}

/* Inline related-links module */
.inline-track {
    margin: 0 0 20px;
    padding: 14px 0;
    list-style: none;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    font-family: var(--sans);
}

.inline-track li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.inline-track li:last-child { margin-bottom: 0; }

.inline-track li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--muted);
}

.inline-track a { color: var(--link); }

.contributors {
    font-size: 15px;
    font-style: italic;
    color: var(--muted);
}


/* ---------- Related stories feed ---------- */

#news-feed {
    border-top: 8px solid #f1f2f3;
}

.topics-top {
    padding: 14px var(--gutter);
    font-family: "Popular", Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e3e4e5;
}

.news-feed-item {
    display: flex;
    align-items: flex-start;
    padding: 14px var(--gutter);
    border-bottom: 1px solid #e3e4e5;
}

.news-feed-item .text-container {
    flex: 1 1 auto;
    min-width: 0;
}

.news-feed-item-title a {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.news-feed_item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11px;
    line-height: 12px;
    color: var(--muted);
    text-transform: uppercase;
}

.news-feed_item-meta .timestamp::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-left: 6px;
    border-radius: 50%;
    background: #b0b1b2;
    vertical-align: middle;
}


/* ---------- Footer ---------- */

#global-footer {
    padding: 24px var(--gutter) 32px;
    background: var(--ink);
}

.footer-logo {
    margin-bottom: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.5px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.footer-links a {
    color: #b0b1b2;
    font-size: 11px;
}

.footer-copyright {
    margin: 0 0 12px;
    color: #6c6d6f;
    font-size: 10px;
    line-height: 1.5;
}
