/* ==========================================================================
   PREMIUM LEGAL PAGE — Flashprice Brand (Dark + Yellow + Green)
   ========================================================================== */

    /* ── Reading Progress Bar ── */
    .fp-legal-progress {
        position: fixed;
        top: 0;
        left: 0;
        width: 0%;
        height: 3px;
        background: linear-gradient(90deg, #FACC15, #22C55E, #FACC15);
        z-index: 99999;
        transition: width 0.1s linear;
    }

    /* ── Root Container ── */
    .fp-legal-page {
        background: #F9FAFB;
        min-height: 100vh;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        padding-bottom: 80px;
    }

    /* ★ NUCLEAR FIX: Override WordPress FSE contentSize (800px) constraint ★ */
    .fp-legal-page>* {
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* ── HERO SECTION ── */
    .fp-legal-hero {
        background: linear-gradient(135deg, #111827 0%, #1F2937 50%, #111827 100%);
        padding: 80px 20px 60px;
        text-align: center;
        position: relative;
        overflow: hidden;
        border-radius: var(--fp-radius-xl);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
        max-width: 1280px !important;
        margin: 32px auto 0 !important;
        width: calc(100% - 64px);
    }

    /* Subtle noise texture overlay */
    .fp-legal-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 30% 20%, rgba(250, 204, 21, 0.06) 0%, transparent 50%),
            radial-gradient(circle at 70% 80%, rgba(34, 197, 94, 0.04) 0%, transparent 50%);
        pointer-events: none;
    }

    .fp-legal-hero-inner {
        position: relative;
        z-index: 2;
        max-width: 720px;
        margin: 0 auto;
    }

    /* Breadcrumb */
    .fp-legal-breadcrumb {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--fp-radius-pill);
        padding: 6px 16px;
        font-size: var(--fp-text-base);
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 28px;
    }

    .fp-legal-breadcrumb a {
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        transition: color 0.2s;
    }

    .fp-legal-breadcrumb a:hover {
        color: #FACC15;
    }

    .fp-legal-breadcrumb svg {
        opacity: 0.4;
    }

    .fp-legal-breadcrumb .fp-bc-current {
        color: rgba(255, 255, 255, 0.9);
        font-weight: 600;
    }

    /* Title */
    .fp-legal-title {
        font-size: clamp(2.2rem, 5vw, 3.5rem) !important;
        font-weight: 900 !important;
        color: #FFFFFF !important;
        letter-spacing: -0.03em;
        line-height: 1.15;
        margin: 0 0 8px !important;
        -webkit-text-fill-color: #FFFFFF;
        background: none;
    }

    /* Yellow glow underline */
    .fp-legal-title-accent {
        display: block;
        width: 80px;
        height: 4px;
        background: linear-gradient(90deg, #FACC15, #22C55E);
        border-radius: var(--fp-radius-xs);
        margin: 16px auto 0;
        box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
    }

    /* Subtitle */
    .fp-legal-subtitle {
        font-size: var(--fp-text-lg);
        color: rgba(255, 255, 255, 0.5);
        max-width: 480px;
        margin: 20px auto 0;
        line-height: 1.6;
    }

    /* Updated Date Pill */
    .fp-legal-date-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 24px;
        padding: 6px 14px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--fp-radius-pill);
        font-size: var(--fp-text-sm);
        font-weight: 600;
        color: rgba(255, 255, 255, 0.4);
        letter-spacing: 0.3px;
    }

    /* ── Animated Accent Bar ── */
    .fp-legal-accent-bar {
        height: 3px;
        background: linear-gradient(90deg, transparent, #FACC15, #22C55E, #FACC15, transparent);
        background-size: 200% 100%;
        animation: fpAccentFlow 4s linear infinite;
    }

    @keyframes fpAccentFlow {
        0% {
            background-position: 200% 0;
        }

        100% {
            background-position: -200% 0;
        }
    }

    /* ── LAYOUT: TOC + Content ── */
    .fp-legal-layout {
        max-width: 1280px !important;
        margin: 48px auto 0 !important;
        padding: 0 32px 40px;
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }

    /* ── TABLE OF CONTENTS ── */
    .fp-legal-toc {
        width: 240px;
        flex-shrink: 0;
        position: sticky;
        top: 100px;
    }

    .fp-legal-toc-title {
        font-size: var(--fp-text-xs);
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: #9CA3AF;
        margin-bottom: 16px;
        padding-left: 16px;
    }

    .fp-legal-toc-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .fp-legal-toc-list li a {
        display: block;
        padding: 10px 16px;
        font-size: var(--fp-text-base);
        font-weight: 500;
        color: #6B7280;
        text-decoration: none;
        border-radius: var(--fp-radius-sm);
        border-left: 3px solid transparent;
        transition: all 0.2s;
        line-height: 1.4;
    }

    .fp-legal-toc-list li a:hover {
        color: #111827;
        background: rgba(0, 0, 0, 0.03);
    }

    .fp-legal-toc-list li a.fp-toc-active {
        color: #111827;
        font-weight: 700;
        background: rgba(250, 204, 21, 0.08);
        border-left-color: #FACC15;
    }

    /* Mobile TOC */
    .fp-legal-toc-mobile {
        display: none;
        margin: 0 auto 24px;
        max-width: 1280px !important;
        padding: 0 32px;
        box-sizing: border-box;
        width: 100%;
    }

    .fp-legal-toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 20px;
        background: #FFFFFF;
        border: 1px solid #E5E7EB;
        border-radius: var(--fp-radius-md);
        font-size: var(--fp-text-base);
        font-weight: 700;
        color: #111827;
        cursor: pointer;
        transition: all 0.2s;
    }

    .fp-legal-toc-toggle:hover {
        border-color: #FACC15;
    }

    .fp-legal-toc-toggle svg {
        transition: transform 0.3s;
    }

    .fp-legal-toc-toggle.fp-open svg {
        transform: rotate(180deg);
    }

    .fp-legal-toc-panel {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        background: #FFFFFF;
        border-radius: 0 0 12px 12px;
        border: 1px solid #E5E7EB;
        border-top: none;
        margin-top: -2px;
    }

    .fp-legal-toc-panel.fp-open {
        max-height: 500px;
    }

    .fp-legal-toc-panel ul {
        list-style: none;
        padding: 8px 0;
        margin: 0;
    }

    .fp-legal-toc-panel ul li a {
        display: block;
        padding: 10px 20px;
        font-size: var(--fp-text-base);
        font-weight: 500;
        color: #6B7280;
        text-decoration: none;
        transition: all 0.2s;
    }

    .fp-legal-toc-panel ul li a:hover {
        color: #111827;
        background: #F9FAFB;
    }

    /* ── CONTENT CARD ── */
    .fp-legal-content-wrap {
        flex: 1;
        min-width: 0;
    }

    .fp-legal-content-card {
        background: #FFFFFF;
        border-radius: var(--fp-radius-20);
        padding: 48px 40px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04),
            0 8px 24px rgba(0, 0, 0, 0.03),
            0 24px 48px rgba(0, 0, 0, 0.02);
        border: 1px solid rgba(0, 0, 0, 0.04);
        font-size: var(--fp-text-lg);
        line-height: 1.85;
    }

    /* Override FSE inner constrained widths */
    .fp-legal-content-card .wp-block-post-content>* {
        max-width: 100% !important;
    }

    /* Headings */
    .fp-legal-content-card h1,
    .fp-legal-content-card h2,
    .fp-legal-content-card h3 {
        color: #111827;
        font-weight: 800;
        letter-spacing: -0.02em;
        scroll-margin-top: 100px;
    }

    .fp-legal-content-card h2 {
        font-size: var(--fp-text-2xl);
        margin-top: 2.5em;
        margin-bottom: 0.8em;
        padding-bottom: 12px;
        padding-left: 16px;
        border-left: 4px solid #22C55E;
        border-bottom: none;
        position: relative;
    }

    .fp-legal-content-card h2:first-child {
        margin-top: 0;
    }

    .fp-legal-content-card h3 {
        font-size: var(--fp-text-lg);
        margin-top: 2em;
        margin-bottom: 0.6em;
        color: #1F2937;
    }

    /* Paragraphs */
    .fp-legal-content-card p {
        margin-bottom: 1.4em;
    }

    /* Links */
    .fp-legal-content-card a {
        color: #111827;
        font-weight: 600;
        text-decoration: none;
        background-image: linear-gradient(#FACC15, #FACC15);
        background-size: 0% 2px;
        background-position: 0 100%;
        background-repeat: no-repeat;
        transition: background-size 0.3s ease;
        padding-bottom: 1px;
    }

    .fp-legal-content-card a:hover {
        background-size: 100% 2px;
    }

    /* Custom Lists with Green Checks */
    .fp-legal-content-card ul,
    .fp-legal-content-card ol {
        padding-left: 0;
        margin-bottom: 1.6em;
    }

    .fp-legal-content-card ul {
        list-style: none;
    }

    .fp-legal-content-card ul li {
        position: relative;
        padding-left: 28px;
        margin-bottom: 10px;
    }

    .fp-legal-content-card ul li::before {
        content: '✓';
        position: absolute;
        left: 0;
        top: 1px;
        color: #22C55E;
        font-weight: 900;
        font-size: var(--fp-text-base);
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #DCFCE7;
        border-radius: var(--fp-radius-circle);
        font-size: var(--fp-text-xs);
    }

    .fp-legal-content-card ol {
        list-style: none;
        counter-reset: fp-ol;
    }

    .fp-legal-content-card ol li {
        position: relative;
        padding-left: 36px;
        margin-bottom: 10px;
        counter-increment: fp-ol;
    }

    .fp-legal-content-card ol li::before {
        content: counter(fp-ol);
        position: absolute;
        left: 0;
        top: 2px;
        width: 24px;
        height: 24px;
        background: #111827;
        color: #FACC15;
        font-weight: 800;
        font-size: var(--fp-text-sm);
        border-radius: var(--fp-radius-6);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Section fade-in */
    .fp-legal-section {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .fp-legal-section.fp-visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* ── CONTACT CTA CARD ── */
    .fp-legal-cta {
        max-width: 900px;
        margin: 48px auto 60px !important;
        padding: 0 20px;
    }

    .fp-legal-cta-card {
        background: #111827;
        border-radius: var(--fp-radius-xl);
        padding: 56px 40px;
        text-align: center;
        position: relative;
        overflow: hidden;
        border: 2px solid rgba(250, 204, 21, 0.15);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
            0 20px 30px -10px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.04);
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* Crosshatch pattern overlay */
    .fp-legal-cta-pattern {
        position: absolute;
        inset: 0;
        opacity: 0.04;
        background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23FACC15' stroke-width='1'%3E%3Cpath d='M0 40L40 0M-10 10L10-10M30 50L50 30'/%3E%3C/g%3E%3C/svg%3E");
        pointer-events: none;
        border-radius: var(--fp-radius-xl);
    }

    /* Decorative glow */
    .fp-legal-cta-card::before {
        content: '';
        position: absolute;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(250, 204, 21, 0.12) 0%, transparent 70%);
        top: -80px;
        right: -60px;
        pointer-events: none;
    }

    .fp-legal-cta-card::after {
        content: '';
        position: absolute;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
        bottom: -60px;
        left: -40px;
        pointer-events: none;
    }

    .fp-legal-cta-inner {
        position: relative;
        z-index: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .fp-legal-cta-emoji {
        font-size: var(--fp-text-5xl);
        margin-bottom: 20px;
        display: block;
    }

    .fp-legal-cta-title {
        font-size: clamp(1.6rem, 4vw, 2.2rem);
        font-weight: 900;
        color: #FFFFFF;
        margin-bottom: 12px;
        letter-spacing: -0.02em;
    }

    .fp-legal-cta-sub {
        font-size: var(--fp-text-lg);
        color: rgba(255, 255, 255, 0.6);
        max-width: 500px;
        line-height: 1.6;
        margin: 0 auto 32px;
    }

    .fp-legal-cta-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 16px 40px;
        background: #FACC15;
        color: #111827;
        font-size: var(--fp-text-md);
        font-weight: 800;
        border-radius: var(--fp-radius-14);
        text-decoration: none;
        transition: transform 0.2s, box-shadow 0.2s;
        box-shadow: 0 4px 16px rgba(250, 204, 21, 0.3);
        white-space: nowrap;
    }

    .fp-legal-cta-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(250, 204, 21, 0.4);
    }

    .fp-legal-cta-btn:active {
        transform: translateY(0);
    }

    .fp-legal-cta-links {
        margin-top: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 24px;
        flex-wrap: wrap;
    }

    .fp-legal-cta-links a {
        font-size: var(--fp-text-base);
        font-weight: 500;
        color: rgba(255, 255, 255, 0.5);
        text-decoration: none;
        transition: color 0.2s;
    }

    .fp-legal-cta-links a:hover {
        color: #FACC15;
    }

    /* ── TRUST BADGES ── */
    .fp-legal-trust {
        max-width: 1280px !important;
        margin: 24px auto 0;
        padding: 0 32px;
        display: flex;
        justify-content: center;
        gap: 24px;
        flex-wrap: wrap;
    }

    .fp-legal-trust-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: var(--fp-text-sm);
        font-weight: 600;
        color: #9CA3AF;
    }

    .fp-legal-trust-item span:first-child {
        font-size: var(--fp-text-base);
    }

    /* ── BACK TO TOP ── */
    .fp-legal-btt {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 44px;
        height: 44px;
        background: #111827;
        color: #FACC15;
        border: none;
        border-radius: var(--fp-radius-circle);
        font-size: var(--fp-text-lg);
        cursor: pointer;
        z-index: 99;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s, transform 0.3s, background 0.2s;
        pointer-events: none;
    }

    .fp-legal-btt.fp-show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .fp-legal-btt:hover {
        background: #1F2937;
    }

    /* ==========================================================================
   RESPONSIVE
   ========================================================================== */

    /* Tablet & below */
    @media (max-width: 1024px) {
        .fp-legal-toc {
            display: none;
        }

        .fp-legal-toc-mobile {
            display: block;
        }

        .fp-legal-layout {
            flex-direction: column;
            gap: 0;
            margin: 40px auto;
            padding: 0 20px;
        }

        .fp-legal-content-card {
            padding: 36px 28px;
            border-radius: var(--fp-radius-lg);
        }

        .fp-legal-cta-inner {
            flex-direction: column;
            text-align: center;
        }

        .fp-legal-cta-text {
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }

        .fp-legal-cta-emoji {
            margin-top: 0;
        }

        .fp-legal-cta-action {
            align-items: center;
            width: 100%;
        }
    }

    /* Mobile */
    @media (max-width: 640px) {
        .fp-legal-hero {
            padding: 56px 16px 40px;
            border-radius: var(--fp-radius-20);
            margin: 16px auto 0 !important;
            width: calc(100% - 24px);
        }

        .fp-legal-page {
            padding-bottom: 60px;
        }

        .fp-legal-layout {
            margin: 32px auto 0 !important;
            padding: 0 12px;
        }

        .fp-legal-content-card {
            padding: 24px 16px;
            border-radius: var(--fp-radius-14);
            font-size: var(--fp-text-md2);
        }

        .fp-legal-content-card h2 {
            font-size: var(--fp-text-xl);
        }

        .fp-legal-cta {
            padding: 0 10px;
        }

        .fp-legal-cta-card {
            padding: 36px 20px;
            border-radius: var(--fp-radius-lg);
        }

        .fp-legal-cta-btn {
            width: 100%;
            justify-content: center;
        }

        .fp-legal-toc-mobile {
            padding: 0 10px;
        }

        .fp-legal-trust {
            gap: 16px;
        }

        .fp-legal-btt {
            bottom: 80px;
            right: 16px;
        }
    }
