.fh-sfl-history {
    --sfl-ink: #11100d;
    --sfl-ink-soft: #252118;
    --sfl-gold: #d9a91c;
    --sfl-gold-bright: #ffd75a;
    --sfl-silver: #d9dde1;
    --sfl-paper: #f4f0e5;
    position: relative;
    display: grid;
    gap: 24px;
    width: min(100%, 1440px);
    margin: 0 auto;
    color: var(--sfl-ink);
}

.fh-sfl-history *,
.fh-sfl-history *::before,
.fh-sfl-history *::after {
    box-sizing: border-box;
}

.fh-sfl-history__hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 260px;
    padding: 36px 40px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 90, .5);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 25%, rgba(255, 212, 74, .28), transparent 28%),
        radial-gradient(circle at 92% 100%, rgba(255, 255, 255, .13), transparent 30%),
        linear-gradient(125deg, #080807 0%, #17130a 52%, #292211 100%);
    box-shadow: 0 22px 60px rgba(17, 12, 2, .28), inset 0 1px rgba(255, 255, 255, .12);
}

.fh-sfl-history__hero::before,
.fh-sfl-history__hero::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.fh-sfl-history__hero::before {
    inset: 0;
    opacity: .34;
    background:
        repeating-linear-gradient(112deg, transparent 0 26px, rgba(255,255,255,.04) 27px, transparent 29px),
        linear-gradient(90deg, transparent, rgba(255, 202, 36, .12), transparent);
}

.fh-sfl-history__hero::after {
    width: 420px;
    height: 420px;
    right: -190px;
    top: -210px;
    border: 60px solid rgba(255, 211, 70, .11);
    border-radius: 50%;
}

.fh-sfl-history__hero-shine {
    position: absolute;
    z-index: -1;
    top: -40%;
    left: -15%;
    width: 25%;
    height: 180%;
    opacity: .32;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, #fff3b7, transparent);
    animation: fh-sfl-shine 8s ease-in-out infinite;
}

@keyframes fh-sfl-shine {
    0%, 35% { transform: translateX(-40%) rotate(18deg); opacity: 0; }
    48% { opacity: .32; }
    65%, 100% { transform: translateX(520%) rotate(18deg); opacity: 0; }
}

.fh-sfl-history__crest {
    display: block;
    width: 168px;
    max-height: 184px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5));
}

.fh-sfl-history__hero-copy {
    min-width: 0;
}

.fh-sfl-history__kicker,
.fh-sfl-history__toolbar-label {
    display: block;
    margin-bottom: 7px;
    color: var(--sfl-gold-bright);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.fh-sfl-history__hero h1 {
    max-width: 780px;
    margin: 0;
    color: #fff;
    font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
    font-size: clamp(42px, 5vw, 76px);
    font-weight: 1000;
    letter-spacing: -.045em;
    line-height: .92;
    text-transform: uppercase;
}

.fh-sfl-history__hero p {
    max-width: 680px;
    margin: 16px 0 0;
    color: rgba(255,255,255,.75);
    font-size: 16px;
    line-height: 1.55;
}

.fh-sfl-history__hero-stats {
    display: grid;
    gap: 10px;
    min-width: 128px;
}

.fh-sfl-history__hero-stats > div {
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(8px);
}

.fh-sfl-history__hero-stats span {
    display: block;
    color: rgba(255,255,255,.55);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.fh-sfl-history__hero-stats strong {
    color: #fff;
    font-size: 22px;
}

.fh-sfl-history__podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.fh-sfl-history__podium-card {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 106px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #ded7c4;
    border-radius: 19px;
    background: linear-gradient(145deg, #fff, #eee8da);
    box-shadow: 0 12px 30px rgba(40, 30, 5, .09);
}

.fh-sfl-history__podium-card::after {
    position: absolute;
    inset: auto -26px -44px auto;
    width: 120px;
    height: 120px;
    border: 22px solid rgba(216, 170, 29, .1);
    border-radius: 50%;
    content: "";
}

.fh-sfl-history__podium-card--1 {
    border-color: rgba(207, 153, 0, .7);
    background: linear-gradient(145deg, #fff7d9, #e8c964);
}

.fh-sfl-history__podium-card--2 {
    background: linear-gradient(145deg, #fff, #d8dde2);
}

.fh-sfl-history__podium-card--3 {
    background: linear-gradient(145deg, #fff5e8, #d5a77b);
}

.fh-sfl-history__podium-rank,
.fh-sfl-history__rank span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: var(--sfl-ink);
    font-weight: 950;
}

.fh-sfl-history__podium-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.fh-sfl-history__podium-card > div {
    display: grid;
    min-width: 0;
}

.fh-sfl-history__podium-card > div > span {
    color: #766222;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.fh-sfl-history__podium-card > div > strong {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-sfl-history__podium-card small {
    color: #645e50;
    font-weight: 700;
}

.fh-sfl-history__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 19px 22px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(110deg, #11100d, #2b2515);
    box-shadow: 0 9px 24px rgba(17,16,13,.16);
}

.fh-sfl-history__toolbar-label {
    margin: 0;
    font-size: 10px;
}

.fh-sfl-history__toolbar strong {
    display: block;
    margin-top: 2px;
}

.fh-sfl-history__search {
    width: min(100%, 340px);
}

.fh-sfl-history__search input {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.1);
    font-size: 16px;
    outline: none;
}

.fh-sfl-history__search input::placeholder {
    color: rgba(255,255,255,.6);
}

.fh-sfl-history__search input:focus {
    border-color: var(--sfl-gold-bright);
    box-shadow: 0 0 0 3px rgba(255,215,90,.18);
}

.fh-sfl-history__table-wrap {
    overflow: hidden;
    border: 1px solid #ddd5c2;
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(30, 23, 6, .1);
}

.fh-sfl-history__table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.fh-sfl-history__table th,
.fh-sfl-history__table td {
    padding: 13px 12px;
    border: 0;
    border-bottom: 1px solid #ebe6da;
    text-align: center;
    vertical-align: middle;
}

.fh-sfl-history__table th {
    height: 48px;
    padding: 0;
    color: #f9df80;
    background: #16140f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fh-sfl-history__sort-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

.fh-sfl-history__sort-button:hover,
.fh-sfl-history__sort-button:focus-visible {
    color: #fff5c8;
    background: rgba(225, 179, 47, .14);
    outline: none;
}

.fh-sfl-history__sort-button i {
    position: relative;
    width: 8px;
    height: 14px;
    opacity: .42;
}

.fh-sfl-history__sort-button i::before,
.fh-sfl-history__sort-button i::after {
    position: absolute;
    left: 1px;
    width: 0;
    height: 0;
    border-right: 3px solid transparent;
    border-left: 3px solid transparent;
    content: "";
}

.fh-sfl-history__sort-button i::before {
    top: 1px;
    border-bottom: 4px solid currentColor;
}

.fh-sfl-history__sort-button i::after {
    bottom: 1px;
    border-top: 4px solid currentColor;
}

.fh-sfl-history__table th[aria-sort="ascending"],
.fh-sfl-history__table th[aria-sort="descending"] {
    color: #fff2b3;
    background: linear-gradient(180deg, #282216, #17140e);
    box-shadow: inset 0 -3px 0 #d6a82c;
}

.fh-sfl-history__table th[aria-sort="ascending"] .fh-sfl-history__sort-button i,
.fh-sfl-history__table th[aria-sort="descending"] .fh-sfl-history__sort-button i {
    opacity: 1;
}

.fh-sfl-history__table th[aria-sort="ascending"] .fh-sfl-history__sort-button i::after,
.fh-sfl-history__table th[aria-sort="descending"] .fh-sfl-history__sort-button i::before {
    opacity: .2;
}

.fh-sfl-history__table th:nth-child(2),
.fh-sfl-history__table td:nth-child(2) {
    text-align: left;
}

.fh-sfl-history__table th:nth-child(2) .fh-sfl-history__sort-button {
    justify-content: flex-start;
}

.fh-sfl-history__row:nth-of-type(4n + 1) {
    background: #faf8f1;
}

.fh-sfl-history__row--active,
.fh-sfl-history__row--active:nth-of-type(4n + 1) {
    background: linear-gradient(90deg, rgba(25, 143, 77, .17), rgba(234, 249, 239, .88) 32%, rgba(255, 255, 255, .98));
}

.fh-sfl-history__row--active td:first-child {
    box-shadow: inset 4px 0 0 #1b9a54;
}

.fh-sfl-history__row--active .fh-sfl-history__team strong {
    color: #12643a;
}

.fh-sfl-history__row:hover {
    background: #fff6d9;
}

.fh-sfl-history__row--active:hover {
    background: linear-gradient(90deg, rgba(25, 143, 77, .24), rgba(225, 247, 233, .96) 38%, #fff);
}

.fh-sfl-history__podium-card--active {
    border-color: rgba(27, 154, 84, .34);
    box-shadow: 0 12px 30px rgba(18, 100, 58, .13);
}

.fh-sfl-history__active-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #12643a;
    font-weight: 800;
}

.fh-sfl-history__active-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #21a85e;
    box-shadow: 0 0 0 4px rgba(33, 168, 94, .13);
}

.fh-sfl-history__rank {
    width: 58px;
}

.fh-sfl-history__rank span {
    width: 32px;
    height: 32px;
    margin: auto;
    font-size: 13px;
}

.fh-sfl-history__team-button {
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    background: none;
    cursor: pointer;
    text-align: left;
}

.fh-sfl-history__team {
    display: inline-grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fh-sfl-history__team > span:last-child {
    display: grid;
    min-width: 0;
}

.fh-sfl-history__team strong {
    overflow: hidden;
    color: #18150e;
    font-size: 15px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-sfl-history__team small {
    margin-top: 3px;
    color: #837a68;
    font-size: 11px;
    font-weight: 700;
}

.fh-sfl-history__team small.is-up {
    color: #167040;
}

.fh-sfl-history__team small.is-down,
.fh-sfl-history .is-negative {
    color: #a83227;
}

.fh-sfl-history .is-positive {
    color: #167040;
}

.fh-sfl-history__team-logo,
.fh-sfl-history__fallback-logo {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.fh-sfl-history__fallback-logo {
    border: 1px solid #d9b43c;
    border-radius: 50%;
    color: #b08400;
    background: #fff7d7;
    font-size: 11px;
    font-weight: 900;
}

.fh-sfl-history__total {
    min-width: 98px;
    color: #15120b;
    font-size: 18px;
}

.fh-sfl-history__chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 9px;
    border-right: 2px solid #a47b00;
    border-bottom: 2px solid #a47b00;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
}

.fh-sfl-history__team-button[aria-expanded="true"] .fh-sfl-history__chevron {
    transform: translateY(2px) rotate(225deg);
}

.fh-sfl-history__detail td {
    padding: 0 !important;
    background: #ece7db;
}

.fh-sfl-history__season-panel {
    padding: 20px;
    text-align: left;
}

.fh-sfl-history__season-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.fh-sfl-history__season-head small {
    color: #766f62;
}

.fh-sfl-history__season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.fh-sfl-history__season-grid article {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px 10px;
    padding: 13px;
    border: 1px solid #d9d1bf;
    border-radius: 13px;
    background: rgba(255,255,255,.72);
}

.fh-sfl-history__season-grid article > strong,
.fh-sfl-history__season-grid article > b {
    grid-column: 1 / -1;
}

.fh-sfl-history__season-grid article > strong {
    padding-bottom: 6px;
    border-bottom: 2px solid #d7a81f;
}

.fh-sfl-history__season-grid span {
    display: grid;
    color: #29251c;
    font-weight: 800;
}

.fh-sfl-history__season-grid small {
    color: #827967;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fh-sfl-history__season-grid b {
    color: #966e00;
    text-align: right;
}

.fh-sfl-history__mobile-list {
    display: none;
}

.fh-sfl-history__empty {
    margin: 0;
    padding: 20px;
    border: 1px dashed #c5ae68;
    border-radius: 16px;
    text-align: center;
}

.fh-sfl-history__legend {
    display: grid;
    gap: 5px;
    padding: 18px 22px;
    border-left: 5px solid var(--sfl-gold);
    border-radius: 0 14px 14px 0;
    color: #5c5545;
    background: #eee9dc;
}

.fh-sfl-history__legend strong {
    color: #18150e;
}

@media (max-width: 1100px) {
    .fh-sfl-history__hero {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .fh-sfl-history__crest {
        width: 130px;
    }

    .fh-sfl-history__hero-stats {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, 1fr);
    }

    .fh-sfl-history__podium {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .fh-sfl-history {
        gap: 15px;
    }

    .fh-sfl-history__hero {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 14px;
        min-height: auto;
        padding: 22px 18px;
        border-radius: 20px;
    }

    .fh-sfl-history__crest {
        width: 76px;
        max-height: 92px;
    }

    .fh-sfl-history__hero h1 {
        font-size: clamp(31px, 10vw, 46px);
    }

    .fh-sfl-history__hero p {
        display: none;
    }

    .fh-sfl-history__kicker {
        font-size: 9px;
    }

    .fh-sfl-history__hero-stats {
        gap: 6px;
    }

    .fh-sfl-history__hero-stats > div {
        padding: 9px;
        text-align: center;
    }

    .fh-sfl-history__hero-stats strong {
        font-size: 16px;
    }

    .fh-sfl-history__podium-card {
        min-height: 78px;
        padding: 12px;
    }

    .fh-sfl-history__podium-card:not(:first-child) {
        display: none;
    }

    .fh-sfl-history__podium-logo {
        width: 46px;
        height: 46px;
    }

    .fh-sfl-history__toolbar {
        display: grid;
        gap: 12px;
        padding: 15px;
    }

    .fh-sfl-history__search {
        width: 100%;
    }

    .fh-sfl-history__table-wrap {
        display: none;
    }

    .fh-sfl-history__mobile-list {
        display: grid;
        gap: 9px;
    }

    .fh-sfl-history__mobile-card {
        overflow: hidden;
        border: 1px solid #ddd5c2;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 7px 20px rgba(27,21,8,.08);
    }

    .fh-sfl-history__mobile-card--active {
        border-color: rgba(27, 154, 84, .38);
        background: linear-gradient(135deg, #e5f7eb, #fff 62%);
        box-shadow: 0 8px 22px rgba(18, 100, 58, .14);
    }

    .fh-sfl-history__mobile-card--active summary {
        box-shadow: inset 4px 0 0 #1b9a54;
    }

    .fh-sfl-history__mobile-card--active .fh-sfl-history__team strong {
        color: #12643a;
    }

    .fh-sfl-history__mobile-card summary {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
        min-height: 70px;
        padding: 10px;
        list-style: none;
        cursor: pointer;
    }

    .fh-sfl-history__mobile-card summary::-webkit-details-marker {
        display: none;
    }

    .fh-sfl-history__mobile-card .fh-sfl-history__team {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 8px;
    }

    .fh-sfl-history__mobile-card .fh-sfl-history__team-logo,
    .fh-sfl-history__mobile-card .fh-sfl-history__fallback-logo {
        width: 40px;
        height: 40px;
    }

    .fh-sfl-history__mobile-points {
        display: grid;
        color: #8d6700;
        font-size: 19px;
        line-height: 1;
        text-align: right;
    }

    .fh-sfl-history__mobile-points small {
        color: #827967;
        font-size: 9px;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .fh-sfl-history__mobile-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border-top: 1px solid #ece6d8;
        background: #faf7ef;
    }

    .fh-sfl-history__mobile-stats > span {
        display: grid;
        gap: 2px;
        padding: 9px 5px;
        text-align: center;
    }

    .fh-sfl-history__mobile-stats small {
        color: #877e6b;
        font-size: 8px;
        text-transform: uppercase;
    }

    .fh-sfl-history__mobile-card .fh-sfl-history__season-panel {
        padding: 12px;
        border-top: 1px solid #ddd4c0;
        background: #eee9dc;
    }

    .fh-sfl-history__season-head {
        display: grid;
    }

    .fh-sfl-history__season-grid {
        grid-template-columns: 1fr;
        max-height: 330px;
        overflow: auto;
    }

    .fh-sfl-history__legend {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fh-sfl-history__hero-shine {
        animation: none;
    }

    .fh-sfl-history__chevron {
        transition: none;
    }
}
