/* Stories listing page (News Repository).
   All sizes come from the Figma frames 949:1789 (desktop, 1440px) and
   1921:11102 (mobile, 430px), measured from the SVG and PNG exports.
   Text offsets use: glyph top = (line-height - font-size) / 2 + 0.175em. */
.stories-page {
    --stories-bg: var(--ge-black-01, #542438);
    --stories-text: #fff;
    --stories-line: #fff;
    --stories-active: var(--ge-maroon-01, #ff664e);
    --stories-focus: var(--ge-orange-01, #fa981d);
    --stories-pad: 12px;
    --stories-gap: 12px;
    background: var(--stories-bg);
    color: var(--stories-text);
}
/* Site-wide rules set heading colours; on this page all text is white. */
.stories-page h1, .stories-page h2, .stories-page h3, .stories-page p { color: inherit; }
@media (min-width: 1024px) {
    .stories-page { --stories-pad: 25px; --stories-gap: 24px; }
}
.stories-page a { color: inherit; text-decoration: none; }
.stories-page a:focus-visible,
.stories-page button:focus-visible { outline: 2px solid var(--stories-focus); outline-offset: 2px; }
.stories-page .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Navigation: the design uses a maroon bar (64px mobile, 88px desktop) with a
   white logo, white links and a white line under it, on this page only.
   base.html sets a white background inline on every page except the home page,
   so !important is needed to override it here. */
.stories-index-page .stories-nav .main-nav__inner-1,
.stories-index-page .stories-nav #inner-nav-bar-01 { background-color: var(--ge-black-01, #542438) !important; }
.stories-index-page .stories-nav .main-nav__inner-1 { border-bottom: 1px solid #fff; }
.stories-index-page .stories-nav .nav-logo,
.stories-index-page .stories-nav .burger-icon { filter: brightness(0) invert(1); }
.stories-index-page .stories-nav .nav-menu-list__anchor { color: #fff; }
/* Mobile menu icon: Figma shows three lines 18px wide, 12px from the right edge. */
.stories-index-page .stories-nav .nav-menu-mobile-inner { padding-right: 0 !important; }
.stories-index-page .stories-nav .burger-icon { width: 18.75px !important; height: auto !important; position: relative; left: 6.5px; }
@media (min-width: 1024px) {
    .stories-index-page .stories-nav #nav-bar-01 { min-height: 88px; align-items: center; }
    /* Figma: 18px links, 47px between words, text level with the top of the logo. */
    .stories-index-page .stories-nav .nav-menu-list__anchor {
        font-size: 18px !important; padding-left: 2.5px !important; padding-right: 2.5px !important;
        position: relative; top: -11px;
    }
    .stories-index-page .stories-nav ul.nav-menu-list { justify-content: flex-end !important; column-gap: 38.5px; padding-right: 21.5px !important; }
}

/* Footer: orange with maroon text and logo on this page (Figma). The footer
   content comes from the shared CMS footer settings, so colours and spacing
   are overridden here for this page only. */
.stories-index-page #footer-element { background-color: var(--ge-orange-01, #fa981d) !important; }
.stories-index-page #footer-element,
.stories-index-page #footer-element * { color: var(--ge-black-01, #542438) !important; }
.stories-index-page #footer-element img { filter: url(#stories-maroon-fill); }
.stories-index-page #footer-element svg [fill]:not([fill='none']) { fill: var(--ge-black-01, #542438); }
.stories-index-page #footer-element svg [stroke]:not([stroke='none']) { stroke: var(--ge-black-01, #542438); }
.stories-index-page #footer-element .fs-desktop a,
.stories-index-page #footer-element .fs-desktop p { font-weight: 700 !important; }
/* Footer layout from Figma. Desktop: 25px sides, four columns on the card grid
   (24px gaps), links 20px Space Grotesk on 28px lines, the right-hand column
   20px ABC Favorit Bold on 24px lines, logo 418px below the top, 24px bottom.
   Mobile: 12px sides, 14px text on 16px lines, logo 207px below the top. */
.stories-index-page #footer-element { padding: 20px 25px 24px !important; }
.stories-index-page #footer-element .footer-spacing { display: none !important; }
.stories-index-page #footer-element .fs-desktop .grid { column-gap: 24px; }
.stories-index-page #footer-element .fs-desktop .site-map-item p { font-size: 20px !important; line-height: 28px !important; margin: 0 !important; }
.stories-index-page #footer-element .fs-desktop .rich-text p {
    font-family: 'favorit', sans-serif !important; font-size: 20px !important;
    line-height: 24px !important; margin: 0 !important;
}
.stories-index-page #footer-element .fs-desktop .content-block-spacing { padding-top: 24px !important; }
.stories-index-page #footer-element .fs-desktop img { margin-top: 106px !important; }
.stories-index-page #footer-element .fs-desktop .grid > :nth-child(4) { padding-top: 4px; }
@media (max-width: 767px) {
    .stories-index-page #footer-element { padding: 11px 12px 12px !important; }
    .stories-index-page #footer-element .fs-mobile p,
    .stories-index-page #footer-element .fs-mobile h4 { font-size: 14px !important; line-height: 16px !important; margin: 0 !important; font-weight: 500 !important; }
    /* One blank 16px line between the text and the links; logo 207px below the top. */
    .stories-index-page #footer-element .fs-mobile .grid > :nth-child(1) .content-block-spacing { padding-top: 16px !important; }
    .stories-index-page #footer-element .fs-mobile .grid > :nth-child(3) .content-block-spacing { padding-top: 84px !important; }
}
/* Wide footer arrow (stories.js swaps the CMS "→" character for this icon). */
.stories-footer-arrow { display: inline-block; width: 20px; height: 18px; margin-right: 14px; vertical-align: -3px; }

/* Title band */
.stories__title-band {
    padding: 22px var(--stories-pad) 23px;
    border-bottom: 1px solid var(--stories-line);
}
.stories__title { margin: 0; font-size: 28px; line-height: 32px; font-weight: 400; }
@media (min-width: 1024px) {
    .stories__title-band { padding: 47px var(--stories-pad) 45px; }
    .stories__title { font-size: 40px; line-height: 46px; letter-spacing: -0.02em; }
}

/* Shared text styles */
.stories__date {
    margin: 0; font-size: 14px; line-height: 18px; font-weight: 700;
    text-transform: uppercase;
}
.stories__read-more {
    display: inline-flex; gap: 0.4em; align-items: center;
    font-size: 16px; line-height: 20px; font-weight: 700; text-transform: uppercase;
}
.stories__read-more--large { font-size: 20px; line-height: 24px; }

/* Featured story */
.stories-featured {
    display: grid; row-gap: 23px;
    padding: 0 var(--stories-pad) 23px;
}
.stories-featured__image { display: block; overflow: hidden; aspect-ratio: 406 / 390; }
.stories-featured__image img,
.story-card__image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.stories-featured__text { display: flex; flex-direction: column; }
.stories-featured__title { margin: 11px 0 0; font-size: 28px; line-height: 30px; font-weight: 400; }
.stories-featured__text .stories__read-more { margin-top: 47px; }
@media (min-width: 1024px) {
    .stories-featured {
        grid-template-columns: minmax(0, 920fr) minmax(0, 448fr);
        column-gap: 22px; padding: 0 var(--stories-pad) 24px;
    }
    .stories-featured__image { aspect-ratio: 920 / 500; }
    .stories-featured__text { padding-top: 21px; }
    .stories-featured__text .stories__date { font-size: 20px; line-height: 26px; }
    .stories-featured__title { margin-top: 22px; }
    .stories-featured__text .stories__read-more { margin-top: auto; }
}

/* Theme filter: sticks under the navigation */
.stories-filter {
    position: sticky; top: var(--stories-nav-h, 65px); z-index: 20;
    background: var(--stories-bg);
    /* Mobile (Figma 1921:11102): label and pills start 24px from the left and the
       pills run off the right edge of the screen. */
    padding: 25px 0 24px 24px;
    border-bottom: 1px solid var(--stories-line);
}
.stories-filter__label {
    margin: 0 0 13px; font-size: 14px; line-height: 14px; font-weight: 700; text-transform: uppercase;
}
/* position: relative keeps the hidden "(remove filter)" text (.sr-only, which
   is absolutely positioned) inside the scroll box. Without it, a selected pill
   off the right edge (for example Tanzania) made the whole page scroll
   sideways on mobile. */
.stories-filter__scroll {
    position: relative;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stories-filter__scroll::-webkit-scrollbar { display: none; }
/* Mobile: the pills wrap inside a 900px-wide block, so they form two rows
   (All to "AI & ML", 795px, then "Research & Insights"), and the block
   scrolls sideways, as in the Figma frame. If editors add or rename themes,
   the pills still wrap at 900px, so the rows can change. */
.stories-filter__pills {
    display: flex; flex-wrap: wrap; gap: 12px; width: 900px;
    margin: 0; padding: 0; list-style: none;
}
.stories-filter__pills li { flex: 0 0 auto; }
@media (min-width: 1024px) {
    .stories-filter { padding: 25px var(--stories-pad) 24px; }
    .stories-filter__scroll { overflow: visible; }
    .stories-filter__pills { width: auto; }
}
.stories-pill {
    display: inline-flex; align-items: center; gap: 12px;
    box-sizing: border-box; height: 28px; padding: 0 11.25px;
    border: 1px solid var(--stories-text); border-radius: 14px;
    font-size: 14px; line-height: 1; white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
a.stories-pill:hover { background: var(--stories-text); color: var(--stories-bg); }
.stories-pill--active,
a.stories-pill--active:hover {
    background: var(--stories-active); border-color: var(--stories-active);
    color: var(--stories-text); padding: 0 12px 0 10px; gap: 11px;
}
/* The close icon is maroon in the design. */
.stories-pill__x { position: relative; width: 12px; height: 12px; color: var(--stories-bg); }
.stories-pill__x::before,
.stories-pill__x::after {
    content: ''; position: absolute; top: 50%; left: -1px; width: 14px; height: 1px;
    background: currentColor; transform: rotate(45deg);
}
.stories-pill__x::after { transform: rotate(-45deg); }

/* Card grid */
.stories-grid-section { overflow: hidden; }
.stories-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--stories-gap); row-gap: 0;
    margin: 0; padding: 0 var(--stories-pad); list-style: none;
}
@media (min-width: 768px) { .stories-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .stories-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Site CSS adds list bullets to li elements; the bullets showed as dots beside each photo. */
.story-card,
.stories-filter__pills li { list-style: none; }
.story-card::marker { content: none; }
.story-card { position: relative; padding: 1px 0 23px; }
/* Full-width white line above each row of cards. The first row has no line
   of its own: the filter band's bottom line sits above it. */
.story-card::before {
    content: ''; position: absolute; top: 0; height: 1px; background: var(--stories-line);
    left: calc(-1 * var(--stories-gap)); right: calc(-1 * var(--stories-gap));
}
.story-card:nth-child(-n+2) { padding-top: 0; }
.story-card:nth-child(-n+2)::before { display: none; }
@media (min-width: 768px) {
    .story-card:nth-child(3) { padding-top: 0; }
    .story-card:nth-child(3)::before { display: none; }
}
@media (min-width: 1024px) {
    .story-card:nth-child(4) { padding-top: 0; }
    .story-card:nth-child(4)::before { display: none; }
}
.story-card__link { display: flex; flex-direction: column; height: 100%; }
.story-card__image { overflow: hidden; aspect-ratio: 197 / 271; background: rgba(255, 255, 255, 0.08); }
.story-card .stories__date { margin-top: 11px; }
.story-card__title { margin: 11px 0 0; font-size: 20px; line-height: 22px; font-weight: 400; }
.story-card__read-more { margin-top: 23px; }
/* Card hover, from the Figma component "Stories Card 5" (Default and Hover
   variants, Phase 2 Components page): a 14 x 12 white arrow slides in from
   the left before the title, and the title moves right by the arrow plus a
   12px gap. The image does not change. Keyboard focus shows the same state.
   Touch screens have no hover, so they keep the default state. */
.story-card__title { position: relative; }
.story-card__title-text { display: block; transition: padding-left 0.3s ease-out; }
.story-card__arrow {
    position: absolute; left: 0; top: 5px; width: 14px; height: 12px;
    opacity: 0; transform: translateX(-12px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
@media (hover: hover) {
    .story-card__link:hover .story-card__title-text { padding-left: 26px; }
    .story-card__link:hover .story-card__arrow { opacity: 1; transform: none; }
}
.story-card__link:focus-visible .story-card__title-text { padding-left: 26px; }
.story-card__link:focus-visible .story-card__arrow { opacity: 1; transform: none; }
@media (min-width: 1024px) {
    .story-card { padding-bottom: 29px; }
    .story-card__image { aspect-ratio: 330 / 460; }
    .story-card .stories__date { margin-top: 11px; }
    .story-card__title { font-size: 18px; line-height: 20px; }
    .story-card__read-more { display: none; }
}

/* Load more: not in the Figma frames; Courtney asked for it on 6 Nov 2026.
   Styled like the outlined pills. The footer still follows directly when
   there is no button. */
.stories-load-more { display: flex; justify-content: center; padding: 16px var(--stories-pad) 40px; }
.stories-load-more__button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
    padding: 0 32px; border: 1px solid var(--stories-text); border-radius: 22px;
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.stories-load-more__button:hover { background: var(--stories-text); color: var(--stories-bg); }
.stories-load-more__button[aria-busy='true'] { opacity: 0.6; pointer-events: none; }
.stories-empty { padding: 40px var(--stories-pad); margin: 0; font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
    .stories-page * { transition: none !important; }
}

/* ===========================================================================
   Story page (Part 2). Sizes come from the Figma frames "Singular Story",
   short form and long form, at 1440px and 430px (exports in
   ~/Desktop/GE-Stories-Build/figma-export/part2/). Where the two forms
   differ, the short form (the frame with the designer's notes) is used.
   Desktop: 3 columns of 448px with 24px gaps and 24px sides. The hero image,
   body and similar cards use columns 2 and 3; the left column holds the
   date, title and theme pills, and the "Similar stories" heading.
   =========================================================================== */
.stories-story {
    --story-gap: 48px;       /* mobile: space around headings, lead, stats */
    --story-text-gap: 20px;  /* mobile: space between paragraphs and lists */
}
@media (min-width: 1024px) {
    .stories-story { --stories-pad: 24px; --story-gap: 24px; --story-text-gap: 24px; }
    /* Title band: 133px plus the line on the short form. */
    .stories-story .stories__title-band { padding: 42.5px var(--stories-pad) 44.5px; }
}

/* Hero: image, then date, title and theme pills (mobile); on desktop the
   text sits in the left column and the pills line up with the image bottom. */
.stories-story__hero { display: flex; flex-direction: column; padding: 0 var(--stories-pad); }
.stories-story__image { aspect-ratio: 406 / 390; overflow: hidden; }
.stories-story__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stories-story__intro { display: flex; flex-direction: column; }
.stories-story__date { margin-top: 23px; }
.stories-story__title { margin: 11px 0 0; font-size: 28px; line-height: 30px; font-weight: 400; }
.stories-story__themes {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin: 61px 0 0; padding: 0; list-style: none;
}
.stories-theme-tag {
    list-style: none;
    display: inline-flex; align-items: center; box-sizing: border-box;
    height: 28px; padding: 0 12px; border-radius: 14px;
    background: var(--stories-active); color: var(--stories-bg);
    font-size: 14px; line-height: 1; white-space: nowrap;
}
.stories-theme-tag::marker { content: none; }
@media (min-width: 1024px) {
    .stories-story__hero {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px;
    }
    .stories-story__image { grid-column: 2 / 4; grid-row: 1; aspect-ratio: 920 / 682; }
    .stories-story__intro { grid-column: 1; grid-row: 1; padding-top: 24px; }
    .stories-story__date { margin-top: 0; font-size: 20px; line-height: 20px; }
    .stories-story__title { margin-top: 24px; font-size: 40px; line-height: 38px; }
    .stories-story__themes { margin-top: auto; padding-top: 24px; }
}

/* Body: lead paragraph, story blocks and the Return button. */
.stories-story__body { padding: 47px var(--stories-pad) 23px; }
.stories-story__body > * { margin: 0; }
.stories-story__body > * + * { margin-top: var(--story-gap); }
.stories-story__body > .story-text + .story-text,
.stories-story__body > .story-text + .story-list,
.stories-story__body > .story-list + .story-text,
.stories-story__body > .story-list + .story-list { margin-top: var(--story-text-gap); }
@media (min-width: 1024px) {
    /* Text starts in column 2 (x = 496px) and ends 24px from the right. */
    .stories-story__body { padding: 71px var(--stories-pad) 23px calc(var(--stories-pad) + (100% - 2 * var(--stories-pad) - 48px) / 3 + 24px); }
}
.stories-story__lead,
.story-heading { font-size: 28px; line-height: 30px; font-weight: 400; }
.story-text,
.story-list { font-size: 18px; line-height: 20px; }
.story-text > * { margin: 0; }
.story-text > * + * { margin-top: var(--story-text-gap); }
.story-text a { text-decoration: underline; text-underline-offset: 3px; }
.story-text b, .story-text strong { font-weight: 700; }
/* Bullet lists in the design use an arrow and no indent. */
.story-list { padding: 0; list-style: none; }
.story-list li { list-style: none; }
.story-list li::marker { content: none; }
.story-list li::before { content: '\2192\00a0'; }
.story-image img { display: block; width: 100%; height: auto; }
.story-image figcaption { margin-top: 8px; font-size: 14px; line-height: 18px; }

/* Return to Stories and Updates: outlined coral pill, 341 x 46px. */
.stories-story__body > .stories-story__return { margin-top: 49px; }
.stories-story__return {
    display: inline-flex; align-items: center; box-sizing: border-box;
    height: 46px; padding: 0 24px; border: 1px solid var(--stories-active); border-radius: 23px;
    color: var(--stories-active) !important; font-size: 20px; line-height: 1; white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.stories-story__return:hover { background: var(--stories-active); color: var(--stories-bg) !important; }
@media (min-width: 1024px) {
    .stories-story__body > .stories-story__return { margin-top: 25px; }
}

/* Stat block: tiles in a row on desktop; 2 columns on mobile so the text
   stays readable (Figma shows one picture that shrinks; Courtney chose live
   tiles on 6 Nov 2026). */
.story-stat > .story-stat__heading { margin: 0 0 12px; }
.story-stat__tiles {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0; padding: 0; list-style: none;
}
.story-stat__tile {
    list-style: none; padding: 16px 12px 20px; color: #fff;
    font-family: 'favorit', sans-serif; font-weight: 700;
}
.story-stat__tile::marker { content: none; }
.story-stat__tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.story-stat__tile--green { background: #437f4e; }
.story-stat__tile--lilac { background: #a99ffd; }
.story-stat__tile--coral { background: #ff664e; }
.story-stat__tile--maroon { background: #5c3043; }
.story-stat__tile--olive { background: #827333; }
.story-stat__label { margin: 0; font-size: 16px; line-height: 20px; text-transform: uppercase; }
.story-stat__statement { margin-top: 16px; font-size: 16px; line-height: 19px; font-weight: 500; }
.story-stat__statement > * { margin: 0; }
.story-stat__statement b,
.story-stat__statement strong { color: #f7f051; font-weight: 700; }
@media (min-width: 1024px) {
    .story-stat > .story-stat__heading { margin-bottom: 24px; }
    .story-stat__tiles { display: flex; }
    .story-stat__tile { flex: 1 1 0; min-width: 0; min-height: 393px; padding: 33px 16px 24px; }
    .story-stat__tile:last-child:nth-child(odd) { grid-column: auto; }
    .story-stat__label { font-size: 24px; line-height: 28px; }
    .story-stat__statement { margin-top: 20px; font-size: 22px; line-height: 24.5px; }
    .story-stat__label + .story-stat__statement { margin-top: 26px; }
}

/* Similar stories and updates. Mobile: heading band with lines above and
   below, then the stories page cards. Desktop: heading in the left column,
   2 wide cards in columns 2 and 3, one line above. */
.stories-similar { border-top: 1px solid var(--stories-line); }
.stories-similar__title {
    margin: 0; padding: 23px var(--stories-pad) 25px;
    border-bottom: 1px solid var(--stories-line);
    font-size: 28px; line-height: 30px; font-weight: 400;
}
.stories-similar__cards {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--stories-gap);
    margin: 0; padding: 0 var(--stories-pad); list-style: none;
}
.story-card--similar::before { display: none; }
.story-card.story-card--similar { padding-top: 0; }
@media (min-width: 1024px) {
    .stories-similar {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px;
        padding: 0 var(--stories-pad) 48px;
    }
    .stories-similar__title { grid-column: 1; padding: 23px 0 0; border-bottom: 0; }
    .stories-similar__cards { grid-column: 2 / 4; column-gap: 24px; padding: 0; }
    .story-card.story-card--similar { padding-bottom: 0; }
    .story-card--similar .story-card__image { aspect-ratio: 448 / 330; }
    .story-card--similar .stories__date { margin-top: 12px; font-size: 20px; line-height: 20px; }
    .story-card--similar .story-card__title { margin-top: 13.5px; font-size: 20px; line-height: 22px; }
}
