/**
 * Public-facing CSS for AI Match Predictor Plugin
 * Final styles with Optimized Mobile Tables (Fit-to-Screen)
 */

/* --- Modern Filter Bar Styles --- */
.amp-filter-wrapper { margin-bottom: 40px; padding: 10px 0; position: relative; }
.amp-filter-bar { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; align-items: center; }
.amp-select-wrapper { position: relative; display: inline-block; min-width: 200px; }

.amp-filter-bar select {
    width: 100%; appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-color: #ffffff; border: 2px solid #e9ecef; border-radius: 50px;
    padding: 14px 45px 14px 25px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; font-weight: 700; color: #1a0a3c; cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02); transition: all 0.2s ease-in-out;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231a0a3c%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 20px center; background-size: 12px;
}
.amp-filter-bar select:hover { border-color: #1a0a3c; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(26, 10, 60, 0.1); }
.amp-filter-bar select:focus { outline: none; border-color: #ff00f7; box-shadow: 0 0 0 4px rgba(255, 0, 247, 0.15); }
.amp-no-results { text-align: center; padding: 60px; font-size: 18px; font-weight: 600; color: #777; background: #f9f9f9; border-radius: 16px; border: 2px dashed #e0e0e0; width: 100%; grid-column: 1 / -1; }

/* --- Prediction Feed Grid & Card Styles --- */
.amp-prediction-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.amp-prediction-card { background: #ffffff; border: 1px solid #e9ecef; border-radius: 16px; padding: 25px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 15px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.amp-prediction-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1); }
.amp-hot-banner { position: absolute; top: 12px; right: -32px; background-color: #dc3545; color: white; padding: 5px 35px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.amp-card-header { text-align: center; color: #777; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.amp-card-league { display: block; color: #1a0a3c; margin-top: 5px; font-weight: 700; }
.amp-card-teams { display: flex; justify-content: space-between; align-items: center; text-align: center; padding: 10px 0; }
.amp-team { display: flex; align-items: center; gap: 12px; width: 45%; }
.amp-team-home { justify-content: flex-end; text-align: right; }
.amp-team-away { justify-content: flex-start; text-align: left; }
.amp-team-name { font-weight: 700; font-size: 16px; color: #1a0a3c; line-height: 1.2; }
.amp-team-logo { height: 36px; width: 36px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.amp-team-separator { font-weight: 700; color: #ccc; font-size: 18px; }
.amp-card-prediction { background: #f8f9fa; border-radius: 12px; padding: 15px; text-align: center; border: 1px solid #f1f1f1; }
.amp-prediction-title { display: block; font-size: 12px; color: #777; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 5px; }
.amp-prediction-text { display: block; font-size: 20px; font-weight: 800; color: #1a0a3c; margin: 0 0 8px 0; text-transform: capitalize; }
.amp-prediction-detail-link { font-size: 13px; text-decoration: none; color: #ff00f7; font-weight: 700; transition: color 0.2s; }
.amp-prediction-detail-link:hover { color: #d600cf; text-decoration: underline; }
.amp-card-cta-button { background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%); color: #1a0a3c; padding: 14px 25px; border-radius: 50px; text-decoration: none; font-weight: 800; font-size: 16px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; border: none; box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4); transition: all 0.2s ease-in-out; text-transform: uppercase; letter-spacing: 0.5px; }
.amp-card-cta-button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 193, 7, 0.5); filter: brightness(105%); }
.amp-card-cta-button .amp-cta-logo { height: 22px; }
.amp-card-offer { text-align: center; font-size: 13px; color: #555; font-weight: 500; }
.amp-offer-flag { margin-right: 6px; font-size: 16px; }
.amp-single-card-wrapper { max-width: 600px; margin: 0 auto 30px auto; }

/* --- Probability Gauge Widget --- */
.amp-probability-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 15px 0 5px 0; }
.amp-probability-circle { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.amp-probability-inner { width: 54px; height: 54px; background-color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: absolute; box-shadow: inset 0 0 5px rgba(0,0,0,0.05); }
.amp-prob-number { font-size: 18px; font-weight: 800; color: #1a0a3c; }
.amp-probability-label { margin-top: 8px; font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; }


/* --- Odds Table Styles --- */
.amp-odds-table-container { margin: 40px 0; border-radius: 12px; overflow: hidden; }
.amp-odds-table { width: 100%; border-collapse: collapse; text-align: center; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; border: 1px solid #e9ecef; }
.amp-odds-table th { background-color: #1a0a3c; color: #ffffff; padding: 18px 15px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.amp-odds-table td { padding: 15px; background-color: #ffffff; color: #333; font-weight: 600; }
.amp-odds-table tbody tr { border-bottom: 1px solid #f1f1f1; }
.amp-odds-table tbody tr:last-child { border-bottom: none; }
.amp-odds-table .amp-bookmaker-cell { font-weight: 800; color: #1a0a3c; white-space: nowrap; font-size: 15px; }
.amp-odds-table .amp-odds-button { background-color: #ff00f7; color: #ffffff; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 15px; display: inline-block; border: none; transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; }
.amp-odds-table .amp-odds-button:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(255, 0, 247, 0.3); color: #ffffff; }

/* --- League Table Styles --- */
.amp-league-table-container { margin: 40px 0; border-radius: 12px; overflow: hidden; border: 1px solid #e9ecef; }
.amp-league-table { width: 100%; border-collapse: collapse; text-align: center; border-radius: 12px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; }
.amp-league-table th { background-color: #1a0a3c; color: #ffffff; padding: 15px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.amp-league-table td { padding: 12px 10px; background-color: #ffffff; }
.amp-league-table tbody tr { border-bottom: 1px solid #f1f1f1; }
.amp-league-table tbody tr:last-child { border-bottom: none; }
.amp-league-table .team-name { text-align: left; font-weight: 600; white-space: nowrap; color: #333; }
.amp-league-table .points { font-weight: 800; color: #1a0a3c; }
.amp-league-table .amp-highlight-team td { background-color: #f0e6ff; }


/* --- H2H Table Styles --- */
.amp-h2h-table-container { margin: 40px 0; }
.amp-table-title { font-size: 24px; font-weight: 700; color: #1a0a3c; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f1f1f1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.amp-h2h-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); border: 1px solid #e9ecef; }
.amp-h2h-table th { background-color: #f8f9fa; color: #555; padding: 12px 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid #e9ecef; white-space: nowrap; }
.amp-h2h-table td { padding: 15px 10px; background-color: #ffffff; }
.amp-h2h-table tbody tr { border-bottom: 1px solid #f1f1f1; }
.amp-h2h-table tbody tr:last-child { border-bottom: none; }
.amp-h2h-table .score { font-weight: 800; color: #1a0a3c; background: #f8f9fa; padding: 5px 10px; border-radius: 5px; }
.amp-h2h-table .winner { font-weight: 700; color: #28a745; }

/* --- Final Prediction Box --- */
.amp-final-prediction { background-color: #1a0a3c; color: #ffffff; padding: 25px 30px; margin: 30px 0; border-radius: 12px; font-size: 20px; font-weight: 700; text-align: center; line-height: 1.6; box-shadow: 0 8px 20px rgba(26, 10, 60, 0.4); border: 2px solid #ff00f7; }
.amp-final-prediction p { margin: 0; padding: 0; }
.amp-pagination-links { margin-top: 40px; text-align: center; }
.amp-pagination-links .page-numbers { display: inline-block; padding: 10px 18px; margin: 0 5px; border: 1px solid #e9ecef; border-radius: 8px; text-decoration: none; color: #1a0a3c; font-weight: 700; background: #fff; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.amp-pagination-links .page-numbers.current { background: #ff00f7; color: #fff; border-color: #ff00f7; }
.amp-pagination-links .page-numbers:hover { background: #f0e6ff; transform: translateY(-2px); }

/* --- RESPONSIVE FIX (MOBILE "FIT-TO-SCREEN") --- */
@media (max-width: 768px) {
    /* 1. Reset Containers: Remove overflow/scroll blocking */
    .amp-odds-table-container,
    .amp-league-table-container,
    .amp-h2h-table-container {
        display: block;
        width: 100%;
        overflow-x: visible; /* Was auto, changed to visible to force fit */
        border-radius: 12px;
        margin-left: 0;
        margin-right: 0;
        border: 1px solid #e9ecef;
    }

    /* 2. Force Tables to Fit Width */
    .amp-odds-table,
    .amp-league-table,
    .amp-h2h-table {
        min-width: 0 !important; /* Allow shrinking */
        width: 100% !important;
        table-layout: fixed; /* Force equal/controlled widths */
        font-size: 10px; /* Small font for tight spaces */
    }

    /* 3. Compact Cells */
    .amp-odds-table th, .amp-odds-table td,
    .amp-league-table th, .amp-league-table td,
    .amp-h2h-table th, .amp-h2h-table td {
        padding: 6px 2px; /* Very tight padding */
        white-space: normal; /* Allow wrapping */
        word-wrap: break-word;
        line-height: 1.1;
    }
    
    /* 4. Odds Button Compacting */
    .amp-odds-table .amp-odds-button {
        padding: 5px 2px;
        font-size: 10px;
        width: 100%;
        display: block;
        box-sizing: border-box;
    }
    
    /* 5. League Table: Show All but Constrain Team Name */
    .amp-league-table .team-name {
        width: 40%; /* Give team name the most space */
        max-width: 80px;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Make number columns very narrow */
    .amp-league-table th:not(:nth-child(2)), 
    .amp-league-table td:not(:nth-child(2)) {
        width: 8%; 
    }
    
    /* 6. H2H Table: Hide Competition Column */
    .amp-h2h-table th:nth-child(2),
    .amp-h2h-table td:nth-child(2) {
        display: none;
    }
    
    /* 7. Filter Bar Mobile Adjustments */
    .amp-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        scrollbar-width: none;
    }
    .amp-filter-bar::-webkit-scrollbar { display: none; }
    .amp-select-wrapper { min-width: 160px; flex: 0 0 auto; }
}
/* --- Match Insights Tables --- */
.amp-match-insights { margin: 40px 0; }
.amp-data-note { color: #68707a; font-size: .9rem; margin-bottom: 1rem; }
.amp-insights-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.amp-insights-table { width: 100%; border-collapse: collapse; min-width: 520px; background: #fff; }
.amp-insights-table th, .amp-insights-table td { border: 1px solid #e5e7eb; padding: .65rem .75rem; text-align: left; vertical-align: top; }
.amp-insights-table thead th { background: #1a0a3c; color: #fff; font-weight: 700; }
.amp-insights-table tbody th { font-weight: 600; background: #fafafa; }
@media (max-width: 768px) {
    .amp-insights-table-wrap { overflow-x: visible; }
    .amp-insights-table { min-width: 0; table-layout: fixed; font-size: 10px; }
    .amp-insights-table th, .amp-insights-table td { padding: 6px 3px; word-wrap: break-word; line-height: 1.15; }
}

/* --- Verified factual article sections --- */
.amp-verified-facts { margin: 1.25rem 0; }
.amp-verified-facts table { width: 100%; border-collapse: collapse; margin: .75rem 0 1.25rem; }
.amp-verified-facts th, .amp-verified-facts td { border: 1px solid #e5e7eb; padding: .6rem .7rem; text-align: left; }
.amp-verified-facts thead th { background: #1a0a3c; color: #fff; }
.amp-verified-facts tbody th { background: #fafafa; }
.amp-fact-note { color: #68707a; font-style: italic; }
@media (max-width: 640px) {
    .amp-verified-facts { overflow-x: auto; }
    .amp-verified-facts table { min-width: 520px; font-size: .88rem; }
}

/* --- Professional Related Prediction Cards --- */
.amp-internal-links {
    --amp-link-accent: #2563eb;
    --amp-link-accent-dark: #1d4ed8;
    --amp-link-border: rgba(15, 23, 42, .10);
    --amp-link-muted: #64748b;
    margin: 2.25rem 0 1rem;
    padding: 1.25rem;
    border: 1px solid var(--amp-link-border);
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}
.amp-internal-links__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.amp-internal-links__header h2 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.25; }
.amp-internal-links__count { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .55rem; border-radius: 999px; color: #fff; background: var(--amp-link-accent); font-size: .8rem; font-weight: 700; }
.amp-internal-links__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.amp-related-card { margin: 0; min-width: 0; }
.amp-related-card__link { display: flex; align-items: stretch; min-height: 92px; overflow: hidden; color: inherit; text-decoration: none; border: 1px solid var(--amp-link-border); border-radius: 13px; background: #fff; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.amp-related-card__link:hover, .amp-related-card__link:focus-visible { color: inherit; border-color: rgba(37, 99, 235, .45); box-shadow: 0 8px 20px rgba(37, 99, 235, .14); transform: translateY(-2px); }
.amp-related-card__link:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.amp-related-card__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 3.1rem; color: #fff; background: linear-gradient(160deg, var(--amp-link-accent), var(--amp-link-accent-dark)); font-size: 1.35rem; font-weight: 700; }
.amp-related-card__body { display: flex; flex: 1; flex-direction: column; justify-content: center; min-width: 0; padding: .85rem 1rem; }
.amp-related-card__title { display: -webkit-box; overflow: hidden; color: #0f172a; font-size: .95rem; font-weight: 700; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.amp-related-card__cta { margin-top: .45rem; color: var(--amp-link-muted); font-size: .78rem; font-weight: 600; }
@media (max-width: 520px) { .amp-internal-links { padding: 1rem; border-radius: 14px; } .amp-internal-links__grid { grid-template-columns: 1fr; } }

/* --- Match facts and deterministic evidence cards --- */
.amp-match-facts-grid, .amp-model-evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .85rem; margin: 1rem 0 1.75rem; }
.amp-match-fact-card, .amp-model-evidence-card { display: flex; align-items: center; gap: .8rem; min-width: 0; padding: 1rem; border: 1px solid #e5e7eb; border-radius: 14px; background: linear-gradient(145deg, #fff, #f8fafc); box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.amp-match-fact-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 2.45rem; width: 2.45rem; height: 2.45rem; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #1a0a3c, #39217a); font-size: 1.15rem; font-weight: 700; }
.amp-match-fact-body, .amp-model-evidence-values span { display: flex; flex-direction: column; min-width: 0; }
.amp-match-fact-label, .amp-model-evidence-label, .amp-model-kicker, .amp-model-score span { color: #64748b; font-size: .72rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.amp-match-fact-body strong { margin-top: .25rem; overflow-wrap: anywhere; color: #0f172a; font-size: .96rem; line-height: 1.35; }
.amp-model-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1.15rem 1.25rem; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #1a0a3c, #39217a); box-shadow: 0 10px 24px rgba(26, 10, 60, .18); }
.amp-model-summary > div:first-child { display: flex; flex-direction: column; gap: .35rem; }
.amp-model-summary strong { font-size: clamp(1.15rem, 2.5vw, 1.55rem); }
.amp-model-kicker, .amp-model-score span { color: rgba(255,255,255,.72); }
.amp-model-score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.amp-model-score strong { color: #ffdb4d; font-size: 1.55rem; }
.amp-model-score small { margin-top: .15rem; color: rgba(255,255,255,.78); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.amp-model-evidence-card { display: block; }
.amp-model-evidence-label { display: block; margin-bottom: .75rem; color: #1a0a3c; }
.amp-model-evidence-values { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.amp-model-evidence-values span { padding: .65rem .7rem; border-radius: 10px; background: #f1f5f9; }
.amp-model-evidence-values small { color: #64748b; font-size: .72rem; font-weight: 600; }
.amp-model-evidence-values strong { margin-top: .15rem; color: #0f172a; font-size: 1.1rem; }
@media (max-width: 560px) { .amp-match-facts-grid, .amp-model-evidence-grid { grid-template-columns: 1fr; } .amp-model-summary { align-items: flex-start; flex-direction: column; } .amp-model-score { align-items: flex-start; text-align: left; } }

/* --- Unified grounded article sections --- */
.amp-professional-section { margin: 1.75rem 0; }
.amp-section-heading { margin-bottom: .9rem; }
.amp-section-heading h2 { margin: 0 0 .35rem; color: #1a0a3c; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.amp-section-heading p { margin: 0; color: #64748b; font-size: .9rem; line-height: 1.5; }
.amp-match-preview-card { padding: 1.25rem; border: 1px solid #e5e7eb; border-radius: 16px; background: linear-gradient(145deg, #fff, #f8fafc); box-shadow: 0 8px 22px rgba(15, 23, 42, .07); }
.amp-match-preview-card > strong { display: block; color: #0f172a; font-size: clamp(1.2rem, 3vw, 1.7rem); line-height: 1.3; }
.amp-match-preview-card > strong span { color: #94a3b8; font-size: .9em; }
.amp-match-preview-card > span { display: block; margin-top: .35rem; color: #64748b; font-weight: 600; }
.amp-match-preview-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-top: 1rem; }
.amp-match-preview-meta span { display: flex; flex-direction: column; padding: .75rem; border-radius: 11px; background: #f1f5f9; color: #0f172a; font-weight: 700; }
.amp-match-preview-meta small { margin-bottom: .2rem; color: #64748b; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.amp-form-cards, .amp-goal-cards, .amp-standing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.amp-form-team-card, .amp-goal-team-card, .amp-standing-card { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .055); }
.amp-form-team-card strong, .amp-goal-team-card strong, .amp-standing-card strong { color: #1a0a3c; font-size: 1rem; }
.amp-form-team-card span { padding: .75rem; border-radius: 10px; color: #0f172a; background: #f1f5f9; font-weight: 700; letter-spacing: .08em; }
.amp-goal-team-card span, .amp-standing-card span { color: #64748b; font-size: .9rem; }
.amp-goal-team-card b, .amp-standing-card b { color: #0f172a; font-size: 1.15rem; }
.amp-h2h-summary-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: .7rem; padding: 1rem; border-radius: 16px; background: linear-gradient(135deg, #1a0a3c, #39217a); box-shadow: 0 10px 24px rgba(26, 10, 60, .18); }
.amp-h2h-summary-card > div { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .45rem; text-align: center; }
.amp-h2h-summary-card strong { color: #ffdb4d; font-size: 1.35rem; }
.amp-h2h-summary-card span { color: rgba(255,255,255,.82); font-size: .75rem; line-height: 1.25; }
@media (max-width: 560px) { .amp-form-cards, .amp-goal-cards, .amp-standing-cards { grid-template-columns: 1fr; } }


/* --- Cross-screen responsive hardening --- */
.amp-prediction-grid,
.amp-internal-links__grid,
.amp-match-facts-grid,
.amp-model-evidence-grid,
.amp-form-cards,
.amp-goal-cards,
.amp-standing-cards,
.amp-h2h-summary-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.amp-prediction-grid > *,
.amp-internal-links__grid > *,
.amp-match-facts-grid > *,
.amp-model-evidence-grid > *,
.amp-form-cards > *,
.amp-goal-cards > *,
.amp-standing-cards > *,
.amp-h2h-summary-card > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.amp-prediction-card,
.amp-single-card-wrapper,
.amp-internal-links,
.amp-professional-section,
.amp-verified-facts,
.amp-match-insights {
    max-width: 100%;
    box-sizing: border-box;
}
.amp-team-name,
.amp-card-league,
.amp-related-card__title,
.amp-match-fact-body strong,
.amp-match-preview-card,
.amp-form-team-card,
.amp-goal-team-card,
.amp-standing-card,
.amp-section-heading,
.amp-model-summary,
.amp-model-evidence-card {
    overflow-wrap: anywhere;
    word-break: normal;
}
.amp-card-teams { min-width: 0; gap: .5rem; }
.amp-team { min-width: 0; max-width: 45%; }
.amp-team-name { min-width: 0; }
.amp-team-logo { flex: 0 0 auto; }
.amp-insights-table-wrap,
.amp-odds-table-container,
.amp-league-table-container,
.amp-h2h-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.amp-insights-table,
.amp-odds-table,
.amp-league-table,
.amp-h2h-table {
    max-width: none;
}
.amp-insights-table th,
.amp-insights-table td,
.amp-odds-table th,
.amp-odds-table td,
.amp-league-table th,
.amp-league-table td,
.amp-h2h-table th,
.amp-h2h-table td {
    overflow-wrap: anywhere;
    word-break: normal;
}
.amp-model-summary { min-width: 0; }
.amp-model-summary > div { min-width: 0; }
.amp-model-score { min-width: 5.5rem; }
.amp-model-evidence-values { min-width: 0; }
.amp-model-evidence-values span { min-width: 0; overflow-wrap: anywhere; }
.amp-h2h-summary-card { overflow-wrap: anywhere; }
@media (max-width: 767px) {
    .amp-prediction-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .amp-prediction-card { padding: 1rem; }
    .amp-card-teams { align-items: flex-start; }
    .amp-team { width: 44%; max-width: 44%; gap: .45rem; }
    .amp-team-home { justify-content: flex-start; flex-direction: row-reverse; text-align: left; }
    .amp-team-away { justify-content: flex-start; text-align: left; }
    .amp-team-name { font-size: clamp(.82rem, 3.5vw, 1rem); }
    .amp-team-logo { width: 30px; height: 30px; }
    .amp-team-separator { flex: 0 0 auto; }
    .amp-internal-links,
    .amp-professional-section,
    .amp-match-insights { margin-left: 0; margin-right: 0; padding-left: .85rem; padding-right: .85rem; }
    .amp-match-preview-meta { grid-template-columns: minmax(0, 1fr); }
    .amp-model-evidence-values { grid-template-columns: minmax(0, 1fr); }
    .amp-h2h-summary-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .amp-insights-table,
    .amp-odds-table,
    .amp-league-table,
    .amp-h2h-table { font-size: .8rem; }
}
@media (max-width: 380px) {
    .amp-prediction-card { padding: .8rem; }
    .amp-card-teams { gap: .25rem; }
    .amp-team { width: 43%; max-width: 43%; }
    .amp-team-name { font-size: .78rem; }
    .amp-team-logo { width: 26px; height: 26px; }
    .amp-h2h-summary-card { grid-template-columns: minmax(0, 1fr); }
    .amp-match-fact-card,
    .amp-model-evidence-card,
    .amp-form-team-card,
    .amp-goal-team-card,
    .amp-standing-card { padding: .8rem; }
}
@media (min-width: 768px) and (max-width: 1100px) {
    .amp-prediction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .amp-internal-links__grid,
    .amp-match-facts-grid,
    .amp-model-evidence-grid,
    .amp-form-cards,
    .amp-goal-cards,
    .amp-standing-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .amp-related-card__link,
    .amp-prediction-card,
    .amp-card-cta-button { transition: none; }
}


/* --- Professional feed toolbar and Load More control --- */
.amp-filter-wrapper { width: 100%; max-width: 1120px; margin: 0 auto 2rem; box-sizing: border-box; }
.amp-filter-panel { padding: 1rem; border: 1px solid rgba(226,232,240,.9); border-radius: 20px; background: linear-gradient(145deg, #ffffff, #f8fafc); box-shadow: 0 12px 30px rgba(15,23,42,.07); }
.amp-filter-toggle { display: none; }
.amp-filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; justify-content: stretch; }
.amp-select-wrapper { min-width: 0; position: relative; }
.amp-select-wrapper:after { content: '⌄'; position: absolute; right: 1rem; top: 50%; color: #64748b; pointer-events: none; transform: translateY(-55%); }
.amp-filter-bar select { width: 100%; min-width: 0; height: 48px; padding: 0 2.3rem 0 1rem; border: 1px solid #dbe3ee; border-radius: 12px; background: #fff; color: #172033; font-weight: 700; appearance: none; }
.amp-filter-bar select:focus { outline: 3px solid rgba(124,58,237,.18); border-color: #7c3aed; }
.amp-filter-reset { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin-top: .85rem; padding: .55rem 1rem; border: 0; border-radius: 10px; background: #ede9fe; color: #5b21b6; cursor: pointer; font-weight: 800; }
.amp-filter-reset:hover { background: #ddd6fe; }
.amp-filter-active-count { display: none; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .25rem; border-radius: 999px; background: #ffdb4d; color: #1a0a3c; font-size: .72rem; font-weight: 900; }
.amp-prediction-grid { transition: opacity .2s ease; }
.amp-prediction-grid.is-loading { opacity: .48; pointer-events: none; }
.amp-load-more-wrap { display: flex; justify-content: center; margin: 2rem 0 .5rem; }
.amp-load-more { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-width: 210px; min-height: 48px; padding: .75rem 1.25rem; border: 1px solid #6d28d9; border-radius: 999px; background: linear-gradient(135deg, #6d28d9, #9333ea); color: #fff; cursor: pointer; font-weight: 850; box-shadow: 0 8px 18px rgba(109,40,217,.22); transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.amp-load-more:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(109,40,217,.3); }
.amp-load-more:focus-visible { outline: 3px solid rgba(255,219,77,.9); outline-offset: 3px; }
.amp-load-more:disabled { cursor: default; opacity: .7; }
.amp-load-more-spinner { display: none; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; }
.amp-load-more.is-loading .amp-load-more-spinner { display: inline-block; animation: amp-spin .7s linear infinite; }
@keyframes amp-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
    .amp-filter-wrapper { margin-bottom: 1.25rem; }
    .amp-filter-toggle { display: flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; min-height: 48px; padding: .7rem 1rem; border: 1px solid #ddd6fe; border-radius: 14px; background: linear-gradient(135deg, #faf5ff, #fff); color: #5b21b6; cursor: pointer; font-weight: 850; }
    .amp-filter-toggle[aria-expanded="true"] { border-radius: 14px 14px 0 0; }
    .amp-filter-toggle-icon { font-size: 1.05rem; }
    .amp-filter-active-count { display: inline-flex; }
    .amp-filter-panel { display: none; padding: .85rem; border-top: 0; border-radius: 0 0 14px 14px; box-shadow: 0 10px 22px rgba(15,23,42,.08); }
    .amp-filter-panel.is-open { display: block; }
    .amp-filter-bar { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .amp-filter-reset { width: 100%; margin-top: .7rem; }
    .amp-load-more { width: min(100%, 320px); }
}
@media (prefers-reduced-motion: reduce) { .amp-prediction-grid, .amp-load-more { transition: none; } .amp-load-more.is-loading .amp-load-more-spinner { animation: none; } }

/* --- Detailed Match Analytics --- */
.amp-detailed-analytics{margin:2rem 0;padding:clamp(1rem,2.5vw,1.5rem);border:1px solid rgba(92,57,160,.14);border-radius:18px;background:linear-gradient(145deg,#fff,#faf8ff);box-shadow:0 10px 28px rgba(35,18,73,.08);min-width:0;overflow:hidden}.amp-detailed-analytics .amp-section-heading{margin-bottom:1rem}.amp-analytics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;min-width:0}.amp-analytics-card{min-width:0;padding:1rem;border:1px solid rgba(92,57,160,.12);border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(35,18,73,.05)}.amp-analytics-label{display:block;margin-bottom:.75rem;color:#5c399f;font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;overflow-wrap:anywhere}.amp-analytics-card>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.amp-analytics-card small{display:block;color:#6b6478;font-size:.72rem;overflow-wrap:anywhere}.amp-analytics-card strong{display:block;margin-top:.2rem;color:#211638;font-size:1.25rem;line-height:1.15;overflow-wrap:anywhere}@media (max-width:520px){.amp-detailed-analytics{margin:1.25rem 0;padding:.85rem;border-radius:14px}.amp-analytics-grid{grid-template-columns:1fr;gap:9px}.amp-analytics-card{padding:.85rem}.amp-analytics-card strong{font-size:1.1rem}}@media (prefers-reduced-motion:reduce){.amp-detailed-analytics *{transition:none!important;animation:none!important}}


/* --- Public Prediction Performance --- */
.amp-performance { --amp-performance-ink:#0f172a; --amp-performance-muted:#64748b; --amp-performance-blue:#2563eb; --amp-performance-green:#16a34a; --amp-performance-red:#dc2626; max-width:1100px; margin:2.5rem auto; color:var(--amp-performance-ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
.amp-performance-hero { padding:clamp(1.5rem,4vw,3rem); border-radius:24px; color:#fff; background:linear-gradient(135deg,#111827 0%,#1e3a8a 58%,#2563eb 100%); box-shadow:0 18px 45px rgba(15,23,42,.18); }
.amp-performance-kicker { display:inline-block; margin-bottom:.65rem; color:#bfdbfe; font-size:.78rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.amp-performance-hero h2 { margin:0; color:#fff; font-size:clamp(1.8rem,4vw,3rem); line-height:1.08; }
.amp-performance-hero p { max-width:650px; margin:1rem 0 0; color:#dbeafe; line-height:1.6; }
.amp-performance-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin:-1.5rem 1.25rem 1.75rem; position:relative; }
.amp-performance-summary div { padding:1.25rem; border:1px solid #e2e8f0; border-radius:16px; background:#fff; box-shadow:0 10px 25px rgba(15,23,42,.08); text-align:center; }
.amp-performance-summary span { display:block; color:var(--amp-performance-muted); font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.amp-performance-summary strong { display:block; margin-top:.4rem; color:var(--amp-performance-ink); font-size:clamp(1.6rem,3vw,2.35rem); }
.amp-performance-filters { display:grid; grid-template-columns:repeat(3,1fr) auto; gap:1rem; align-items:end; padding:1.25rem; border:1px solid #e2e8f0; border-radius:18px; background:#f8fafc; }
.amp-performance-filters label { display:flex; flex-direction:column; gap:.4rem; color:var(--amp-performance-muted); font-size:.82rem; font-weight:800; }
.amp-performance-filters select { min-height:44px; padding:.65rem .8rem; border:1px solid #cbd5e1; border-radius:10px; background:#fff; color:var(--amp-performance-ink); font:inherit; }
.amp-performance-filters button { min-height:44px; padding:.65rem 1.1rem; border:0; border-radius:10px; background:var(--amp-performance-blue); color:#fff; font-weight:800; cursor:pointer; }
.amp-performance-results { margin-top:1.75rem; overflow:hidden; border:1px solid #e2e8f0; border-radius:18px; background:#fff; box-shadow:0 8px 25px rgba(15,23,42,.05); }
.amp-performance-results-heading { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.25rem 1.4rem; border-bottom:1px solid #e2e8f0; }
.amp-performance-results-heading h3 { margin:0; font-size:1.25rem; }
.amp-performance-results-heading span { color:var(--amp-performance-muted); font-size:.9rem; }
.amp-performance-table-wrap { overflow-x:auto; }
.amp-performance table { width:100%; min-width:700px; border-collapse:collapse; text-align:left; }
.amp-performance th,.amp-performance td { padding:1rem 1.1rem; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.amp-performance thead th { background:#f8fafc; color:var(--amp-performance-muted); font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; }
.amp-performance tbody th { font-weight:750; }
.amp-performance tbody th a { color:var(--amp-performance-ink); text-decoration:none; }
.amp-performance tbody th a:hover { color:var(--amp-performance-blue); }
.amp-performance-result { display:inline-flex; padding:.35rem .65rem; border-radius:999px; font-size:.75rem; font-weight:800; }
.amp-performance-correct { background:#dcfce7; color:#166534; }
.amp-performance-incorrect { background:#fee2e2; color:#991b1b; }
.amp-performance-empty { padding:2.5rem 1.5rem; color:var(--amp-performance-muted); text-align:center; }
@media(max-width:700px){ .amp-performance-summary,.amp-performance-filters{grid-template-columns:1fr}.amp-performance-summary{margin-left:.5rem;margin-right:.5rem}.amp-performance-results-heading{align-items:flex-start;flex-direction:column} }

.amp-performance-load-more { padding:1.25rem; border-top:1px solid #e2e8f0; text-align:center; background:#f8fafc; }
.amp-performance-load-more a { display:inline-flex; align-items:center; gap:.55rem; padding:.75rem 1.25rem; border-radius:999px; background:#2563eb; color:#fff; font-weight:800; text-decoration:none; box-shadow:0 6px 15px rgba(37,99,235,.2); transition:transform .2s ease,background .2s ease; }
.amp-performance-load-more a:hover { background:#1d4ed8; transform:translateY(-2px); color:#fff; }

@media(max-width:700px){
  .amp-performance-table-wrap { overflow:visible; }
  .amp-performance table,.amp-performance thead,.amp-performance tbody,.amp-performance tr,.amp-performance th,.amp-performance td { display:block; width:100%; min-width:0; }
  .amp-performance thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .amp-performance tbody tr { margin:0; padding:1rem; border-bottom:1px solid #e2e8f0; background:#fff; }
  .amp-performance tbody tr:last-child { border-bottom:0; }
  .amp-performance tbody th,.amp-performance tbody td { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; padding:.65rem 0; border:0; text-align:right; line-height:1.4; }
  .amp-performance tbody th { display:block; padding-top:.1rem; padding-bottom:.8rem; text-align:left; font-size:1rem; }
  .amp-performance tbody th a { display:block; }
  .amp-performance tbody td:before { flex:0 0 34%; color:var(--amp-performance-muted); font-size:.72rem; font-weight:800; letter-spacing:.04em; text-align:left; text-transform:uppercase; content:attr(data-label); }
  .amp-performance tbody td { color:var(--amp-performance-ink); font-size:.9rem; }
  .amp-performance tbody td .amp-performance-result { margin-left:auto; }
}


/* --- Automatic prediction evidence cards --- */
.amp-evidence-stack { display: grid; gap: 16px; margin-top: 6px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.amp-evidence-card { background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%); border: 1px solid #e6eaf0; border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(26,10,60,.06); }
.amp-evidence-primary { background: linear-gradient(135deg, #f8fff7 0%, #ffffff 70%); border-color: #ccebd2; }
.amp-evidence-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.amp-evidence-heading h2 { margin: 0; color: #1a0a3c; font-size: 16px; line-height: 1.2; font-weight: 800; }
.amp-evidence-heading small { margin-left: auto; color: #68707a; font-size: 10px; font-weight: 600; }
.amp-evidence-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #e7f8eb; color: #16833b; font-size: 17px; font-weight: 800; }
.amp-xg-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.amp-xg-grid div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.amp-xg-grid strong { color: #1a0a3c; font-size: 25px; line-height: 1; }
.amp-xg-grid span { color: #68707a; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amp-xg-total { padding: 7px 12px; border-left: 1px solid #e4e8ee; border-right: 1px solid #e4e8ee; }
.amp-xg-total strong { color: #16833b; font-size: 18px; }
.amp-evidence-bar, .amp-mini-bar, .amp-stat-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #e9edf1; }
.amp-evidence-bar { margin-top: 16px; }
.amp-evidence-bar span, .amp-mini-bar span, .amp-stat-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #18a957, #7bdc62); }
.amp-market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; }
.amp-market-item > div:first-child, .amp-stat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.amp-market-item span, .amp-stat-row span { color: #4b5563; font-size: 11px; font-weight: 650; }
.amp-market-item strong, .amp-stat-row strong { color: #16833b; font-size: 13px; white-space: nowrap; }
.amp-mini-bar { height: 5px; margin-top: 5px; }
.amp-mini-bar span { background: #2563eb; }
.amp-comparison-head, .amp-comparison-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; align-items: center; text-align: center; }
.amp-comparison-head { color: #1a0a3c; font-size: 11px; padding-bottom: 7px; border-bottom: 1px solid #e9edf1; }
.amp-comparison-row { padding: 9px 0; border-bottom: 1px solid #eef1f4; }
.amp-comparison-row:last-child { border-bottom: 0; padding-bottom: 0; }
.amp-comparison-row span { color: #1a0a3c; font-size: 12px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amp-comparison-row b { color: #68707a; font-size: 10px; font-weight: 700; }
.amp-stat-row { margin: 11px 0; }
.amp-stat-row > span { flex: 0 0 34%; }
.amp-stat-bar { flex: 1; }
.amp-stat-bar span { background: linear-gradient(90deg, #119bd0, #45c9ef); }
.amp-evidence-note, .amp-evidence-disclaimer { color: #68707a; font-size: 11px; line-height: 1.45; margin: 12px 0 0; }
.amp-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.amp-summary-grid div { min-width: 0; }
.amp-summary-grid strong { display: block; color: #16833b; font-size: 19px; line-height: 1.1; }
.amp-summary-grid span { display: block; color: #68707a; font-size: 9px; line-height: 1.2; margin-top: 4px; }
.amp-quality-card { background: #101d3b; border-color: #21345d; }
.amp-quality-card .amp-evidence-heading h2, .amp-quality-card .amp-evidence-heading small { color: #fff; }
.amp-quality-label { margin-left: auto; font-size: 11px; letter-spacing: .6px; }
.amp-quality-strong { color: #7bdc62; }.amp-quality-moderate { color: #ffd166; }.amp-quality-limited { color: #ff9b9b; }
.amp-quality-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.amp-quality-list span { color: #c9d4eb; font-size: 11px; display: flex; justify-content: space-between; gap: 7px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 6px; }
.amp-quality-list b { color: #fff; font-weight: 700; text-align: right; }
.amp-evidence-disclaimer { max-width: 650px; margin: 10px auto 24px; text-align: center; }
@media (max-width: 520px) {
    .amp-evidence-card { padding: 14px; border-radius: 13px; }
    .amp-market-grid { grid-template-columns: 1fr; gap: 10px; }
    .amp-summary-grid { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
    .amp-quality-list { grid-template-columns: 1fr; }
    .amp-evidence-heading h2 { font-size: 14px; }
    .amp-evidence-heading small { font-size: 9px; }
}


/* --- Premium Match Information and Form and Statistics cards --- */
.amp-match-insights { margin: 42px 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.amp-insights-section-heading, .amp-insights-subheading { margin: 0 0 18px; padding: 22px 24px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 92% 10%, rgba(87, 211, 106, .22), transparent 34%), linear-gradient(135deg, #101d3b 0%, #1a0a3c 100%); box-shadow: 0 14px 34px rgba(16, 29, 59, .18); }
.amp-insights-subheading { margin-top: 30px; background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%); color: #1a0a3c; border: 1px solid #e1e8f2; box-shadow: 0 10px 26px rgba(26, 10, 60, .06); }
.amp-insights-kicker { display: block; color: #7bdc62; text-transform: uppercase; letter-spacing: 1.6px; font-size: 10px; font-weight: 850; margin-bottom: 8px; }
.amp-insights-subheading .amp-insights-kicker { color: #2563eb; }
.amp-insights-section-heading h2, .amp-insights-subheading h2 { margin: 0; font-size: clamp(20px, 3vw, 30px); line-height: 1.15; font-weight: 850; }
.amp-insights-section-heading h2 span { color: #7bdc62; font-weight: 500; }
.amp-insights-section-heading p, .amp-insights-subheading p { margin: 7px 0 0; color: #c9d4eb; font-size: 12px; }
.amp-insights-subheading p { color: #68707a; }
.amp-insight-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.amp-match-fact-card { display: flex; align-items: center; gap: 12px; min-height: 86px; padding: 16px; border: 1px solid #e3e9f0; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(26, 10, 60, .06); transition: transform .2s ease, box-shadow .2s ease; }
.amp-match-fact-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(26, 10, 60, .1); }
.amp-match-fact-icon { display: inline-flex; flex: 0 0 38px; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 12px; color: #16833b; background: linear-gradient(135deg, #e6fae9, #c9f2d3); font-size: 20px; }
.amp-match-fact-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.amp-match-fact-label { color: #7b8491; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .5px; }
.amp-match-fact-body strong { color: #1a0a3c; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.amp-form-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.amp-form-card, .amp-stat-comparison-card, .amp-h2h-summary-card { border: 1px solid #e3e9f0; border-radius: 18px; background: #fff; padding: 18px; box-shadow: 0 10px 28px rgba(26, 10, 60, .07); }
.amp-form-card-home { border-top: 4px solid #18a957; }.amp-form-card-away { border-top: 4px solid #2563eb; }
.amp-form-card-header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.amp-form-team-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #18a957; box-shadow: 0 0 0 4px #e5f8e9; }.amp-form-card-away .amp-form-team-dot { background: #2563eb; box-shadow: 0 0 0 4px #e7efff; }
.amp-form-card h3 { flex: 1; min-width: 0; margin: 0; color: #1a0a3c; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amp-form-sample { color: #7b8491; font-size: 9px; text-align: right; }
.amp-form-sequence { display: flex; gap: 7px; margin: 18px 0; }
.amp-form-sequence span { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 850; }.amp-form-sequence .is-win { background: #18a957; }.amp-form-sequence .is-loss { background: #e54b4b; }.amp-form-sequence .is-draw { background: #9aa5b3; }
.amp-form-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }.amp-form-stat-grid div { padding: 10px; border-radius: 11px; background: #f7f9fc; }.amp-form-stat-grid span { display: block; color: #7b8491; font-size: 9px; line-height: 1.25; }.amp-form-stat-grid strong { display: block; margin-top: 4px; color: #1a0a3c; font-size: 17px; }
.amp-stat-comparison-card { margin-top: 16px; background: linear-gradient(145deg, #ffffff, #f8fbff); }.amp-insights-card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }.amp-insights-card-title span { color: #16833b; font-size: 21px; }.amp-insights-card-title h3 { margin: 0; color: #1a0a3c; font-size: 16px; }.amp-goal-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr 42px; align-items: center; gap: 12px; margin: 12px 0; }.amp-goal-row > span { color: #4b5563; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.amp-goal-row strong { color: #1a0a3c; text-align: right; font-size: 16px; }.amp-goal-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e8edf3; }.amp-goal-fill { display: block; height: 100%; border-radius: inherit; }.amp-goal-fill-home { background: linear-gradient(90deg, #18a957, #7bdc62); }.amp-goal-fill-away { background: linear-gradient(90deg, #2563eb, #61a3ff); }
.amp-h2h-summary-card { margin-top: 16px; }.amp-summary-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }.amp-summary-stat-grid div { padding: 12px 8px; text-align: center; border-radius: 12px; background: #f7f9fc; }.amp-summary-stat-grid span { display: block; color: #7b8491; font-size: 9px; line-height: 1.25; }.amp-summary-stat-grid strong { display: block; margin-top: 5px; color: #16833b; font-size: 19px; }
@media (max-width: 640px) { .amp-insights-section-heading, .amp-insights-subheading { padding: 18px; border-radius: 16px; }.amp-form-cards { grid-template-columns: 1fr; }.amp-match-fact-card { min-height: 74px; padding: 13px; }.amp-form-card, .amp-stat-comparison-card, .amp-h2h-summary-card { padding: 14px; }.amp-goal-row { grid-template-columns: minmax(78px, 1fr) 1.5fr 35px; gap: 8px; }.amp-form-card h3 { font-size: 14px; }.amp-form-sample { font-size: 8px; } }


/* --- H2H contrast fix and confirmed lineup formation card --- */
.amp-match-insights .amp-h2h-summary-card { color: #fff; background: linear-gradient(135deg, #101d3b 0%, #39217a 100%); border: 1px solid rgba(123,220,98,.35); box-shadow: 0 14px 32px rgba(16,29,59,.2); }
.amp-match-insights .amp-h2h-summary-card .amp-insights-card-title h3 { color: #fff; }
.amp-match-insights .amp-h2h-summary-card .amp-insights-card-title span { color: #7bdc62; }
.amp-match-insights .amp-h2h-summary-card .amp-summary-stat-grid div { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); }
.amp-match-insights .amp-h2h-summary-card .amp-summary-stat-grid span { color: rgba(255,255,255,.82); }
.amp-match-insights .amp-h2h-summary-card .amp-summary-stat-grid strong { color: #ffdb4d; }
.amp-lineup-card { padding: 20px; border-radius: 20px; background: linear-gradient(145deg, #f8fbff 0%, #eef5ff 100%); border: 1px solid #dbe7f5; box-shadow: 0 12px 30px rgba(26,10,60,.08); }
.amp-lineup-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }.amp-lineup-heading h2 { margin: 0; color: #1a0a3c; font-size: 18px; }.amp-lineup-heading p { margin: 3px 0 0; color: #68707a; font-size: 11px; }
.amp-lineup-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }.amp-lineup-side { min-width: 0; }.amp-lineup-side-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }.amp-lineup-side-header strong { color: #1a0a3c; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.amp-lineup-side-header span { color: #2563eb; font-size: 9px; white-space: nowrap; }
.amp-football-pitch { position: relative; min-height: 350px; overflow: hidden; border-radius: 14px; border: 2px solid rgba(255,255,255,.78); background: repeating-linear-gradient(0deg, #35b957 0, #35b957 49px, #43c663 50px, #43c663 99px); box-shadow: inset 0 0 0 1px rgba(16,29,59,.12); }
.amp-football-pitch:before, .amp-football-pitch:after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.8); }.amp-football-pitch:before { top: -1px; width: 46%; height: 20%; border-top: 0; }.amp-football-pitch:after { bottom: -1px; width: 46%; height: 20%; border-bottom: 0; }.amp-pitch-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(255,255,255,.8); }.amp-pitch-circle { position: absolute; top: 50%; left: 50%; width: 20%; aspect-ratio: 1; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.8); border-radius: 50%; }
.amp-pitch-player { position: relative; z-index: 2; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 25%; min-height: 48px; margin: 5px 0; vertical-align: top; color: #fff; text-align: center; }.amp-pitch-player b { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%; background: #17244a; border: 2px solid #fff; color: #ffdb4d; font-size: 9px; box-shadow: 0 2px 5px rgba(0,0,0,.25); }.amp-pitch-player small { display: block; max-width: 92%; margin-top: 3px; color: #fff; font-size: 8px; font-weight: 750; line-height: 1.1; text-shadow: 0 1px 2px rgba(0,0,0,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .amp-lineup-card { padding: 14px; }.amp-lineup-columns { grid-template-columns: 1fr; }.amp-football-pitch { min-height: 310px; }.amp-lineup-side-header span { font-size: 8px; } }


/* --- Final H2H summary contrast override --- */
.amp-h2h-summary-card,
.amp-match-insights .amp-h2h-summary-card {
    color: #ffffff !important;
    background: linear-gradient(135deg, #101d3b 0%, #39217a 100%) !important;
    border: 1px solid rgba(123, 220, 98, .38) !important;
    box-shadow: 0 14px 32px rgba(16, 29, 59, .2) !important;
}
.amp-h2h-summary-card > div,
.amp-match-insights .amp-h2h-summary-card > div {
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    border-radius: 12px;
}
.amp-h2h-summary-card span,
.amp-match-insights .amp-h2h-summary-card span {
    color: rgba(255, 255, 255, .88) !important;
}
.amp-h2h-summary-card strong,
.amp-match-insights .amp-h2h-summary-card strong {
    color: #ffdb4d !important;
}
.amp-h2h-summary-card h3,
.amp-h2h-summary-card h2,
.amp-match-insights .amp-h2h-summary-card h3,
.amp-match-insights .amp-h2h-summary-card h2 {
    color: #ffffff !important;
}


/* --- Formation-aware player positioning --- */
.amp-football-pitch .amp-pitch-player { position: absolute; top: 0; left: 0; width: 25%; min-height: 48px; margin: 0; transform: translate(-50%, -50%); }


/* --- Why this prediction and data-quality cards --- */
.amp-prediction-rationale-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:22px 0}.amp-rationale-card{background:linear-gradient(145deg,#071a3a,#0c2b5a);border:1px solid rgba(101,157,255,.35);border-radius:18px;padding:22px;color:#fff;box-shadow:0 14px 35px rgba(4,18,50,.14)}.amp-rationale-heading{display:flex;align-items:center;gap:14px;border-bottom:1px solid rgba(255,255,255,.16);padding-bottom:16px;margin-bottom:8px}.amp-rationale-heading h2{margin:2px 0 0;color:#fff;font-size:1.35rem}.amp-rationale-kicker{color:#9fc3ff;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.amp-rationale-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:linear-gradient(145deg,#1264dc,#183b99);font-size:1.5rem}.amp-rationale-row{display:grid;grid-template-columns:38px 1fr 22px;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.12)}.amp-rationale-row:last-child{border-bottom:0}.amp-rationale-row-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(38,111,235,.3);color:#dceaff}.amp-rationale-row strong,.amp-rationale-row small{display:block}.amp-rationale-row strong{font-size:.95rem}.amp-rationale-row small{color:#bdd0ed;margin-top:3px}.amp-rationale-check{color:#72f0c5;font-size:1.15rem}.amp-quality-meter{position:relative;height:18px;background:#21395f;border-radius:999px;margin:24px 0 8px;overflow:hidden}.amp-quality-meter span{display:block;height:100%;width:var(--amp-quality-score);background:linear-gradient(90deg,#2f75ff,#6be1bd);border-radius:inherit}.amp-quality-meter strong{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:1.1rem;color:#fff}.amp-quality-caption{margin:0 0 18px;color:#a8f2d3;text-align:center}.amp-quality-factors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.amp-quality-factors span{padding:9px 8px;border-radius:9px;background:rgba(255,255,255,.08);font-size:.78rem;text-align:center;color:#d9e8ff}@media(max-width:700px){.amp-prediction-rationale-grid{grid-template-columns:1fr;gap:14px}.amp-rationale-card{padding:17px}.amp-rationale-heading h2{font-size:1.15rem}}


/* --- Configured bookmaker comparison card --- */
.amp-bookmaker-comparison-card{margin:24px 0;padding:24px;border-radius:18px;background:linear-gradient(145deg,#071a3a,#0c2b5a);border:1px solid rgba(101,157,255,.35);color:#fff;box-shadow:0 14px 35px rgba(4,18,50,.14)}.amp-bookmaker-card-heading{display:flex;align-items:center;gap:14px;border-bottom:1px solid rgba(255,255,255,.16);padding-bottom:18px}.amp-bookmaker-card-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:14px;background:linear-gradient(145deg,#1264dc,#183b99);font-size:1.5rem}.amp-bookmaker-kicker{display:block;color:#9fc3ff;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.amp-bookmaker-card-heading h2{margin:3px 0 0;color:#fff;font-size:1.45rem}.amp-bookmaker-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.amp-bookmaker-summary span{padding:13px 15px;border-radius:12px;background:rgba(255,255,255,.08)}.amp-bookmaker-summary small,.amp-bookmaker-summary strong{display:block}.amp-bookmaker-summary small{color:#b7cbea;font-size:.78rem}.amp-bookmaker-summary strong{color:#fff;margin-top:3px}.amp-bookmaker-summary span:nth-child(2) strong{color:#72f0c5;font-size:1.2rem}.amp-bookmaker-offer-row{display:grid;grid-template-columns:minmax(150px,1fr) 90px 90px 132px;gap:14px;align-items:center;padding:15px 0;border-top:1px solid rgba(255,255,255,.13)}.amp-bookmaker-offer-row.is-best-listed{margin-inline:-10px;padding-inline:10px;background:rgba(71,212,173,.08);border-radius:10px}.amp-bookmaker-name{display:flex;align-items:center;gap:10px}.amp-bookmaker-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#102754;color:#fff;font-weight:800}.amp-bookmaker-name strong{font-size:.98rem}.amp-bookmaker-price small,.amp-bookmaker-price strong{display:block}.amp-bookmaker-price small{color:#b7cbea;font-size:.72rem}.amp-bookmaker-price strong{font-size:1.15rem}.amp-bookmaker-view-offer{display:flex;justify-content:center;align-items:center;gap:8px;padding:11px 12px;border-radius:9px;background:#1769e8;color:#fff!important;text-decoration:none!important;font-weight:700;transition:transform .2s,background .2s}.amp-bookmaker-view-offer:hover{background:#3280f5;transform:translateY(-1px)}.amp-bookmaker-view-offer span{font-size:1.35rem;line-height:.7}.amp-bookmaker-disclosure{margin:18px 0 0;padding-top:15px;border-top:1px solid rgba(255,255,255,.14);color:#b7cbea;font-size:.78rem;text-align:center}@media(max-width:700px){.amp-bookmaker-comparison-card{padding:17px}.amp-bookmaker-summary{grid-template-columns:1fr 1fr}.amp-bookmaker-summary span:last-child{grid-column:1/-1}.amp-bookmaker-offer-row{grid-template-columns:1fr auto;gap:10px}.amp-bookmaker-price{display:none}.amp-bookmaker-view-offer{grid-column:2;grid-row:1}.amp-bookmaker-name{grid-column:1;grid-row:1}.amp-bookmaker-offer-row.is-best-listed{margin-inline:-6px;padding-inline:6px}.amp-bookmaker-card-heading h2{font-size:1.2rem}}


.amp-bookmaker-logo{width:36px;height:36px;min-width:36px;max-width:36px;object-fit:contain;border-radius:10px;background:#fff;padding:4px;display:block;box-sizing:border-box}
@media(max-width:700px){.amp-bookmaker-logo{width:34px;height:34px;min-width:34px;max-width:34px;padding:4px;border-radius:9px}.amp-bookmaker-name{min-width:0}.amp-bookmaker-name strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}


/* Keep the feed bookmaker CTA compact on desktop; mobile retains the existing full-width treatment. */
@media(min-width:769px){.amp-card-cta-button{display:table;width:max-content;min-width:150px;max-width:220px;margin:0 auto;padding:12px 24px;box-sizing:border-box}}


.amp-feed-card-item{min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:10px}.amp-feed-card-item .amp-prediction-card{height:100%;box-sizing:border-box}.amp-feed-card-item .amp-card-offer{text-align:center}


/* API-Football squad availability card */
.amp-availability-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.amp-availability-grid>div{padding:14px;border:1px solid rgba(92,57,160,.12);border-radius:14px;background:linear-gradient(145deg,#fff,#faf8ff);text-align:center}.amp-availability-grid strong{display:block;color:#211638;font-size:1.7rem;line-height:1}.amp-availability-grid span{display:block;margin-top:8px;color:#31224b;font-weight:800;font-size:.86rem}.amp-availability-grid small{display:block;margin-top:5px;color:#746b83;font-size:.74rem}@media(max-width:520px){.amp-availability-grid{grid-template-columns:1fr;gap:9px}.amp-availability-grid>div{padding:11px}}

/* Advanced API-Football evidence cards */
.amp-advanced-evidence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0}.amp-event-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.amp-event-stat-grid span{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 5px;border-radius:12px;background:#f6f8fc;color:#68738a;font-size:11px;text-align:center}.amp-event-stat-grid b{font-size:20px;line-height:1;color:#17244d}.amp-key-player-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.amp-key-player-columns>div{display:flex;flex-direction:column;gap:8px}.amp-key-player-columns>div>strong{color:#17244d;font-size:13px}.amp-key-player-columns span{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:10px;background:#f6f8fc;color:#26345b;font-size:12px}.amp-key-player-columns small{color:#71809b;font-size:10px;white-space:nowrap}@media(max-width:800px){.amp-advanced-evidence-grid{grid-template-columns:1fr}.amp-event-stat-grid{grid-template-columns:repeat(5,minmax(48px,1fr));overflow-x:auto}.amp-key-player-columns{grid-template-columns:1fr}}
