/* Homepage additions (2026-09-25, owner-approved): live wire, weekly drive, tool tiles, field goal.
   Loaded only by index.html; built on the editorial tokens so light and dark both work.
   js/home-additions.js fills the live wire and marks today on the drive. */

/* ---------- live wire ---------- */
.ffn-wire {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    height: 34px;
    background: #0b1a33;
    color: #d6e2f5;
    font-family: var(--ffn-ed-font-sans);
    font-size: 12.5px;
    border-bottom: 1px solid rgba(243, 247, 255, 0.08);
}

.ffn-wire[hidden] {
    display: none;
}

.ffn-wire-label,
.ffn-wire-more {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    font-family: var(--ffn-ed-font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ffn-wire-label {
    padding: 0 16px 0 clamp(1rem, 2vw, 2rem);
    border-right: 1px solid rgba(243, 247, 255, 0.12);
    color: #ffffff;
}

.ffn-wire-more {
    padding: 0 clamp(1rem, 2vw, 2rem) 0 16px;
    border-left: 1px solid rgba(243, 247, 255, 0.12);
    color: #8fb8ff;
    text-decoration: none;
}

.ffn-wire-more:hover,
.ffn-wire-more:focus-visible {
    color: #ffffff;
}

.ffn-wire-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2f7bff;
    box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.25);
    animation: ffnWireBlink 1.6s ease-in-out infinite;
}

.ffn-wire-view {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 40px), transparent);
}

.ffn-wire-track {
    display: flex;
    width: max-content;
    animation: ffnWireScroll 90s linear infinite;
}

.ffn-wire:hover .ffn-wire-track,
.ffn-wire:focus-within .ffn-wire-track {
    animation-play-state: paused;
}

.ffn-wire-set {
    display: flex;
}

.ffn-wire-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 22px;
    white-space: nowrap;
    color: #d6e2f5;
    text-decoration: none;
}

.ffn-wire-item::after {
    content: "";
    width: 3px;
    height: 3px;
    margin-left: 14px;
    border-radius: 50%;
    background: rgba(243, 247, 255, 0.28);
}

.ffn-wire-item:hover,
.ffn-wire-item:focus-visible {
    color: #ffffff;
}

.ffn-wire-pos {
    font-family: var(--ffn-ed-font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #8fb8ff;
}

.ffn-wire-team {
    font-family: var(--ffn-ed-font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #7f93b3;
}

@keyframes ffnWireScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ffnWireBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- five days, one drive ---------- */
.ffn-drive {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ffn-ed-border);
}

.ffn-drive-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.ffn-drive-title {
    margin: 0;
    color: var(--ffn-ed-text);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.ffn-drive-kicker {
    color: var(--ffn-ed-text-soft);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ffn-drive-board {
    position: relative;
    margin-top: 1.1rem;
    padding: 1.6rem 1rem 1.3rem;
    border: 1px solid var(--ffn-ed-border);
    border-radius: 1.2rem;
    background: var(--ffn-ed-surface);
}

.ffn-drive-track {
    position: absolute;
    top: calc(1.6rem + 5.5px);
    left: calc(1rem + (100% - 2rem) * 0.1);
    right: calc(1rem + (100% - 2rem) * 0.1);
    height: 3px;
    border-radius: 99px;
    background: var(--ffn-ed-border-strong);
}

.ffn-drive-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--drive-to, 100%);
    border-radius: inherit;
    background: var(--ffn-ed-accent);
    animation: ffnDriveFill 2.2s 0.3s cubic-bezier(0.3, 0.7, 0.2, 1) both;
}

.ffn-drive-ball {
    position: absolute;
    top: 50%;
    left: var(--drive-to, 100%);
    width: 26px;
    height: 16px;
    margin: -25px 0 0 -13px;
    animation: ffnDriveBall 2.2s 0.3s cubic-bezier(0.3, 0.7, 0.2, 1) both;
}

.ffn-drive-ball svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-8deg);
}

.ffn-drive-stops {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.ffn-drive-stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.45rem;
    border-radius: 0.75rem;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.ffn-drive-node {
    position: relative;
    width: 14px;
    height: 14px;
    margin-bottom: 0.6rem;
    box-sizing: border-box;
    border: 2px solid var(--ffn-ed-border-strong);
    border-radius: 50%;
    background: var(--ffn-ed-surface);
}

.ffn-drive-stop.is-done .ffn-drive-node {
    border-color: var(--ffn-ed-accent);
    background: var(--ffn-ed-accent);
}

.ffn-drive-stop.is-today .ffn-drive-node::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px solid var(--ffn-ed-accent);
    border-radius: 50%;
    animation: ffnDrivePing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ffn-drive-day {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ffn-ed-text-soft);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ffn-drive-today {
    display: none;
    padding: 0.1rem 0.4rem;
    border-radius: 99px;
    background: var(--ffn-ed-accent);
    color: #ffffff;
    font-size: 0.56rem;
    letter-spacing: 0.1em;
}

html[data-theme="dark"] .ffn-drive-today {
    color: #041019;
}

.ffn-drive-stop.is-today .ffn-drive-today {
    display: inline-block;
}

.ffn-drive-stop strong {
    color: var(--ffn-ed-text);
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    transition: color 0.15s ease;
}

.ffn-drive-what {
    color: var(--ffn-ed-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.ffn-drive-stop:hover strong,
.ffn-drive-stop:focus-visible strong {
    color: var(--ffn-ed-accent);
}

@keyframes ffnDriveFill { from { width: 0; } to { width: var(--drive-to, 100%); } }
@keyframes ffnDriveBall { from { left: 0; } to { left: var(--drive-to, 100%); } }
@keyframes ffnDrivePing { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- tools: the whole playbook ---------- */
.ffn-tools-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.ffn-tools-title {
    margin: 0.4rem 0 1.2rem;
    color: var(--ffn-ed-text);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.ffn-tools {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.6rem;
}

.ffn-tool {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.9rem;
    min-height: 6.4rem;
    padding: 0.85rem;
    box-sizing: border-box;
    border: 1px solid var(--ffn-ed-border);
    border-radius: 1rem;
    background: var(--ffn-ed-surface);
    color: var(--ffn-ed-text);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ffn-tool:hover,
.ffn-tool:focus-visible {
    transform: translateY(-3px);
    border-color: var(--ffn-ed-accent);
    box-shadow: var(--ffn-ed-shadow-card);
}

.ffn-tool-ic {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
    background: var(--ffn-ed-accent-soft);
    color: var(--ffn-ed-accent);
    transition: background 0.2s ease, color 0.2s ease, transform 0.3s ease;
}

.ffn-tool:hover .ffn-tool-ic,
.ffn-tool:focus-visible .ffn-tool-ic {
    background: var(--ffn-ed-accent);
    color: #ffffff;
    transform: rotate(-8deg) scale(1.06);
}

.ffn-tool.is-highlight {
    border-color: transparent;
    background: var(--ffn-ed-accent);
    color: #ffffff;
}

.ffn-tool.is-highlight .ffn-tool-ic {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

html[data-theme="dark"] .ffn-tool.is-highlight,
html[data-theme="dark"] .ffn-tool.is-highlight .ffn-tool-ic,
html[data-theme="dark"] .ffn-tool:hover .ffn-tool-ic {
    color: #041019;
}

.ffn-ic {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- newsletter: the kick ---------- */
.ffn-home-newsletter-band.ffn-nl-with-kick {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: stretch;
    gap: 1.75rem;
    max-width: 1000px;
}

.ffn-nl-main {
    display: grid;
    align-content: center;
    gap: 1.25rem;
}

.ffn-kick {
    display: grid;
    place-items: center;
    min-height: 280px;
    border: 1px solid rgba(243, 247, 255, 0.08);
    border-radius: 1.3rem;
    background: #07101f;
    overflow: hidden;
}

.ffn-kick-stage {
    position: relative;
    width: 320px;
    height: 260px;
}

.ffn-kick-stage svg {
    position: absolute;
    inset: 0;
    width: 320px;
    height: 260px;
}

.ffn-kick-glow {
    fill: rgba(94, 162, 255, 0.4);
    filter: blur(18px);
}

.ffn-kick-lamp {
    fill: #ffffff;
    animation: ffnWireBlink 3s ease-in-out infinite;
}

.ffn-kick-post {
    fill: none;
    stroke: #ffd23f;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ffn-kick-flag {
    fill: #ff7a1a;
    transform-box: fill-box;
    transform-origin: left center;
    animation: ffnKickFlag 1.1s ease-in-out infinite alternate;
}

.ffn-kick-good {
    fill: #ffe7a3;
    font-family: 'Caveat', cursive;
    font-size: 38px;
    font-weight: 700;
    text-anchor: middle;
    transform-box: fill-box;
    transform-origin: center;
    animation: ffnKickGood 4.8s cubic-bezier(0.2, 1.6, 0.4, 1) infinite both;
}

.ffn-kick-ball {
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 16px;
    opacity: 0;
    offset-path: path('M160 252 Q142 150 160 96');
    offset-rotate: 0deg;
    offset-anchor: center;
    animation: ffnKick 4.8s cubic-bezier(0.25, 0.6, 0.4, 1) infinite;
}

.ffn-kick-ball svg {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes ffnKickFlag { from { transform: skewY(-12deg) scaleX(0.85); } to { transform: skewY(10deg) scaleX(1); } }
@keyframes ffnKick {
    0% { offset-distance: 0%; opacity: 0; transform: scale(1.5) rotate(0deg); }
    5% { opacity: 1; }
    56% { offset-distance: 100%; opacity: 1; transform: scale(0.42) rotate(900deg); }
    62%, 100% { offset-distance: 100%; opacity: 0; transform: scale(0.42) rotate(900deg); }
}
@keyframes ffnKickGood {
    0%, 55% { opacity: 0; transform: scale(0.4) rotate(-6deg); }
    61%, 88% { opacity: 1; transform: scale(1) rotate(-6deg); }
    96%, 100% { opacity: 0; transform: scale(1) rotate(-6deg); }
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
    .ffn-home-newsletter-band.ffn-nl-with-kick {
        grid-template-columns: minmax(0, 1fr);
    }

    .ffn-tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ffn-tool {
        flex-direction: row;
        align-items: center;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .ffn-wire-more {
        display: none;
    }

    .ffn-drive-track {
        display: none;
    }

    .ffn-drive-stops {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .ffn-drive-stop {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 0.6rem;
        align-items: center;
        text-align: left;
    }

    .ffn-drive-node { margin: 0; grid-row: 1; }
    .ffn-drive-day { grid-row: 1; }
    .ffn-drive-stop strong { grid-row: 1; }
    .ffn-drive-what { grid-column: 2 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .ffn-wire-track,
    .ffn-wire-dot,
    .ffn-drive-fill,
    .ffn-drive-ball,
    .ffn-drive-node::after,
    .ffn-kick-lamp,
    .ffn-kick-flag,
    .ffn-kick-good,
    .ffn-kick-ball {
        animation: none;
    }

    .ffn-wire-view {
        overflow-x: auto;
    }
}

/* ---- 04 Rankings leaderboard + 05 Articles (2026-09-25 PM) ----
   Wide screens: rankings and recent articles side by side. Rankings: one card, hairline rows,
   team-colored names, a points bar scaled to the list leader, team chip on the right. */
@media (min-width: 1201px) {
    /* Same 1000px column as the newsletter band below. */
    .ffn-pilot-home .ffn-data-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
        max-width: 1000px;
        margin-right: auto;
        margin-left: auto;
    }

    .ffn-pilot-home .rankings-section,
    .ffn-pilot-home .more-articles-panel {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}

.ffn-pilot-home .rankings-section {
    margin-top: 0;
}

.ffn-pilot-home .rankings-title,
.ffn-pilot-home .more-articles-header h2 {
    margin: 0.4rem 0 1rem;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.04em;
    text-align: left;
    text-transform: none;
}

.ffn-pilot-home .rankings-title::after {
    display: none;
}

.ffn-pilot-home .more-articles-header {
    margin: 0;
    text-align: left;
}

.ffn-pilot-home .ppr-toggle,
.ffn-pilot-home .position-toggle {
    justify-content: flex-start;
    margin: 0.5rem 0 0;
}

.ffn-pilot-home .ffn-toggle {
    min-height: 2.3rem;
}

.ffn-pilot-home .hp-rankings-context {
    margin: 1rem 0 0.6rem;
    color: var(--ffn-ed-text-soft);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ffn-pilot-home .rankings {
    display: block;
    margin: 0;
}

.ffn-pilot-home .ranking-column {
    max-width: none;
    border: 1px solid var(--ffn-ed-border);
    border-radius: 1rem;
    background: var(--ffn-ed-surface);
    box-shadow: none;
}

.ffn-pilot-home .player-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ffn-pilot-home .player-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(4.8rem, 28%) 2.9rem;
    align-items: center;
    gap: 1rem;
    padding: 0.62rem 1rem 0.62rem 0.9rem;
    border: 0;
    border-bottom: 1px solid var(--ffn-ed-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ffn-pilot-home .player-list li.has-team-tint {
    box-shadow: inset 3px 0 0 var(--ffn-row-team-color);
}

.ffn-pilot-home .player-list li:not(.hp-list-head):hover {
    background: rgba(0, 87, 255, 0.045);
}

.ffn-pilot-home .player-list li.hp-list-head {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    background: #f4f7fc;
    color: var(--ffn-ed-text-soft);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ffn-pilot-home .player-list li.hp-list-head span:not(:first-child) {
    text-align: right;
}

.ffn-pilot-home .player-list li.see-full-list {
    display: flex;
    justify-content: center;
    border-bottom: 0;
}

.ffn-pilot-home .player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.ffn-pilot-home .player-rank {
    min-width: 1.5rem;
    color: var(--ffn-ed-text-soft);
}

.ffn-pilot-home .player-rank--elite {
    color: var(--ffn-ed-text);
}

.ffn-pilot-home .hp-player-detail {
    display: grid;
    min-width: 0;
}

.ffn-pilot-home .player-list .player-name {
    color: var(--ffn-team-ink, var(--ffn-ed-text));
    font-weight: 800;
    line-height: 1.2;
}

.ffn-pilot-home .player-list li:hover .player-name {
    color: var(--ffn-team-ink, var(--ffn-ed-text));
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.ffn-pilot-home .hp-dst-meta {
    color: var(--ffn-ed-text-soft);
    font-size: 0.74rem;
}

.ffn-pilot-home .hp-points {
    display: grid;
    gap: 0.3rem;
    justify-items: end;
}

.ffn-pilot-home .hp-points strong {
    color: var(--ffn-ed-text);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.84rem;
    font-weight: 800;
}

.ffn-pilot-home .hp-points[style]::after {
    content: "";
    width: 100%;
    height: 3px;
    background: linear-gradient(to left, rgba(0, 87, 255, 0.42) calc(var(--bar, 0) * 100%), rgba(7, 16, 31, 0.06) 0);
}

.ffn-pilot-home .hp-team-badge {
    justify-self: end;
}

html[data-theme="dark"] .ffn-pilot-home .player-list li.hp-list-head {
    background: #132238;
}

html[data-theme="dark"] .ffn-pilot-home .player-list li:not(.hp-list-head):hover {
    background: rgba(99, 180, 255, 0.07);
}

html[data-theme="dark"] .ffn-pilot-home .hp-points[style]::after {
    background: linear-gradient(to left, rgba(99, 180, 255, 0.55) calc(var(--bar, 0) * 100%), rgba(148, 168, 198, 0.1) 0);
}

html[data-theme="dark"] .ffn-pilot-home .hp-team-badge {
    box-shadow: inset 0 0 0 1px rgba(243, 247, 255, 0.16);
}

@media (max-width: 640px) {
    .ffn-pilot-home .player-list li {
        grid-template-columns: minmax(0, 1fr) 4.8rem 2.7rem;
        gap: 0.6rem;
        padding-right: 0.75rem;
    }
}

.ffn-pilot-home .more-articles-header h2::after {
    display: none;
}

@media (max-width: 640px) {
    .ffn-pilot-home .ppr-toggle,
    .ffn-pilot-home .position-toggle {
        gap: 0.4rem !important;
        padding: 0 !important;
        flex-wrap: wrap !important;
    }

}
