/* Prop Firm Rules Comparison hub (/prop-firm-rules)
   White-card theme: opaque #fff surfaces, dark text, purple gradient stays the
   page background only. Every container declares its own background so the page
   gradient can never bleed through and wash out contrast. */

/* The JS toggles the `hidden` attribute. The UA sheet's `[hidden]{display:none}`
   loses to any class selector that sets `display`, and this file sets display on
   .pfr-empty and (under 900px) on tbody rows - so without this the filters would
   appear to do nothing on mobile. Scoped, never a global !important. */
.pfr-row[hidden],
.pfr-empty[hidden],
.pfr-reset[hidden] { display: none !important; }

.pfr-intro {
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-radius: 12px;
    padding: 20px 24px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 20px;
}

.pfr-intro p { margin: 0; }

/* ---------- Filters ---------- */

.pfr-filters {
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.pfr-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pfr-filters__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pfr-filters__title i { color: #6366f1; font-size: 20px; }

.pfr-reset {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfr-reset:hover { background: #f8f9fa; border-color: #6366f1; }

.pfr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pfr-pill {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfr-pill i { font-size: 16px; color: #6366f1; transition: color 0.2s ease; }

.pfr-pill:hover {
    border-color: #6366f1;
    background: #f8f9fa;
    transform: translateY(-1px);
}

/* Slightly darker than the #6366f1 brand purple on purpose: white 13px text on
   #6366f1 measures 4.47:1, just under the 4.5 floor. #5b5ee8 reads as the same
   colour and clears it at 4.99:1. */
.pfr-pill[aria-pressed="true"] {
    background: #5b5ee8;
    border-color: #5b5ee8;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}

.pfr-pill[aria-pressed="true"] i { color: #fff; }

.pfr-search-wrap { margin-top: 16px; }

.pfr-search-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 6px;
}

.pfr-search-field { position: relative; }

.pfr-search-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
    pointer-events: none;
}

.pfr-search {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 11px 14px 11px 42px;
    font-size: 15px;
    color: #1a1a2e;
    transition: all 0.2s ease;
}

.pfr-search::placeholder { color: #6b7280; }

.pfr-search:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.pfr-count {
    margin: 14px 0 0;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* ---------- Matrix ---------- */

.pfr-table-wrap {
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.pfr-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
}

.pfr-caption {
    caption-side: top;
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    color: #666;
}

.pfr-table thead th {
    background: #f8f9fa;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    white-space: nowrap;
}

.pfr-table thead th i { display: block; font-size: 16px; color: #6366f1; margin-bottom: 3px; }

.pfr-th-firm { text-align: left !important; min-width: 190px; }

.pfr-table tbody tr { border-bottom: 1px solid #f1f2f4; transition: background 0.15s ease; }
.pfr-table tbody tr:last-child { border-bottom: none; }
.pfr-table tbody tr:hover { background: #f8f9fa; }

.pfr-firm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    font-weight: 600;
    text-align: left;
    background: transparent;
}

.pfr-firm__logo {
    border-radius: 7px;
    background: #fff;
    border: 1px solid #eef0f3;
    object-fit: contain;
    flex-shrink: 0;
}

.pfr-firm__link {
    color: #1a1a2e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.pfr-firm__link:hover { color: #6366f1; text-decoration: underline; }

.pfr-cell { padding: 12px 8px; text-align: center; vertical-align: middle; }

.pfr-cell__text {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.pfr-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 16px;
}

.pfr-cell--yes .pfr-mark, .pfr-mark--yes { background: #e7f8f0; color: #0a7d4e; }
.pfr-cell--no .pfr-mark, .pfr-mark--no { background: #fdeaea; color: #b32d2d; }
.pfr-cell--unknown .pfr-mark, .pfr-mark--unknown { background: #f1f2f4; color: #6b7280; }

.pfr-cell--yes .pfr-cell__text { color: #0a7d4e; font-weight: 600; }
.pfr-cell--no .pfr-cell__text { color: #b32d2d; font-weight: 600; }

.pfr-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 24px;
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    background: #fff;
}

.pfr-empty i { font-size: 26px; color: #9aa0a6; flex-shrink: 0; }

/* ---------- Legend + note ---------- */

.pfr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 14px 20px;
    margin-bottom: 20px;
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-radius: 12px;
}

.pfr-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #555;
    font-weight: 600;
}

.pfr-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-left: 3px solid #6366f1;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
}

.pfr-note i { color: #6366f1; font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.pfr-note p { margin: 0; color: #333; font-size: 13.5px; line-height: 1.7; }

/* ---------- FAQ ---------- */

.pfr-faq { margin-bottom: 28px; }

.pfr-faq__title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.pfr-faq__item {
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.pfr-faq__item[open] { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07); }

.pfr-faq__q {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pfr-faq__q::-webkit-details-marker { display: none; }

.pfr-faq__q::after {
    content: '+';
    font-size: 22px;
    font-weight: 400;
    color: #6366f1;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfr-faq__item[open] .pfr-faq__q::after { transform: rotate(45deg); }

.pfr-faq__a { padding: 0 20px 18px; }
.pfr-faq__a p { margin: 0; color: #333; font-size: 14px; line-height: 1.75; }

/* ---------- Cross-links ---------- */

.pfr-cross { margin-bottom: 40px; }

.pfr-cross__title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.pfr-cross__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.pfr-cross__card {
    background: var(--color-surface-card, #fff);
    border: 1px solid var(--color-border-default, #e5e7eb);
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfr-cross__card:hover {
    transform: translateY(-3px);
    border-color: #6366f1;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
    text-decoration: none;
}

.pfr-cross__card i { font-size: 22px; color: #6366f1; }
.pfr-cross__card strong { font-size: 15px; color: #1a1a2e; }
.pfr-cross__card span { font-size: 12.5px; color: #666; line-height: 1.55; }

/* ---------- Responsive: matrix becomes one card per firm ---------- */

@media (max-width: 900px) {
    .pfr-table-wrap { padding: 0; overflow-x: visible; background: transparent; border: none; }
    .pfr-table { display: block; background: transparent; }
    .pfr-caption { padding: 0 2px 12px; color: rgba(255, 255, 255, 0.85); }
    .pfr-table thead { display: none; }
    .pfr-table tbody { display: block; }

    .pfr-table tbody tr {
        display: block;
        background: var(--color-surface-card, #fff);
        border: 1px solid var(--color-border-default, #e5e7eb);
        border-radius: 14px;
        margin-bottom: 12px;
        padding: 6px 4px 10px;
    }

    .pfr-table tbody tr:hover { background: #fff; }

    .pfr-firm {
        border-bottom: 1px solid #f1f2f4;
        padding: 12px 14px;
        margin-bottom: 4px;
    }

    .pfr-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: right;
        padding: 9px 14px;
        min-height: 44px;
    }

    .pfr-cell::before {
        content: attr(data-label);
        font-size: 13px;
        font-weight: 600;
        color: #555;
        text-align: left;
    }

    .pfr-cell .pfr-mark { order: 2; width: 22px; height: 22px; font-size: 14px; }

    .pfr-cell__text {
        order: 1;
        margin-top: 0;
        margin-left: auto;
        font-size: 12.5px;
    }

    .pfr-legend { gap: 12px; }
    .pfr-filters { padding: 16px; }
}

@media (max-width: 480px) {
    .pfr-pill { font-size: 12.5px; padding: 9px 13px; }
    .pfr-faq__q { font-size: 14px; padding: 14px 16px; }
    .pfr-faq__a { padding: 0 16px 16px; }
}
