:root {
    --hfc-blue: #00005a;
    --hfc-blue-soft: #15156f;
    --hfc-yellow: #ffd359;
    --hfc-aqua: #0ec3a8;
    --hfc-lilac: #914eff;
    --hfc-red: #ff5959;
    --hfc-grey: #f6f7fb;
    --hfc-warm-grey: #c6c6c5;
    --hfc-text: #111329;
    --hfc-muted: #5f6678;
    --hfc-border: rgba(0, 0, 90, 0.14);
    --hfc-radius-xl: 28px;
    --hfc-radius-lg: 20px;
    --hfc-radius-md: 16px;
    --hfc-shadow: 0 16px 34px rgba(0, 0, 90, 0.09);
}

.hfc-story-component,
.hfc-story-component * {
    box-sizing: border-box;
}

.hfc-story-component {
    width: min(100%, 1180px) !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    color: var(--hfc-text);
    font-family: inherit;
}

.hfc-story-header {
    display: grid;
    gap: 18px;
    margin: 0 0 22px !important;
}

.hfc-story-header h2 {
    margin: 0 !important;
    color: var(--hfc-blue) !important;
    font-size: clamp(1.8rem, 3vw, 2.9rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.045em !important;
    max-width: 720px;
}

.hfc-story-header p {
    margin: 10px 0 0 !important;
    max-width: 760px;
    color: var(--hfc-muted) !important;
    font-size: clamp(0.98rem, 1.1vw, 1.12rem) !important;
    line-height: 1.58 !important;
}

.hfc-story-kicker {
    margin: 0 0 8px !important;
    color: var(--hfc-red) !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
}

.hfc-story-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 !important;
}

.hfc-story-filter-btn,
.hfc-story-load-more {
    appearance: none;
    border: 1px solid var(--hfc-border) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--hfc-blue) !important;
    border-radius: 999px !important;
    cursor: pointer;
    font: inherit;
    font-weight: 850 !important;
    line-height: 1 !important;
    white-space: nowrap;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hfc-story-filter-btn {
    padding: 10px 14px !important;
    font-size: 0.84rem !important;
}

.hfc-story-filter-btn:hover,
.hfc-story-load-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 90, 0.12);
}

.hfc-story-filter-btn.is-active {
    background: var(--hfc-blue) !important;
    color: #fff !important;
    border-color: var(--hfc-blue) !important;
}

.hfc-story-results.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.hfc-story-layout {
    display: grid;
    gap: 16px;
}

.hfc-story-layout-feature,
.hfc-story-layout-three {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    align-items: stretch;
}

.hfc-story-layout-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hfc-story-layout-single {
    grid-template-columns: minmax(0, 1fr);
}

.hfc-story-side-stack {
    display: grid;
    gap: 16px;
    align-content: stretch;
}

.hfc-story-card {
    min-width: 0;
}

.hfc-story-card-link {
    display: grid !important;
    height: 100% !important;
    color: inherit !important;
    text-decoration: none !important;
    background: #fff !important;
    border: 1px solid var(--hfc-border) !important;
    border-radius: var(--hfc-radius-lg) !important;
    overflow: hidden !important;
    box-shadow: var(--hfc-shadow) !important;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hfc-story-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(0, 0, 90, 0.13) !important;
    border-color: rgba(0, 0, 90, 0.24) !important;
}

.hfc-story-image {
    position: relative;
    height: 210px;
    min-height: 210px;
    background: linear-gradient(135deg, var(--hfc-blue), var(--hfc-blue-soft));
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.hfc-story-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,90,0.02), rgba(0,0,90,0.38));
    z-index: -1;
}

.hfc-story-card-hero .hfc-story-image {
    height: clamp(260px, 28vw, 355px) !important;
    min-height: 260px !important;
}

.hfc-story-layout-two .hfc-story-card-hero .hfc-story-image {
    height: 250px !important;
    min-height: 250px !important;
}

.hfc-story-card-small .hfc-story-card-link {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    min-height: 150px;
}

.hfc-story-card-small .hfc-story-image {
    height: 100% !important;
    min-height: 150px !important;
}

.hfc-story-card-small .hfc-story-content {
    padding: 18px 18px 16px !important;
}

.hfc-story-card-small h3 {
    font-size: clamp(1rem, 1.25vw, 1.22rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.025em !important;
}

.hfc-story-card-small .hfc-story-category {
    display: none !important;
}

.hfc-story-card-small .hfc-story-meta {
    margin-bottom: 8px !important;
    font-size: 0.76rem !important;
}

.hfc-story-card-small .hfc-story-read {
    margin-top: 12px !important;
    font-size: 0.78rem !important;
}

.hfc-story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.hfc-story-grid .hfc-story-image {
    height: 205px !important;
    min-height: 205px !important;
}

.hfc-story-content {
    padding: 22px !important;
    background: #fff !important;
}

.hfc-story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px !important;
    color: var(--hfc-muted) !important;
    font-size: 0.8rem !important;
    font-weight: 750 !important;
}

.hfc-story-category {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    max-width: calc(100% - 28px);
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--hfc-blue);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(0,0,90,0.16);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hfc-story-card h3 {
    margin: 0 !important;
    color: var(--hfc-blue) !important;
    font-size: clamp(1.28rem, 2vw, 2rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.04em !important;
}

.hfc-story-card p {
    margin: 12px 0 0 !important;
    color: var(--hfc-muted) !important;
    font-size: 0.96rem !important;
    line-height: 1.55 !important;
}

.hfc-story-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px !important;
    color: var(--hfc-blue) !important;
    font-size: 0.86rem !important;
    font-weight: 900 !important;
}

.hfc-story-read::after {
    content: "→";
    transition: transform 180ms ease;
}

.hfc-story-card-link:hover .hfc-story-read::after {
    transform: translateX(4px);
}

.hfc-story-image-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,0.18);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 950;
    letter-spacing: -0.08em;
}

.hfc-story-empty {
    padding: 28px;
    border: 1px solid var(--hfc-border);
    border-radius: var(--hfc-radius-lg);
    background: #fff;
    color: var(--hfc-muted);
}

.hfc-story-empty h3 {
    margin: 0 0 8px;
    color: var(--hfc-blue);
    font-size: 1.25rem;
}

.hfc-story-load-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.hfc-story-load-more {
    padding: 13px 20px !important;
    background: var(--hfc-blue) !important;
    color: #fff !important;
    border-color: var(--hfc-blue) !important;
    font-size: 0.92rem !important;
}

@media (max-width: 1080px) {
    .hfc-story-layout-feature,
    .hfc-story-layout-three {
        grid-template-columns: 1fr;
    }

    .hfc-story-side-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hfc-story-card-small .hfc-story-card-link {
        grid-template-columns: 1fr !important;
    }

    .hfc-story-card-small .hfc-story-image {
        height: 170px !important;
        min-height: 170px !important;
    }
}

@media (max-width: 860px) {
    .hfc-story-layout-two,
    .hfc-story-grid,
    .hfc-story-side-stack {
        grid-template-columns: 1fr;
    }

    .hfc-story-card-small .hfc-story-card-link {
        grid-template-columns: 150px minmax(0, 1fr) !important;
    }

    .hfc-story-card-small .hfc-story-image {
        height: 100% !important;
        min-height: 145px !important;
    }
}

@media (max-width: 640px) {
    .hfc-story-component {
        width: 100% !important;
        padding: 0 12px !important;
    }

    .hfc-story-header h2 {
        font-size: clamp(1.7rem, 9vw, 2.4rem) !important;
    }

    .hfc-story-header p {
        font-size: 0.98rem !important;
    }

    .hfc-story-card-small .hfc-story-card-link {
        grid-template-columns: 1fr !important;
    }

    .hfc-story-card-small .hfc-story-image {
        height: 190px !important;
        min-height: 190px !important;
    }

    .hfc-story-content {
        padding: 18px !important;
    }

    .hfc-story-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        padding-bottom: 6px !important;
        -webkit-overflow-scrolling: touch;
    }

    .hfc-story-filter-btn {
        padding: 10px 13px !important;
        font-size: 0.8rem !important;
    }
}

/* HFC Story Portal 1.1.2 refinements */
.hfc-story-component {
    width: min(100%, 1120px) !important;
}

.hfc-story-theme-dark .hfc-story-kicker,
.hfc-story-theme-dark .hfc-story-header h2,
.hfc-story-theme-dark .hfc-story-header p,
.hfc-story-theme-dark .hfc-story-filter-label {
    color: #fff !important;
}

.hfc-story-theme-dark .hfc-story-header p {
    opacity: 0.86;
}

.hfc-story-theme-light .hfc-story-filter-label {
    color: var(--hfc-blue) !important;
}

.hfc-story-header {
    gap: 14px !important;
    margin-bottom: 20px !important;
}

.hfc-story-header h2 {
    font-size: clamp(1.65rem, 2.2vw, 2.35rem) !important;
    line-height: 1.05 !important;
}

.hfc-story-header p {
    font-size: clamp(0.94rem, 1vw, 1.05rem) !important;
    max-width: 720px !important;
}

.hfc-story-kicker {
    font-size: 0.72rem !important;
    letter-spacing: 0.18em !important;
    opacity: 0.88;
}

.hfc-story-filter {
    display: inline-flex !important;
    width: max-content !important;
    max-width: 100% !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.10) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
}

.hfc-story-theme-light .hfc-story-filter {
    background: rgba(0,0,90,0.04) !important;
    border-color: rgba(0,0,90,0.12) !important;
}

.hfc-story-filter-label {
    padding: 0 6px 0 10px !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.hfc-story-filter-btn {
    padding: 10px 14px !important;
    font-size: 0.78rem !important;
    min-height: 38px !important;
    box-shadow: none !important;
}

.hfc-story-filter-select-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

.hfc-story-filter-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    min-width: 220px !important;
    max-width: min(52vw, 320px) !important;
    min-height: 38px !important;
    border: 1px solid var(--hfc-border) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--hfc-blue) !important;
    font: inherit !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    padding: 0 40px 0 16px !important;
    cursor: pointer !important;
    box-shadow: 0 8px 18px rgba(0,0,90,0.08) !important;
}

.hfc-story-filter-select-wrap::after {
    content: "⌄";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-54%);
    color: var(--hfc-blue);
    font-size: 1rem;
    font-weight: 900;
    pointer-events: none;
}

.hfc-story-layout-feature,
.hfc-story-layout-three {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr) !important;
    gap: 14px !important;
}

.hfc-story-side-stack {
    gap: 12px !important;
}

.hfc-story-layout-feature .hfc-story-side-stack {
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
}

.hfc-story-layout-three .hfc-story-side-stack {
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
}

.hfc-story-image {
    background-position: center center !important;
    background-size: cover !important;
}

.hfc-story-card-hero .hfc-story-image {
    height: clamp(245px, 24vw, 310px) !important;
    min-height: 245px !important;
}

.hfc-story-card h3 {
    font-size: clamp(1.2rem, 1.55vw, 1.65rem) !important;
    line-height: 1.08 !important;
}

.hfc-story-card p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.hfc-story-content {
    padding: 20px !important;
}

.hfc-story-card-small .hfc-story-card-link {
    grid-template-columns: 124px minmax(0, 1fr) !important;
    min-height: 0 !important;
    height: 100% !important;
}

.hfc-story-card-small .hfc-story-image {
    min-height: 132px !important;
    height: 100% !important;
}

.hfc-story-card-small .hfc-story-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 132px !important;
    padding: 13px 14px !important;
}

.hfc-story-card-small h3 {
    font-size: clamp(0.94rem, 1vw, 1.08rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.hfc-story-card-small .hfc-story-meta {
    font-size: 0.7rem !important;
    margin-bottom: 6px !important;
}

.hfc-story-card-small .hfc-story-read {
    margin-top: 8px !important;
    font-size: 0.72rem !important;
}

.hfc-story-card-small .hfc-story-category {
    display: none !important;
}

.hfc-story-category {
    font-size: 0.62rem !important;
    min-height: 28px !important;
    padding: 7px 11px !important;
}

@media (max-width: 1080px) {
    .hfc-story-layout-feature,
    .hfc-story-layout-three {
        grid-template-columns: 1fr !important;
    }

    .hfc-story-layout-feature .hfc-story-side-stack,
    .hfc-story-layout-three .hfc-story-side-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: none !important;
    }

    .hfc-story-card-small .hfc-story-card-link {
        grid-template-columns: 1fr !important;
    }

    .hfc-story-card-small .hfc-story-image {
        height: 155px !important;
        min-height: 155px !important;
    }
}

@media (max-width: 760px) {
    .hfc-story-filter {
        width: 100% !important;
        border-radius: 24px !important;
        justify-content: stretch !important;
    }

    .hfc-story-filter-label,
    .hfc-story-filter-btn,
    .hfc-story-filter-select-wrap,
    .hfc-story-filter-select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hfc-story-layout-feature .hfc-story-side-stack,
    .hfc-story-layout-three .hfc-story-side-stack,
    .hfc-story-side-stack {
        grid-template-columns: 1fr !important;
    }

    .hfc-story-card-small .hfc-story-card-link {
        grid-template-columns: 120px minmax(0, 1fr) !important;
    }
}

@media (max-width: 520px) {
    .hfc-story-card-small .hfc-story-card-link {
        grid-template-columns: 1fr !important;
    }

    .hfc-story-card-small .hfc-story-image {
        height: 180px !important;
        min-height: 180px !important;
    }
}

.hfc-story-theme-dark .hfc-story-filter-btn.is-active {
    background: var(--hfc-yellow) !important;
    border-color: var(--hfc-yellow) !important;
    color: var(--hfc-blue) !important;
}

.hfc-story-theme-dark .hfc-story-filter-btn:not(.is-active) {
    background: #fff !important;
    color: var(--hfc-blue) !important;
}
