/**
 * FM Helper Rangliste: only the parts the theme does not already provide.
 * The magazine frame, headings, chips and rank table come from fm-helper-theme.
 */

.fmh-ranking {
    margin: 0;
}

/* Black heading words stay unmarked; only explicitly blue text is highlighted. */
body .design-shell .hl,
body .design-shell .fmh-mark,
body .design-shell .page h2 .fmh-mark {
    padding: 0;
    background: none;
}

body .design-shell .page h2 {
    padding: 0;
    background: none;
}

body .design-shell .page h1 .lime,
body .design-shell .page h2 .lime,
body .design-shell .page h3 .lime {
    padding: 0 .08em;
    background: linear-gradient(transparent 50%, var(--fmh-highlight-soft) 50%, var(--fmh-highlight-soft) 100%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

body .design-shell .portal-section-head p {
    font-size: .72rem;
    line-height: 1.6;
}

/* One lead size for hero, ranking intro and guide intros. */
body .design-shell .portal-lead,
body .design-shell .intro > p:not(.guide-byline),
body .design-shell .hero-copy > p:not(.guide-byline):not(.eyebrow),
body .design-shell .split-copy > p:not(.small) {
    font-size: 1.05rem;
    line-height: 1.65;
}
body .design-shell .split-copy > p.small {
    font-size: .72rem;
    line-height: 1.6;
}

/* Portal sections are content sections and use the same dashed separator. */
body .design-shell .portal-section {
    padding-top: 44px;
    padding-bottom: 44px;
    border-top: 2px dashed var(--fmh-line-strong);
}
body .design-shell .portal-section:last-of-type {
    padding-bottom: 44px;
}

@media (max-width: 650px) {
    body .design-shell .portal-section,
    body .design-shell .portal-section:last-of-type {
        padding-top: 34px;
        padding-bottom: 34px;
    }
}

/* Keep all magazine tiles on the same raised 3D baseline. */
body .design-shell .panel,
body .design-shell .portal-card:not(.portal-card-cta),
body .design-shell .portal-guide,
body .design-shell .principles-tile {
    box-shadow: 4px 4px 0 var(--fmh-pop);
}
body .design-shell .portal-card:not(.portal-card-cta):hover,
body .design-shell .portal-guide:hover,
body .design-shell .principles-tile:hover {
    box-shadow: 6px 6px 0 var(--fmh-pop);
}

/* Tiles are containers, not links. Only the text link inside is clickable. */
body .design-shell div.portal-card:hover,
body .design-shell div.portal-guide:hover,
body .design-shell div.principles-tile:hover {
    box-shadow: 4px 4px 0 var(--fmh-pop);
    transform: none;
}

.fmh-ranking-intro {
    padding-bottom: 4px;
}

.fmh-ranking-section {
    padding-top: 28px;
}

.fmh-ranking-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin: 18px 0 20px;
}

.fmh-ranking-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--fmh-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fmh-ranking-filters select {
    min-height: 48px;
    min-width: 12rem;
    padding: 0 14px;
    border: 2px solid var(--fmh-ink);
    border-radius: 10px;
    background: #fff;
    color: var(--fmh-text);
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
}

.fmh-ranking-filters select:focus {
    border-color: var(--fmh-brand);
    outline: 3px solid var(--fmh-brand-soft);
}

.fmh-ranking-filters .portal-button {
    min-height: 48px;
    padding: 0 20px;
}

.fmh-ranking-error {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 12px 0 18px;
    padding: 14px 16px;
    border: 2px solid #b42318;
    border-radius: 14px;
    background: #fff5f5;
    color: #7a1f1f;
}

.fmh-ranking-error strong {
    color: #7a1f1f;
}

.fmh-ranking-error code {
    font-size: .75rem;
    overflow-wrap: anywhere;
    opacity: .8;
}

.fmh-note {
    margin: 12px 0 18px;
    padding: 11px 14px;
    border-left: 3px solid var(--fmh-brand);
    background: var(--fmh-panel-2);
    color: var(--fmh-muted);
    font-size: .82rem;
}

.fmh-ranking .rank-table-wrap {
    overflow-x: auto;
}

.fmh-ranking .rank-table .col-rank { width: 8%; }
.fmh-ranking .rank-table .col-tactic { width: 30%; }
.fmh-ranking .rank-table .col-pitch { width: 12%; }
.fmh-ranking .rank-table .col-pts { width: 12%; }
.fmh-ranking .rank-table .col-ppg { width: 10%; }
.fmh-ranking .rank-table .col-win { width: 9%; }
.fmh-ranking .rank-table .col-gd { width: 9%; }
.fmh-ranking .rank-table .col-xgd { width: 10%; }

.fmh-ranking .rank-table th.col-rank,
.fmh-ranking .rank-table th.col-win,
.fmh-ranking .rank-table th.col-gd,
.fmh-ranking .rank-table th.col-xgd {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .fmh-ranking .rank-table .col-xgd {
        display: none;
    }
}

@media (max-width: 650px) {
    .fmh-ranking-filters label,
    .fmh-ranking-filters select {
        width: 100%;
        min-width: 0;
    }

    .fmh-ranking-filters .portal-button {
        width: 100%;
    }
}

/* Podium: second left, raised winner in the middle, third right.
   The two mini formation pitches live in the rank table below. */
.fmh-ranking .fmh-podium-section .portal-section-head {
    margin-bottom: 0;
}

.fmh-ranking .fmh-podium-places {
    --podium-gold: #e9b730;
    --podium-silver: #a9b8ca;
    --podium-bronze: #c7865a;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 0;
    list-style: none;
    max-width: 880px;
    margin: 26px auto 0;
    padding: 0;
    border-bottom: 2px solid var(--fmh-ink);
}

.fmh-ranking .fmh-podium-place {
    --medal: var(--podium-silver);
    --step-height: 132px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: center;
}

.fmh-ranking .fmh-podium-place-1 {
    --medal: var(--podium-gold);
    --step-height: 196px;
    grid-column: 2;
    grid-row: 1;
}

.fmh-ranking .fmh-podium-place-2 {
    grid-column: 1;
    grid-row: 1;
}

.fmh-ranking .fmh-podium-place-3 {
    --medal: var(--podium-bronze);
    --step-height: 96px;
    grid-column: 3;
    grid-row: 1;
}

.fmh-ranking .fmh-podium-tactic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding: 0 16px 18px;
}

.fmh-ranking .fmh-podium-tactic .eyebrow {
    margin: 0;
    color: var(--fmh-muted);
}

.fmh-ranking .fmh-podium-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin: 2px 0 4px;
}

.fmh-ranking .fmh-podium-score strong {
    color: var(--fmh-brand);
    font-family: var(--fmh-font-display);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.fmh-ranking .fmh-podium-place-1 .fmh-podium-score strong {
    color: var(--fmh-ink);
    font-size: 2.3rem;
}

.fmh-ranking .fmh-podium-score span {
    color: var(--fmh-muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fmh-ranking .fmh-podium-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6em;
    max-width: 100%;
    color: var(--fmh-text);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fmh-ranking .fmh-podium-place-1 .fmh-podium-name {
    font-size: 1.12rem;
}

.fmh-ranking .fmh-podium-name:hover {
    color: var(--fmh-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fmh-ranking .fmh-podium-meta {
    margin: 2px 0 6px;
    color: var(--fmh-muted);
    font-size: .8rem;
}

.fmh-ranking .fmh-podium-tactic .fmh-download {
    margin-top: 0;
}

.fmh-ranking .fmh-podium-step {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: var(--step-height);
    padding-top: 14px;
    border: 2px solid var(--fmh-ink);
    border-bottom: 0;
    border-top: 6px solid var(--medal);
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 30%, var(--fmh-panel)), var(--fmh-panel));
}

.fmh-ranking .fmh-podium-place-2 .fmh-podium-step {
    border-right: 0;
}

.fmh-ranking .fmh-podium-place-3 .fmh-podium-step {
    border-left: 0;
}

.fmh-ranking .fmh-podium-step span {
    color: var(--fmh-text);
    font: 700 4.2rem/1 var(--fmh-font-hand);
}

@media (max-width: 700px) {
    .fmh-ranking .fmh-podium-places {
        margin-top: 20px;
    }

    .fmh-ranking .fmh-podium-place {
        --step-height: 92px;
    }

    .fmh-ranking .fmh-podium-place-1 {
        --step-height: 132px;
    }

    .fmh-ranking .fmh-podium-place-3 {
        --step-height: 68px;
    }

    .fmh-ranking .fmh-podium-tactic {
        gap: 2px;
        padding: 0 5px 12px;
    }

    .fmh-ranking .fmh-podium-tactic .eyebrow {
        font-size: .58rem;
        letter-spacing: .06em;
    }

    .fmh-ranking .fmh-podium-score strong {
        font-size: 1.35rem;
    }

    .fmh-ranking .fmh-podium-place-1 .fmh-podium-score strong {
        font-size: 1.6rem;
    }

    .fmh-ranking .fmh-podium-score span {
        font-size: .52rem;
        letter-spacing: .02em;
    }

    .fmh-ranking .fmh-podium-name,
    .fmh-ranking .fmh-podium-place-1 .fmh-podium-name {
        min-height: 3em;
        font-size: .82rem;
    }

    .fmh-ranking .fmh-podium-meta {
        font-size: .66rem;
        overflow-wrap: anywhere;
    }

    .fmh-ranking .fmh-podium-tactic .fmh-download {
        font-size: .58rem;
    }

    .fmh-ranking .fmh-podium-step {
        padding-top: 10px;
    }

    .fmh-ranking .fmh-podium-step span {
        font-size: 2.6rem;
    }
}

.fmh-ranking .fmh-download {
    display: inline-block;
    margin-top: 2px;
    color: var(--fmh-brand);
    font-size: .68rem;
    font-weight: 800;
    text-decoration: none;
}

.fmh-ranking .fmh-download:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fmh-ranking,
.fmh-tactic-pitches {
    --pitch-bg: #e6f2e7;
    --pitch-line: #2b5a36;
    --pitch-dot: var(--fmh-brand, #1d4ed8);
    --panel: #fff;
}

.fmh-ranking .rank-table th.col-pitch {
    text-align: center;
    white-space: nowrap;
}

.fmh-ranking .rank-table td.col-pitch {
    text-align: center;
}

.fmh-ranking .col-pitch {
    width: 13%;
}

.fmh-ranking .formation-cell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

.fmh-ranking .formation-cell .fmh-pitch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 44px;
}

.fmh-ranking .formation-cell .pitch-label {
    color: var(--fmh-muted);
    font-size: .62rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fmh-ranking .formation-cell .pitch-mini {
    display: block;
    flex: 0 0 auto;
    width: 40px;
    height: 54px;
    max-width: none;
    overflow: hidden;
    border: 1.5px solid var(--pitch-line);
    border-radius: 5px;
    background: var(--pitch-bg);
}

.fmh-ranking .pitch-mini-line,
.fmh-tactic-pitches .pitch-mini-line {
    fill: none;
    stroke: var(--pitch-line);
    stroke-width: .7;
    opacity: .75;
}

.fmh-ranking .pitch-mini-goal,
.fmh-tactic-pitches .pitch-mini-goal {
    fill: none;
    stroke: var(--pitch-line);
    stroke-width: .6;
    opacity: .6;
}

.fmh-ranking .pitch-mini-dot,
.fmh-tactic-pitches .pitch-mini-dot {
    fill: var(--pitch-dot);
    stroke: var(--panel);
    stroke-width: .5;
}

.fmh-pitch-missing {
    color: var(--fmh-muted);
}

.fmh-tactic-pitches {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 18px 0;
}

.fmh-tactic-pitches figure {
    margin: 0;
    padding: 12px;
    border: 2px solid var(--fmh-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--fmh-pop);
}

.fmh-tactic-pitches figcaption {
    margin-bottom: 8px;
    color: var(--fmh-muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fmh-tactic-pitches .pitch-mini {
    display: block;
    width: 82px;
    height: 111px;
    max-width: none;
    border: 1.5px solid var(--pitch-line);
    border-radius: 6px;
    background: var(--pitch-bg);
}

@media (max-width: 800px) {
    .fmh-ranking .col-pitch {
        display: none;
    }
}

.design-shell .fmh-ranking .rank-table th,
.design-shell .fmh-ranking .rank-table td {
    padding: 10px 6px;
}

.design-shell .fmh-ranking .rank-table th {
    font-size: .6rem;
    letter-spacing: .06em;
}

/* Ranking hero background */
body.page-id-175 .design-shell .page .fmh-ranking-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 390px;
    margin: 0;
    padding: 72px 48px 48px;
    background-color: #f6f8fa;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .86) 35%, rgba(255, 255, 255, .25) 62%, rgba(255, 255, 255, 0) 80%),
        url('/wp-content/uploads/2026/11/rangliste-hero.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

body.page-id-175 .design-shell .page .fmh-ranking-intro h1 {
    margin: 0 0 8px;
}

body.page-id-175 .design-shell .page .fmh-ranking-intro .portal-lead {
    max-width: 52ch;
}

body.page-id-175 .design-shell .page .fmh-ranking-intro .eyebrow {
    margin-bottom: 10px;
}

@media (max-width: 700px) {
    body.page-id-175 .design-shell .page .fmh-ranking-intro {
        min-height: 340px;
        padding: 56px 22px 32px;
        background-image:
            linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .9) 55%, rgba(255, 255, 255, .55) 100%),
            url('/wp-content/uploads/2026/11/rangliste-hero.png');
        background-position: 70% center;
    }
}

/* Latest tactics teaser (homepage) */
.design-shell .fmh-latest .portal-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 0;
}
.design-shell .fmh-latest .portal-card {
    flex: initial;
}
@media (max-width: 760px) {
    .design-shell .fmh-latest .portal-card-grid { grid-template-columns: 1fr; }
}
.design-shell .tactic-teaser {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.design-shell .tactic-teaser-pitches {
    display: flex;
    justify-content: center;
    gap: 14px;
}
.design-shell .tactic-teaser-pitch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 0;
}
.fmh-latest .tactic-teaser-pitch .pitch-mini {
    display: block;
    width: 84px;
    height: 114px;
    border: 1.5px solid #2b5a36;
    border-radius: 8px;
    background: #e6f2e7;
}
.design-shell .tactic-teaser-pitch figcaption {
    color: var(--fmh-muted);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.fmh-latest .pitch-mini-line {
    fill: none;
    stroke: #2b5a36;
    stroke-width: .7;
    opacity: .75;
}
.fmh-latest .pitch-mini-goal {
    fill: none;
    stroke: #2b5a36;
    stroke-width: .6;
    opacity: .6;
}
.fmh-latest .pitch-mini-dot {
    fill: #1d4ed8;
    stroke: #fff;
    stroke-width: .5;
}
.design-shell .tactic-teaser h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}
.design-shell .tactic-teaser h3 a {
    color: var(--fmh-text);
    text-decoration: none;
}
.design-shell .tactic-teaser h3 a:hover {
    color: var(--fmh-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.design-shell .tactic-teaser-meta {
    margin: 0;
    color: var(--fmh-muted);
    font-size: .8rem;
}
.design-shell .tactic-teaser-stats {
    margin: 0;
    color: var(--fmh-muted);
    font-size: .85rem;
    line-height: 1.55;
}
.design-shell .tactic-teaser-stats strong {
    color: var(--fmh-brand);
    font-size: 1rem;
}
.design-shell .tactic-teaser-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}
.design-shell .portal-card h3 {
    margin: 2px 0 8px;
    font-size: 1.15rem;
    line-height: 1.25;
}

/* Analyses row on the homepage: three equal cards */
.design-shell .portal-card-grid.fmh-analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.design-shell .portal-card-grid.fmh-analysis-grid .portal-card {
    flex: initial;
}
@media (max-width: 760px) {
    .design-shell .portal-card-grid.fmh-analysis-grid { grid-template-columns: 1fr; }
}

/* Share bar (tactic pages and ranking) */
.fmh-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.fmh-ranking-share { padding: 0 28px 16px; }
.fmh-share-btn {
    appearance: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid var(--fmh-ink, #0b1220);
    border-radius: 999px;
    background: #fff;
    color: var(--fmh-ink, #0b1220);
    box-shadow: 2px 2px 0 var(--fmh-pop, #c9d3e0);
    text-decoration: none;
    cursor: pointer;
}
.fmh-share-btn.fmh-share-discord { color: #5865f2; }
.fmh-share-btn.fmh-share-reddit { color: #ff4500; }
.fmh-share-btn:hover {
    background: var(--fmh-brand, #1d4ed8);
    color: #fff;
    box-shadow: 3px 3px 0 var(--fmh-ink, #0b1220);
}
.fmh-share-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}
.fmh-share-check { display: none; }
.fmh-share-btn.is-copied .fmh-share-default { display: none; }
.fmh-share-btn.is-copied .fmh-share-check { display: block; }
.fmh-share-btn.is-copied {
    background: var(--fmh-brand, #1d4ed8);
    color: #fff;
}
@media (max-width: 650px) {
    .fmh-ranking-share { padding: 0 20px 12px; }
}

/* Keep the support button readable inside the content area */
.design-shell a.fmh-support-button,
.design-shell .entry-content a.fmh-support-button {
    color: #fff;
}
.design-shell a.fmh-support-button:hover,
.design-shell .entry-content a.fmh-support-button:hover {
    color: #fff;
    background: var(--fmh-brand-deep, #1e40af);
}

/* Notes under the ranking table */
.design-shell .fmh-ranking-notes {
    margin: 22px 0 0;
    color: var(--fmh-muted);
    font-size: .8rem;
    line-height: 1.6;
}
.design-shell .fmh-ranking-notes + .portal-links {
    margin-top: 14px;
}

/* Keep the two teaser links on one baseline (text-link carries a global margin) */
.design-shell .tactic-teaser-links .text-link,
.design-shell .tactic-teaser-links .fmh-download {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.4;
}
