.svf-epf{
    --epf-border:#d8dde6;
    --epf-soft:#f6f8fb;
    --epf-text:#172033;
    --epf-muted:#657087;
    --epf-accent:#1769e0;
    --epf-success:#16784a;
    --epf-warning:#9a5a00;
    --epf-danger:#a32828;
    max-width:1200px;
    margin:0 auto;
    color:var(--epf-text);
    font-family:inherit;
}

.svf-epf *,
.svf-epf *::before,
.svf-epf *::after{
    box-sizing:border-box;
}

.svf-epf-hero{
    padding:34px;
    margin-bottom:22px;
    border:1px solid var(--epf-border);
    border-radius:24px;
    background:linear-gradient(135deg,#fff,#f3f7ff);
    box-shadow:0 12px 35px rgba(25,42,70,.07);
}

.svf-epf-kicker{
    margin-bottom:8px;
    font-size:13px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--epf-accent);
}

.svf-epf h1{
    margin:0 0 12px;
    font-size:clamp(32px,5vw,54px);
    line-height:1.05;
}

.svf-epf-lead{
    max-width:920px;
    margin:0 0 15px;
    font-size:18px;
    line-height:1.65;
}

.svf-epf-note,
.svf-epf-help{
    color:var(--epf-muted);
    line-height:1.55;
}

.svf-epf-note{
    margin:0;
    font-size:14px;
}

.svf-epf-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.svf-epf-card{
    margin:0 0 18px;
    padding:24px;
    border:1px solid var(--epf-border);
    border-radius:20px;
    background:#fff;
    box-shadow:0 7px 22px rgba(20,35,60,.045);
}

.svf-epf-card h2{
    margin:0 0 10px;
    font-size:21px;
}

.svf-epf-card h2 span{
    font-size:14px;
    font-weight:500;
    color:var(--epf-muted);
}

.svf-epf-card h3{
    margin:20px 0 8px;
    font-size:15px;
}

.svf-epf-card label{
    cursor:pointer;
}

.svf-epf-card select,
.svf-epf-card input[type="text"]{
    width:100%;
    min-height:46px;
    padding:9px 12px;
    border:1px solid #bcc5d3;
    border-radius:10px;
    background:#fff;
    color:var(--epf-text);
    font:inherit;
}

.svf-epf-compare{
    display:grid;
    grid-template-columns:minmax(0,1.6fr) minmax(230px,.7fr);
    gap:20px;
    align-items:end;
}

.svf-epf-ticker-status{
    grid-column:1 / -1;
    min-height:24px;
    font-size:14px;
}

.svf-epf-ticker-status.success{
    color:var(--epf-success);
}

.svf-epf-ticker-status.error{
    color:var(--epf-danger);
}

.svf-epf-ticker-status.checking{
    color:var(--epf-muted);
}

.svf-epf-inline-checks,
.svf-epf-inline-controls{
    display:flex;
    flex-wrap:wrap;
    gap:14px 24px;
    align-items:center;
}

.svf-epf-inline-checks label,
.svf-epf-master{
    display:flex;
    gap:8px;
    align-items:flex-start;
}

.svf-epf-inline-controls label{
    flex:1 1 260px;
}

.svf-epf input[type="checkbox"],
.svf-epf input[type="radio"]{
    width:18px;
    height:18px;
    margin-top:2px;
    flex:0 0 auto;
}

.svf-epf-grade-inventory{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:14px 0 20px;
}

.svf-epf-grade-inventory span{
    padding:7px 10px;
    border-radius:999px;
    background:var(--epf-soft);
    font-size:13px;
}

.svf-epf-style-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}

.svf-epf-style-card{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:4px 9px;
    padding:15px;
    border:1px solid var(--epf-border);
    border-radius:14px;
    background:#fff;
}

.svf-epf-style-card input{
    grid-row:1 / span 2;
}

.svf-epf-style-card small{
    color:var(--epf-muted);
    line-height:1.4;
}

.svf-epf-scroll-list{
    max-height:280px;
    overflow:auto;
    display:grid;
    gap:7px;
    padding-right:8px;
}

.svf-epf-scroll-list label{
    display:flex;
    gap:8px;
    align-items:center;
    padding:7px 8px;
    border-radius:8px;
}

.svf-epf-scroll-list label:hover{
    background:var(--epf-soft);
}

.svf-epf-benchmark-card{
    border-color:#c5d7f6;
    background:#fbfdff;
}

.svf-epf-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin:8px 0 28px;
}

.svf-epf-actions button{
    min-height:50px;
    padding:10px 22px;
    border-radius:12px;
    font:inherit;
    font-weight:800;
    cursor:pointer;
}

.svf-epf-search-button{
    border:1px solid var(--epf-accent);
    background:var(--epf-accent);
    color:#fff;
}

.svf-epf-reset-button{
    border:1px solid #bcc5d3;
    background:#fff;
    color:var(--epf-text);
}

.svf-epf-loading{
    padding:18px;
    text-align:center;
    font-weight:700;
}

.svf-epf-current-search{
    margin:20px 0;
    padding:18px 20px;
    border-radius:16px;
    background:#eef5ff;
    border:1px solid #cbdffb;
}

.svf-epf-current-search>strong{
    display:block;
    margin-bottom:9px;
    font-size:17px;
}

.svf-epf-current-search>div{
    display:flex;
    flex-wrap:wrap;
    gap:8px 18px;
    font-size:14px;
}

.svf-epf-result-list{
    display:grid;
    gap:16px;
}

.svf-epf-result-card{
    padding:20px;
    border:1px solid var(--epf-border);
    border-radius:18px;
    background:#fff;
    box-shadow:0 6px 18px rgba(20,35,60,.05);
}

.svf-epf-result-card.svf-epf-your-etf{
    border:3px solid #f1a900;
    background:#fffaf0;
    box-shadow:0 10px 28px rgba(190,124,0,.18);
}

.svf-epf-your-label{
    display:inline-block;
    margin:0 0 12px;
    padding:7px 12px;
    border-radius:999px;
    background:#f1a900;
    color:#241900;
    font-size:12px;
    font-weight:900;
    letter-spacing:.05em;
}

.svf-epf-result-head{
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:14px;
    align-items:start;
}

.svf-epf-rank{
    min-width:48px;
    font-size:25px;
    font-weight:900;
}

.svf-epf-identity{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.svf-epf-ticker{
    display:inline-block;
    width:max-content;
    font-size:22px;
    font-weight:900;
    color:var(--epf-accent);
    text-decoration:none;
}

.svf-epf-identity small{
    color:var(--epf-muted);
}

.svf-epf-grade{
    min-width:86px;
    text-align:center;
    padding:9px 12px;
    border-radius:12px;
    background:var(--epf-soft);
}

.svf-epf-grade small{
    display:block;
    color:var(--epf-muted);
}

.svf-epf-grade strong{
    display:block;
    margin-top:2px;
    font-size:21px;
}

.svf-epf-score-row{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    margin-top:18px;
}

.svf-epf-score-row>div{
    padding:13px;
    border-radius:12px;
    background:var(--epf-soft);
}

.svf-epf-score-row small{
    display:block;
    margin-bottom:4px;
    color:var(--epf-muted);
}

.svf-epf-score-row strong{
    display:block;
}

.svf-epf-risk.lower{
    color:var(--epf-success);
}

.svf-epf-risk.moderate{
    color:#456b1f;
}

.svf-epf-risk.elevated{
    color:var(--epf-warning);
}

.svf-epf-risk.high,
.svf-epf-risk.very-high{
    color:var(--epf-danger);
}

.svf-epf-risk-reasons{
    display:block;
    margin-top:5px;
    font-size:12px;
    color:var(--epf-muted);
    line-height:1.4;
}

.svf-epf-return-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}

.svf-epf-return-box{
    padding:12px;
    border:1px solid #e2e6ed;
    border-radius:12px;
}

.svf-epf-return-box small{
    display:block;
    color:var(--epf-muted);
}

.svf-epf-return-box strong{
    display:block;
    margin:3px 0 7px;
    font-size:18px;
}

.svf-epf-vs{
    display:block;
    font-size:12px;
    line-height:1.35;
}

.svf-epf-vs.beat{
    color:var(--epf-success);
    font-weight:700;
}

.svf-epf-vs.trail{
    color:var(--epf-danger);
}

.svf-epf-vs.unavailable{
    color:var(--epf-muted);
}

.svf-epf-result-foot{
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:8px 20px;
    margin-top:15px;
    padding-top:12px;
    border-top:1px solid #e8ebf0;
    color:var(--epf-muted);
    font-size:12px;
}

.svf-epf-failed{
    margin-top:14px;
    padding:13px 15px;
    border-radius:12px;
    background:#fff0f0;
    border:1px solid #efcaca;
    color:#6c2626;
}

.svf-epf-failed ul{
    margin:7px 0 0 20px;
}

.svf-epf-outside-comparison{
    margin-top:28px;
    padding:22px;
    border:2px dashed #f1a900;
    border-radius:20px;
    background:#fffdf7;
}

.svf-epf-outside-comparison h2{
    margin-top:0;
}

.svf-epf-empty,
.svf-epf-error{
    padding:20px;
    border-radius:14px;
    background:var(--epf-soft);
}

.svf-epf-error{
    color:var(--epf-danger);
}

@media (max-width:800px){
    .svf-epf-grid,
    .svf-epf-compare,
    .svf-epf-style-grid{
        grid-template-columns:1fr;
    }

    .svf-epf-score-row{
        grid-template-columns:1fr;
    }

    .svf-epf-return-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:640px){
    .svf-epf{
        width:100%;
    }

    .svf-epf-hero,
    .svf-epf-card{
        padding:18px;
        border-radius:16px;
    }

    .svf-epf-result-card{
        padding:16px;
    }

    .svf-epf-result-head{
        grid-template-columns:auto 1fr;
    }

    .svf-epf-grade{
        grid-column:1 / -1;
        text-align:left;
    }

    .svf-epf-return-grid{
        grid-template-columns:1fr;
    }

    .svf-epf-actions{
        display:grid;
    }

    .svf-epf-actions button{
        width:100%;
    }
}

/* SVF PERFORMANCE FINDER READABILITY FIX V1
 *
 * The site theme can force light text colors into these white cards.
 * These rules deliberately scope all text-color corrections to
 * ETF Performance Finder only.
 */

.svf-epf,
.svf-epf form,
.svf-epf section,
.svf-epf article,
.svf-epf div {
    color: #172033;
}

/* White cards always use dark readable text. */
.svf-epf .svf-epf-card,
.svf-epf .svf-epf-result-card,
.svf-epf .svf-epf-outside-comparison {
    color: #172033 !important;
}

.svf-epf .svf-epf-card h1,
.svf-epf .svf-epf-card h2,
.svf-epf .svf-epf-card h3,
.svf-epf .svf-epf-card h4,
.svf-epf .svf-epf-card h5,
.svf-epf .svf-epf-card h6,
.svf-epf .svf-epf-result-card h1,
.svf-epf .svf-epf-result-card h2,
.svf-epf .svf-epf-result-card h3,
.svf-epf .svf-epf-result-card h4,
.svf-epf .svf-epf-result-card h5,
.svf-epf .svf-epf-result-card h6 {
    color: #172033 !important;
    text-shadow: none !important;
}

.svf-epf .svf-epf-card p,
.svf-epf .svf-epf-card label,
.svf-epf .svf-epf-card strong,
.svf-epf .svf-epf-card span,
.svf-epf .svf-epf-card li,
.svf-epf .svf-epf-result-card p,
.svf-epf .svf-epf-result-card label,
.svf-epf .svf-epf-result-card strong,
.svf-epf .svf-epf-result-card span,
.svf-epf .svf-epf-result-card li {
    color: #172033 !important;
}

/* Secondary/help text remains softer, but clearly readable. */
.svf-epf .svf-epf-help,
.svf-epf .svf-epf-note,
.svf-epf .svf-epf-style-card small,
.svf-epf .svf-epf-identity small,
.svf-epf .svf-epf-grade small,
.svf-epf .svf-epf-score-row small,
.svf-epf .svf-epf-return-box small,
.svf-epf .svf-epf-result-foot,
.svf-epf .svf-epf-risk-reasons {
    color: #566277 !important;
}

/* Hero card readability. */
.svf-epf .svf-epf-hero {
    color: #172033 !important;
}

.svf-epf .svf-epf-hero h1 {
    color: #172033 !important;
    text-shadow: none !important;
}

.svf-epf .svf-epf-hero .svf-epf-lead {
    color: #354159 !important;
}

.svf-epf .svf-epf-hero .svf-epf-note {
    color: #657087 !important;
}

.svf-epf .svf-epf-kicker {
    color: #1769e0 !important;
}

/* Form controls. */
.svf-epf input[type="text"],
.svf-epf select,
.svf-epf option {
    color: #172033 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #172033 !important;
}

.svf-epf input[type="text"]::placeholder {
    color: #8a94a6 !important;
    opacity: 1 !important;
}

.svf-epf input[type="checkbox"],
.svf-epf input[type="radio"] {
    accent-color: #1769e0;
}

/* Optional comparison heading. */
.svf-epf .svf-epf-compare h2 {
    color: #172033 !important;
}

.svf-epf .svf-epf-compare h2 span {
    color: #657087 !important;
}

/* Investment-style cards. */
.svf-epf .svf-epf-style-card {
    color: #172033 !important;
}

.svf-epf .svf-epf-style-card strong {
    color: #172033 !important;
}

/* Benchmark section. */
.svf-epf .svf-epf-benchmark-card,
.svf-epf .svf-epf-benchmark-card p,
.svf-epf .svf-epf-benchmark-card label,
.svf-epf .svf-epf-benchmark-card h2,
.svf-epf .svf-epf-benchmark-card h3 {
    color: #172033 !important;
}

/* Preserve status colors after broad theme overrides. */
.svf-epf .svf-epf-ticker-status.success {
    color: #16784a !important;
}

.svf-epf .svf-epf-ticker-status.error {
    color: #a32828 !important;
}

.svf-epf .svf-epf-ticker-status.checking {
    color: #657087 !important;
}

/* Results-specific colors. */
.svf-epf .svf-epf-ticker {
    color: #1769e0 !important;
}

.svf-epf .svf-epf-vs.beat {
    color: #16784a !important;
}

.svf-epf .svf-epf-vs.trail {
    color: #a32828 !important;
}

.svf-epf .svf-epf-vs.unavailable {
    color: #657087 !important;
}

.svf-epf .svf-epf-risk.lower {
    color: #16784a !important;
}

.svf-epf .svf-epf-risk.moderate {
    color: #456b1f !important;
}

.svf-epf .svf-epf-risk.elevated {
    color: #9a5a00 !important;
}

.svf-epf .svf-epf-risk.high,
.svf-epf .svf-epf-risk.very-high {
    color: #a32828 !important;
}

/* Gold comparison card needs especially strong contrast. */
.svf-epf .svf-epf-result-card.svf-epf-your-etf,
.svf-epf .svf-epf-result-card.svf-epf-your-etf strong,
.svf-epf .svf-epf-result-card.svf-epf-your-etf span,
.svf-epf .svf-epf-result-card.svf-epf-your-etf small {
    color: #172033 !important;
}

.svf-epf .svf-epf-your-label {
    color: #241900 !important;
}

/* Current-search summary. */
.svf-epf .svf-epf-current-search,
.svf-epf .svf-epf-current-search strong,
.svf-epf .svf-epf-current-search span {
    color: #172033 !important;
}

/* Buttons must retain intentional colors. */
.svf-epf .svf-epf-search-button {
    color: #ffffff !important;
    background: #1769e0 !important;
}

.svf-epf .svf-epf-reset-button {
    color: #172033 !important;
    background: #ffffff !important;
}

/* Stronger contrast on white cards overall. */
.svf-epf .svf-epf-card {
    background: #ffffff !important;
    border-color: #cfd6e2 !important;
}

.svf-epf .svf-epf-card > p {
    color: #4d596f !important;
}



/* SVF PERFORMANCE FINDER COMPARISON READABILITY FIX V1
   Force the “Your ETF Compared With the Top Results” area
   to use dark readable text regardless of theme overrides.
*/
.svf-epf .svf-epf-card h1,
.svf-epf .svf-epf-card h2,
.svf-epf .svf-epf-card h3,
.svf-epf .svf-epf-card h4,
.svf-epf .svf-epf-card h5,
.svf-epf .svf-epf-card h6{
    color:#16263d !important;
    opacity:1 !important;
    text-shadow:none !important;
}

.svf-epf .svf-epf-card p,
.svf-epf .svf-epf-card small,
.svf-epf .svf-epf-card strong,
.svf-epf .svf-epf-card span,
.svf-epf .svf-epf-card li,
.svf-epf .svf-epf-card label,
.svf-epf .svf-epf-card legend{
    color:#46566f !important;
    opacity:1 !important;
    text-shadow:none !important;
}

.svf-epf .svf-epf-card a{
    color:#1e63d6 !important;
    opacity:1 !important;
}

.svf-epf .svf-epf-card{
    color:#46566f !important;
}

.svf-epf .svf-epf-card .svf-epf-result-card,
.svf-epf .svf-epf-card .svf-epf-compare-result,
.svf-epf .svf-epf-card .svf-epf-user-etf,
.svf-epf .svf-epf-card .svf-epf-user-compare{
    color:#46566f !important;
}

.svf-epf .svf-epf-card .svf-epf-result-card h1,
.svf-epf .svf-epf-card .svf-epf-result-card h2,
.svf-epf .svf-epf-card .svf-epf-result-card h3,
.svf-epf .svf-epf-card .svf-epf-result-card h4,
.svf-epf .svf-epf-card .svf-epf-compare-result h1,
.svf-epf .svf-epf-card .svf-epf-compare-result h2,
.svf-epf .svf-epf-card .svf-epf-compare-result h3,
.svf-epf .svf-epf-card .svf-epf-compare-result h4,
.svf-epf .svf-epf-card .svf-epf-user-etf h1,
.svf-epf .svf-epf-card .svf-epf-user-etf h2,
.svf-epf .svf-epf-card .svf-epf-user-etf h3,
.svf-epf .svf-epf-card .svf-epf-user-etf h4,
.svf-epf .svf-epf-card .svf-epf-user-compare h1,
.svf-epf .svf-epf-card .svf-epf-user-compare h2,
.svf-epf .svf-epf-card .svf-epf-user-compare h3,
.svf-epf .svf-epf-card .svf-epf-user-compare h4{
    color:#16263d !important;
}

.svf-epf .svf-epf-card .svf-epf-result-card p,
.svf-epf .svf-epf-card .svf-epf-result-card small,
.svf-epf .svf-epf-card .svf-epf-result-card span,
.svf-epf .svf-epf-card .svf-epf-compare-result p,
.svf-epf .svf-epf-card .svf-epf-compare-result small,
.svf-epf .svf-epf-card .svf-epf-compare-result span,
.svf-epf .svf-epf-card .svf-epf-user-etf p,
.svf-epf .svf-epf-card .svf-epf-user-etf small,
.svf-epf .svf-epf-card .svf-epf-user-etf span,
.svf-epf .svf-epf-card .svf-epf-user-compare p,
.svf-epf .svf-epf-card .svf-epf-user-compare small,
.svf-epf .svf-epf-card .svf-epf-user-compare span{
    color:#46566f !important;
}

.svf-epf .svf-epf-card .svf-epf-comparison-note,
.svf-epf .svf-epf-card .svf-epf-help,
.svf-epf .svf-epf-card .svf-epf-muted{
    color:#5a6b84 !important;
    opacity:1 !important;
    text-shadow:none !important;
}


/* SVF PERFORMANCE FINDER CONTRAST TUNE V2
   - darken the top summary panels on ETF result cards
   - force strong readability for the "Your ETF Compared With the Top Results"
     section and its intro text
*/

/* Top summary panels inside result cards */
.svf-epf .svf-epf-result-card [class*="summary-box"],
.svf-epf .svf-epf-result-card [class*="insight-box"],
.svf-epf .svf-epf-result-card [class*="risk-box"],
.svf-epf .svf-epf-result-card [class*="pattern-box"],
.svf-epf .svf-epf-result-card [class*="overview-box"],
.svf-epf .svf-epf-result-card [class*="metric-box"],
.svf-epf .svf-epf-result-card [class*="stat-box"]{
    background:#e3e9f2 !important;
    border:1px solid #c9d4e3 !important;
}

/* Fallback: many builds use a 3-column grid for the first summary row */
.svf-epf .svf-epf-result-card [class*="summary-grid"] > div,
.svf-epf .svf-epf-result-card [class*="insight-grid"] > div,
.svf-epf .svf-epf-result-card [class*="overview-grid"] > div,
.svf-epf .svf-epf-result-card [class*="risk-grid"] > div{
    background:#e3e9f2 !important;
    border:1px solid #c9d4e3 !important;
}

/* Readability inside those darker summary panels */
.svf-epf .svf-epf-result-card [class*="summary-box"] *,
.svf-epf .svf-epf-result-card [class*="insight-box"] *,
.svf-epf .svf-epf-result-card [class*="risk-box"] *,
.svf-epf .svf-epf-result-card [class*="pattern-box"] *,
.svf-epf .svf-epf-result-card [class*="overview-box"] *,
.svf-epf .svf-epf-result-card [class*="metric-box"] *,
.svf-epf .svf-epf-result-card [class*="stat-box"] *,
.svf-epf .svf-epf-result-card [class*="summary-grid"] > div *,
.svf-epf .svf-epf-result-card [class*="insight-grid"] > div *,
.svf-epf .svf-epf-result-card [class*="overview-grid"] > div *,
.svf-epf .svf-epf-result-card [class*="risk-grid"] > div *{
    color:#1a2c45 !important;
    text-shadow:none !important;
    opacity:1 !important;
}

/* Comparison wrapper section:
   use :has() so only the user-comparison block is affected */
.svf-epf .svf-epf-card:has(.svf-epf-user-etf){
    color:#41556f !important;
}

/* Main comparison heading */
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) h1,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) h2,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) h3,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) h4,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) h5,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) h6{
    color:#17304f !important;
    text-shadow:none !important;
    opacity:1 !important;
}

/* Direct intro text under the comparison heading */
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) > p,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) > div,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) .svf-epf-help,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) .svf-epf-muted,
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) .svf-epf-comparison-note{
    color:#566b86 !important;
    text-shadow:none !important;
    opacity:1 !important;
}

/* Keep links readable in comparison area */
.svf-epf .svf-epf-card:has(.svf-epf-user-etf) a{
    color:#1e63d6 !important;
    opacity:1 !important;
}


/* SVF PERFORMANCE FINDER EXACT CONTRAST FIX V3 */

/*
 * EXACT wrapper used for:
 * "Your ETF Compared With the Top Results"
 */
.svf-epf .svf-epf-outside-comparison {
    color:#172033 !important;
    background:#fffaf0 !important;
}

.svf-epf .svf-epf-outside-comparison > h2 {
    color:#172033 !important;
    opacity:1 !important;
    text-shadow:none !important;
    -webkit-text-fill-color:#172033 !important;
}

.svf-epf .svf-epf-outside-comparison > p {
    color:#485870 !important;
    opacity:1 !important;
    text-shadow:none !important;
    -webkit-text-fill-color:#485870 !important;
    font-weight:500 !important;
}

/*
 * Make the heading more obviously readable against the cream box.
 */
.svf-epf .svf-epf-outside-comparison > h2 {
    font-weight:800 !important;
}

/*
 * EXACT three summary boxes:
 * Overall Performance
 * Historical / Structural Risk
 * Performance Pattern
 */
.svf-epf .svf-epf-score-row > div {
    background:#dfe6ef !important;
    border:1px solid #c7d1df !important;
}

/* Labels in the three boxes */
.svf-epf .svf-epf-score-row > div > small {
    color:#40516a !important;
    opacity:1 !important;
    text-shadow:none !important;
    -webkit-text-fill-color:#40516a !important;
    font-weight:600 !important;
}

/* Main values in the three boxes */
.svf-epf .svf-epf-score-row > div > strong {
    color:#172033 !important;
    opacity:1 !important;
    text-shadow:none !important;
    -webkit-text-fill-color:#172033 !important;
    font-weight:800 !important;
}

/* Risk explanation line */
.svf-epf .svf-epf-score-row .svf-epf-risk-reasons {
    color:#384b65 !important;
    opacity:1 !important;
    text-shadow:none !important;
    -webkit-text-fill-color:#384b65 !important;
}

/*
 * Preserve intentional risk colors.
 */
.svf-epf .svf-epf-score-row .svf-epf-risk.lower {
    color:#11663f !important;
    -webkit-text-fill-color:#11663f !important;
}

.svf-epf .svf-epf-score-row .svf-epf-risk.moderate {
    color:#3f681d !important;
    -webkit-text-fill-color:#3f681d !important;
}

.svf-epf .svf-epf-score-row .svf-epf-risk.elevated {
    color:#895000 !important;
    -webkit-text-fill-color:#895000 !important;
}

.svf-epf .svf-epf-score-row .svf-epf-risk.high,
.svf-epf .svf-epf-score-row .svf-epf-risk.very-high {
    color:#922525 !important;
    -webkit-text-fill-color:#922525 !important;
}

/*
 * Comparison ETF's summary boxes use the same darker treatment.
 */
.svf-epf .svf-epf-your-etf .svf-epf-score-row > div {
    background:#dfe6ef !important;
    border-color:#c7d1df !important;
}


/* SVF EXTREME RETURN BADGE STYLES V1 */

.svf-epf-extreme-return{
    display:flex;
    align-items:center;
    gap:12px;
    margin:15px 0 2px;
    padding:12px 15px;
    border-radius:13px;
    border:1px solid #e2b45c;
    background:#fff6df;
    color:#4e3500 !important;
}

.svf-epf-extreme-return strong{
    display:block;
    color:#4e3500 !important;
    font-size:14px;
    font-weight:900;
}

.svf-epf-extreme-return small{
    display:block;
    margin-top:2px;
    color:#70551d !important;
    font-size:12px;
}

.svf-epf-extreme-icon{
    display:block;
    font-size:25px;
    line-height:1;
}

.svf-epf-extreme-exceptional{
    background:#fff7df;
    border-color:#e7bd58;
}

.svf-epf-extreme-extreme{
    background:#fff0d6;
    border-color:#ef9f32;
}

.svf-epf-extreme-explosive{
    background:#ffe8d4;
    border-color:#ef7d27;
}

.svf-epf-extreme-extraordinary{
    background:#ffe0dc;
    border-color:#df5a4f;
}

.svf-epf-extreme-extraordinary strong{
    color:#7f1d1d !important;
}

.svf-epf-extreme-extraordinary small{
    color:#8e3333 !important;
}

/* Make the badge especially noticeable on the comparison ETF */
.svf-epf-your-etf .svf-epf-extreme-return{
    box-shadow:0 4px 12px rgba(190,95,0,.12);
}

@media (max-width:640px){
    .svf-epf-extreme-return{
        align-items:flex-start;
    }
}


/* SVF NEW SEARCH BUTTON STYLES V1 */

.svf-epf-new-search-zone{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin:28px 0 50px;
    padding:22px 24px;
    border:1px solid #b9c9dc;
    border-radius:18px;
    background:#eef4fb;
    color:#172033 !important;
}

.svf-epf-new-search-message{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.svf-epf-new-search-message strong{
    color:#172033 !important;
    font-size:18px;
    font-weight:900;
}

.svf-epf-new-search-message span{
    color:#50627b !important;
    font-size:14px;
}

.svf-epf-new-search-button{
    flex:0 0 auto;
    min-height:48px;
    padding:11px 22px;
    border:1px solid #1769e0 !important;
    border-radius:12px;
    background:#1769e0 !important;
    color:#ffffff !important;
    font:inherit;
    font-size:15px;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 6px 15px rgba(23,105,224,.16);
    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.svf-epf-new-search-button:hover{
    transform:translateY(-1px);
    box-shadow:0 9px 20px rgba(23,105,224,.22);
}

.svf-epf-new-search-button:active{
    transform:translateY(0);
}

/*
 * Floating New Search button stays available while reading
 * a long Top 25/50/100 list.
 */
.svf-epf-floating-new-search{
    position:fixed;
    right:22px;
    bottom:22px;
    z-index:9998;
    min-height:48px;
    padding:10px 18px;
    border:1px solid #1769e0 !important;
    border-radius:999px;
    background:#1769e0 !important;
    color:#ffffff !important;
    font-family:inherit;
    font-size:14px;
    font-weight:900;
    cursor:pointer;
    box-shadow:
        0 8px 25px rgba(0,0,0,.22),
        0 2px 7px rgba(23,105,224,.25);
}

.svf-epf-floating-new-search[hidden]{
    display:none !important;
}

.svf-epf-floating-new-search:hover{
    transform:translateY(-1px);
}

@media (max-width:640px){
    .svf-epf-new-search-zone{
        display:grid;
        gap:14px;
        padding:18px;
    }

    .svf-epf-new-search-button{
        width:100%;
    }

    .svf-epf-floating-new-search{
        right:14px;
        bottom:14px;
        min-height:46px;
        padding:10px 15px;
    }
}


/* SVF MULTI ETF PORTFOLIO STYLES V1 */

.svf-epf .svf-epf-ticker-label textarea{
    display:block;
    width:100%;
    min-height:105px;
    margin-top:7px;
    padding:12px 14px;
    box-sizing:border-box;
    resize:vertical;
    border:1px solid #c8d3e1 !important;
    border-radius:10px;
    background:#fff !important;
    color:#172033 !important;
    font:inherit;
    font-size:15px;
    line-height:1.5;
}

.svf-epf .svf-epf-ticker-label textarea:focus{
    outline:2px solid rgba(23,105,224,.20);
    border-color:#1769e0 !important;
}

.svf-epf-portfolio-help{
    display:block;
    margin-top:7px;
    color:#596b82 !important;
    font-size:12px;
    line-height:1.45;
}

.svf-epf-portfolio-validated{
    display:grid;
    gap:7px;
    margin-top:10px;
}

.svf-epf-portfolio-valid-row,
.svf-epf-portfolio-invalid-row{
    display:grid;
    grid-template-columns:auto auto 1fr auto;
    align-items:center;
    gap:8px;
    padding:8px 11px;
    border-radius:9px;
}

.svf-epf-portfolio-valid-row{
    border:1px solid #b9d9c4;
    background:#edf8f0;
    color:#203b2c !important;
}

.svf-epf-portfolio-valid-row strong{
    color:#183925 !important;
}

.svf-epf-portfolio-valid-row span{
    color:#405d4a !important;
}

.svf-epf-portfolio-valid-row small{
    color:#63776a !important;
}

.svf-epf-check{
    color:#138142 !important;
    font-weight:900;
}

.svf-epf-portfolio-invalid-row{
    border:1px solid #e5c4c0;
    background:#fff0ee;
    color:#73332d !important;
}

.svf-epf-portfolio-invalid-row strong,
.svf-epf-portfolio-invalid-row span{
    color:#73332d !important;
}


/* Portfolio overview after primary search results */

.svf-epf-portfolio-summary{
    margin:26px 0;
    padding:22px;
    border:1px solid #b9cbe1;
    border-radius:17px;
    background:#edf4fc;
    color:#172033 !important;
}

.svf-epf-portfolio-summary-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
}

.svf-epf-portfolio-summary h2{
    margin:0 0 7px;
    color:#172033 !important;
    font-size:22px;
    font-weight:900;
}

.svf-epf-portfolio-summary p{
    margin:0;
    max-width:760px;
    color:#52657d !important;
    line-height:1.55;
}

.svf-epf-portfolio-count{
    min-width:95px;
    padding:12px 16px;
    border:1px solid #c4d3e4;
    border-radius:12px;
    background:#fff;
    text-align:center;
    color:#172033 !important;
    font-size:28px;
    font-weight:900;
}

.svf-epf-portfolio-count small{
    display:block;
    margin-top:2px;
    color:#66788d !important;
    font-size:11px;
    font-weight:700;
}

.svf-epf-portfolio-stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-top:17px;
}

.svf-epf-portfolio-stats > div{
    padding:12px;
    border:1px solid #cad7e6;
    border-radius:11px;
    background:#fff;
}

.svf-epf-portfolio-stats strong{
    display:block;
    color:#172033 !important;
    font-size:21px;
}

.svf-epf-portfolio-stats span{
    display:block;
    margin-top:2px;
    color:#566980 !important;
    font-size:12px;
}

.svf-epf-portfolio-rank-range{
    display:flex;
    flex-wrap:wrap;
    gap:10px 24px;
    margin-top:15px;
    color:#41556e !important;
    font-size:13px;
}

.svf-epf-portfolio-rank-range strong{
    color:#243a55 !important;
}

.svf-epf-portfolio-warning{
    margin:15px 0;
    padding:13px 15px;
    border:1px solid #e1c46b;
    border-radius:11px;
    background:#fff8df;
    color:#604c14 !important;
}

.svf-epf-portfolio-warning strong{
    color:#4d3b0d !important;
}


/*
 * Existing gold comparison treatment remains in place for
 * every portfolio ETF, whether it appears in the Top results
 * or in the separate portfolio section.
 */

@media (max-width:760px){
    .svf-epf-portfolio-summary-head{
        display:grid;
    }

    .svf-epf-portfolio-count{
        width:100%;
        box-sizing:border-box;
    }

    .svf-epf-portfolio-stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .svf-epf-portfolio-valid-row,
    .svf-epf-portfolio-invalid-row{
        grid-template-columns:auto 1fr;
    }

    .svf-epf-portfolio-valid-row span:not(.svf-epf-check),
    .svf-epf-portfolio-valid-row small,
    .svf-epf-portfolio-invalid-row span:last-child{
        grid-column:2;
    }
}

