:root{
  --bg:#071019; --panel:#0b1621; --panel2:#0d1b27; --line:#203445;
  --text:#e7eef5; --muted:#8d9aa8; --green:#20d477; --red:#ff4f52;
  --blue:#2f8cff; --purple:#9854ff; --gold:#ffb51b;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:radial-gradient(circle at 50% -20%,#142331 0,#071019 42%,#050b11 100%);color:var(--text);font-family:"Vazirmatn",Tahoma,Arial,sans-serif}
button,input{font:inherit}
a{color:inherit;text-decoration:none}
.app-shell{max-width:1280px;margin:auto;padding:18px 18px 28px;position:relative}
.topbar{height:64px;display:grid;grid-template-columns:230px 1fr 230px;align-items:center;gap:20px;border-bottom:1px solid #1b2a37}
.brand{display:flex;align-items:center;gap:11px}.brand-mark{font-size:38px;line-height:1;color:var(--green);transform:rotate(180deg);display:inline-block}
.brand strong{display:block;font-size:20px;letter-spacing:.2px}.brand small{display:block;color:#a9b4bf;font-size:10px;margin-top:2px}
.search-wrap{position:relative;max-width:430px;width:100%;margin:auto}.search-wrap input{width:100%;height:38px;border:1px solid #294052;border-radius:22px;background:#09131d;color:#e9f0f5;padding:0 43px 0 18px;outline:none}.search-wrap input:focus{border-color:#38718a;box-shadow:0 0 0 3px #1a596622}.search-icon{position:absolute;right:15px;top:6px;font-size:23px;color:#d5dce3}
.search-results{position:absolute;z-index:20;top:45px;right:0;left:0;background:#0c1823;border:1px solid #294052;border-radius:12px;padding:8px;box-shadow:0 18px 40px #0008}.search-results div{padding:9px 11px;border-radius:8px;color:#d8e1e8;cursor:pointer}.search-results div:hover{background:#122434}.hidden{display:none}
.top-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px}.icon-btn,.login-btn,.signup-btn{border:0;cursor:pointer}.icon-btn{background:transparent;color:#eef3f7;font-size:23px;width:30px}.login-btn{background:#172635;color:#dfe7ee;border-radius:8px;padding:8px 15px}.signup-btn{background:#20ad76;color:#fff;border-radius:8px;padding:8px 15px}
.main-nav{margin-top:14px;height:44px;border:1px solid #203445;border-radius:11px;background:#0b1520;display:flex;overflow:visible;direction:rtl;position:relative;z-index:81}.nav-item{min-width:118px;flex:1;display:flex;justify-content:center;align-items:center;gap:8px;border-left:1px solid #203445;color:#c7d0d9;font-size:13px;transition:.2s}.nav-item:last-child{border-left:0}.nav-item:hover,.nav-item.active{background:#122536;color:#fff}.nav-item.active{box-shadow:inset 0 -2px 0 #20d477}
.ticker-grid{margin-top:15px;border:1px solid #2a4050;border-radius:10px;display:grid;grid-template-columns:repeat(6,1fr);overflow:hidden;background:#0b151f}.ticker{min-height:140px;padding:14px 18px;border-left:1px solid #203445;text-align:right;position:relative}.ticker:last-child{border-left:0}.ticker-title{color:#d9e0e6;font-size:12px}.ticker-price{font-size:19px;font-weight:700;margin:7px 0 3px}.ticker-change{font-size:11px}.positive{color:var(--green)}.negative{color:var(--red)}.spark{position:absolute;left:10px;bottom:10px;width:48%;height:38px;opacity:.9}
.section-link{color:var(--green);font-size:11px}.ticker-footer{grid-column:1/-1;border-top:1px solid #203445;padding:8px 15px;color:#788895;font-size:10px}.ticker-footer a{float:left;color:var(--green)}
.market-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}.market-card{min-height:330px;border:1px solid var(--line);border-radius:10px;background:linear-gradient(160deg,#0d1924,#09131d);overflow:hidden}.market-card.blue{border-color:#1d527c}.market-card.green{border-color:#1a664e}.market-card.gold{border-color:#6e4a12}.market-card.purple{border-color:#533285}.card-head{height:78px;padding:15px 18px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #21313f}.card-head h2{font-size:17px;margin:0 0 8px}.card-head a{font-size:10px;color:#8da0ae}.card-icon{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-size:22px;font-weight:800}.blue .card-icon{background:#14365e;color:#55a5ff}.green .card-icon{background:#174e3b;color:#5ce98b}.gold .card-icon{background:#5b3c08;color:#ffbd24}.purple .card-icon{background:#4b2879;color:#c18aff}
.card-table{width:100%;border-collapse:collapse;font-size:11px}.card-table th{font-weight:500;color:#788896;padding:9px 12px}.card-table td{padding:9px 12px;border-top:1px solid #1a2936}.card-table td:last-child,.card-table th:last-child{text-align:left}.card-table td:nth-child(2){text-align:center}.card-button{margin:11px;width:calc(100% - 22px);border:0;border-radius:6px;padding:8px;cursor:pointer;color:#fff;background:#123e2e}.blue .card-button{background:#102f51}.gold .card-button{background:#513609}.purple .card-button{background:#2c205e}
.dashboard-grid{display:grid;grid-template-columns:1.18fr .92fr .92fr;gap:14px;margin-top:15px}.panel{border:1px solid var(--line);border-radius:10px;background:#09141e;padding:14px;min-width:0}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel h2{font-size:15px;margin:0 0 12px}.range-tabs{display:flex;gap:5px;direction:rtl}.range-tabs button{background:transparent;border:0;color:#7d8b98;font-size:10px;padding:5px 8px;border-radius:5px;cursor:pointer}.range-tabs button.selected{background:#1c7d59;color:#fff}.chart-meta{display:flex;justify-content:space-between;color:#7d8b98;font-size:10px}.chart-meta strong{color:#dce5ec;font-size:12px}.chart-box{height:205px;margin-top:8px;border-bottom:1px solid #263846;background-image:linear-gradient(#182632 1px,transparent 1px),linear-gradient(90deg,#182632 1px,transparent 1px);background-size:20% 25%;position:relative}.chart-box svg{width:100%;height:100%;overflow:visible;direction:ltr;unicode-bidi:isolate}.market-chart-tooltip{position:absolute;display:none;min-width:120px;padding:7px 9px;border:1px solid #294052;border-radius:7px;background:#0b1823;color:#dce7ed;box-shadow:0 8px 22px rgba(0,0,0,.28);font-size:9px;line-height:1.6;pointer-events:none;z-index:3;direction:rtl;text-align:right}.market-chart-tooltip.visible{display:flex;flex-direction:column}.market-chart-tooltip strong{font-weight:500;color:#91a3af}.market-chart-tooltip span{font-size:10px;color:#20d477;font-weight:700}.chart-footer{display:flex;justify-content:space-between;direction:ltr;color:#748390;font-size:10px;padding:5px 6px}.panel-link{display:block;text-align:center;color:var(--green);font-size:11px;padding-top:9px;border-top:1px solid #21313e;margin-top:8px}.panel-link.inline{border:0;padding:0;margin:0}
.status-pill{background:#126744;color:#d9ffea;padding:4px 24px;border-radius:6px;font-size:10px}.certificate-cols{grid-template-columns:1.4fr 1fr 1.15fr}.certificate-cols + #certificateRows .data-row{grid-template-columns:1.4fr 1fr 1.15fr}.certificate-cols + #certificateRows .data-row span:nth-child(2),.certificate-cols + #certificateRows .data-row span:nth-child(3){text-align:center}
.table-head,.data-row{display:grid;grid-template-columns:1.15fr 1fr 1fr .9fr;align-items:center;gap:5px}.table-head{color:#7e8d99;font-size:9px;padding:7px 3px}.cols-5{grid-template-columns:1.35fr .9fr 1fr 1fr .9fr}.data-row{font-size:10px;padding:10px 3px;border-top:1px solid #1b2a36}.data-row span:last-child{text-align:left}.data-row .chg{color:var(--green)}.data-row .chg.red{color:var(--red)}
.bottom-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:14px;margin-top:15px}.news-item{display:grid;grid-template-columns:70px 1fr 55px;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #1c2b37}.news-item:first-child{border-top:0}.news-thumb{width:70px;height:48px;border-radius:7px;background:linear-gradient(135deg,#8a6844,#d6c2a2);display:grid;place-items:center;font-size:20px}.news-thumb img{width:100%;height:100%;display:block;object-fit:cover;border-radius:7px}.news-title{font-size:11px;line-height:1.9}.news-meta{font-size:8px;color:#778793}.news-tag{justify-self:end;background:#101f2b;border-radius:10px;padding:3px 7px;color:#aab6c0;font-size:8px}
.tools-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.tool{border:1px solid #223646;border-radius:8px;min-height:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#dbe4ea;font-size:10px;text-align:center;background:#0a151f;transition:.2s}.tool:hover{transform:translateY(-2px);border-color:#2e566c}.tool-icon{font-size:26px}.tool:nth-child(1) .tool-icon{color:#41a5ff}.tool:nth-child(2) .tool-icon{color:#22d782}.tool:nth-child(3) .tool-icon{color:#ffad17}.tool:nth-child(4) .tool-icon{color:#9b62ff}.tool:nth-child(5) .tool-icon{color:#25d98b}.tool:nth-child(6) .tool-icon{color:#63a9ff}.tool:nth-child(7) .tool-icon{color:#20d477}
.footer{margin-top:18px;border-top:1px solid #1c2c39;padding:25px 15px 5px;display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:30px;color:#8d9aa6}.footer strong{font-size:19px;color:#eaf1f5}.footer p{font-size:10px;line-height:2;margin:9px 0}.footer h3{font-size:12px;color:#d9e2e8;margin:0 0 10px}.footer a{display:block;font-size:10px;margin:7px 0}.socials{display:flex;gap:10px;align-items:flex-start;direction:ltr}.socials span{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#102235;color:#fff;font-size:13px}
@media(max-width:1050px){.topbar{grid-template-columns:190px 1fr 190px}.market-cards{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr 1fr}.chart-panel{grid-column:1/-1}.bottom-grid{grid-template-columns:1fr}}
@media(max-width:760px){.app-shell{padding:10px}.topbar{height:auto;grid-template-columns:1fr;gap:12px;padding-bottom:12px}.brand,.top-actions{justify-content:center}.search-wrap{max-width:none}.main-nav{overflow-x:auto}.nav-item{min-width:95px}.ticker-grid{grid-template-columns:repeat(2,1fr)}.ticker{border-bottom:1px solid #203445}.market-cards,.dashboard-grid,.bottom-grid{grid-template-columns:1fr}.chart-panel{grid-column:auto}.footer{grid-template-columns:1fr 1fr}.socials{grid-column:1/-1}.tools-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:430px){.ticker-grid{grid-template-columns:1fr}.ticker{border-left:0}.footer{grid-template-columns:1fr}.news-item{grid-template-columns:60px 1fr}.news-tag{display:none}}

/* SMART TOOLS NAV — keeps the locked header visual language and adds a dynamic mega menu. */
.nav-tools{position:relative;flex:1;min-width:118px;display:flex}
.nav-tools-trigger{width:100%;min-width:0;background:transparent;border-top:0;border-right:0;border-bottom:0;cursor:pointer;position:relative}
.nav-tools-trigger:focus-visible{outline:2px solid var(--green);outline-offset:-2px}
.nav-tools-trigger[aria-expanded="true"]{background:#122536;color:#fff;box-shadow:inset 0 -2px 0 #20d477}
.tools-mega-menu{position:absolute;z-index:90;top:calc(100% + 8px);right:0;width:min(720px,calc(100vw - 36px));padding:16px;border:1px solid #294052;border-radius:12px;background:linear-gradient(160deg,#0d1924,#08121b);box-shadow:0 22px 55px #0009;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .16s ease,transform .16s ease,visibility .16s ease;direction:rtl}
.tools-mega-menu.open{opacity:1;visibility:visible;transform:translateY(0)}
.tools-menu-category{border:1px solid #203445;border-radius:9px;background:#0a151f;padding:11px;min-width:0}
.tools-menu-category h3{margin:0 0 9px;color:#e8f0f5;font-size:12px;display:flex;align-items:center;gap:7px;padding-bottom:8px;border-bottom:1px solid #1c2d3b}
.tools-menu-category h3 span{color:var(--green);font-size:15px}
.tools-menu-list{display:grid;gap:3px}
.tools-menu-item{display:flex;align-items:center;gap:8px;min-height:32px;padding:5px 7px;border-radius:6px;color:#cbd6de;font-size:10px;line-height:1.5;transition:.16s}
.tools-menu-item:hover{background:#122536;color:#fff;transform:translateX(-2px)}
.tools-menu-item .tool-menu-icon{width:22px;text-align:center;font-size:15px;color:#20d477;flex:0 0 22px}
.tools-menu-empty{grid-column:1/-1;text-align:center;color:#7f8f9d;font-size:11px;padding:18px}
@media(max-width:900px){.tools-mega-menu{grid-template-columns:repeat(2,minmax(0,1fr));width:min(680px,calc(100vw - 28px))}}
@media(max-width:760px){.main-nav{overflow:visible}.nav-tools{min-width:95px;flex:0 0 95px}.tools-mega-menu{right:10px;left:auto;width:min(680px,calc(100vw - 28px));max-height:calc(100vh - 135px);overflow:auto;grid-template-columns:1fr 1fr;padding:11px}}
@media(max-width:520px){.tools-mega-menu{grid-template-columns:1fr}.tools-menu-category{padding:10px}.tools-menu-item{min-height:36px;font-size:10px}}

/* Funds directory — designed for large API result sets (≈40–50 funds). */
.funds-directory-overlay{position:fixed;inset:0;z-index:10020;display:none;background:rgba(3,9,15,.86);backdrop-filter:blur(7px);padding:18px;overflow:auto}.funds-directory-overlay.open{display:block}.funds-directory{width:min(1100px,100%);max-height:calc(100vh - 36px);margin:0 auto;background:#09141e;border:1px solid #1a664e;border-radius:14px;box-shadow:0 28px 90px rgba(0,0,0,.58);overflow:hidden;direction:rtl}.funds-directory-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #203445}.funds-directory-head h2{margin:0;font-size:20px}.funds-directory-head p{margin:6px 0 0;color:#8495a2;font-size:11px}.funds-directory-close{border:1px solid #294052;background:#10202d;color:#e7eef5;border-radius:8px;padding:8px 14px;cursor:pointer}.funds-directory-table-wrap{max-height:calc(100vh - 145px);overflow:auto}.funds-directory-table{width:100%;border-collapse:collapse;font-size:11px}.funds-directory-table th{position:sticky;top:0;background:#0e202d;color:#8fa1ae;font-weight:600;padding:11px 12px;border-bottom:1px solid #203445}.funds-directory-table td{padding:10px 12px;border-bottom:1px solid #172733}.funds-directory-table td:nth-child(2){direction:ltr;text-align:right}.funds-directory-table td:nth-child(3),.funds-directory-table td:nth-child(4),.funds-directory-table td:nth-child(5){text-align:center}.funds-directory-table .positive{color:#20d477}.funds-directory-table .negative{color:#ff5c66}.fund-status{display:inline-block;padding:3px 7px;border-radius:999px;background:#182631;color:#8d9ba6;font-size:9px}.fund-status.live{background:#123e2e;color:#5ce98b}.fund-status.stale{background:#4a3710;color:#f0c65b}.funds-empty{text-align:center;padding:35px!important;color:#70818e}@media(max-width:760px){.funds-directory-overlay{padding:8px}.funds-directory{max-height:calc(100vh - 16px)}.funds-directory-head{padding:14px}.funds-directory-head h2{font-size:17px}.funds-directory-table{min-width:680px}.funds-directory-table-wrap{overflow:auto}}

.auth-overlay{position:fixed;inset:0;background:#0009;z-index:300;display:none;align-items:center;justify-content:center;padding:18px;direction:rtl}.auth-overlay.open{display:flex}.auth-modal{position:relative;width:min(420px,100%);border:1px solid #294052;border-radius:14px;background:linear-gradient(160deg,#0d1924,#08121b);box-shadow:0 25px 80px #000c;padding:24px}.auth-close{position:absolute;left:12px;top:8px;border:0;background:transparent;color:#9aabb8;font-size:26px;cursor:pointer}.auth-tabs{display:flex;gap:6px;margin-bottom:18px}.auth-tabs button{flex:1;border:1px solid #243a4b;background:#0a151f;color:#aab8c2;padding:9px;border-radius:8px;cursor:pointer}.auth-tabs button.selected{background:#145a42;color:#fff}.auth-form{display:grid;gap:12px}.auth-form h2{font-size:18px;margin:0 0 4px}.auth-form label{display:grid;gap:6px;color:#aab8c2;font-size:11px}.auth-form input{background:#08121b;border:1px solid #294052;border-radius:7px;color:#fff;padding:10px;outline:none}.auth-submit{border:0;border-radius:8px;padding:10px;background:#20a56d;color:#fff;cursor:pointer;font-weight:700}.auth-message{min-height:20px;margin-top:10px;color:#ffb5b5;font-size:11px}.account-btn{border:1px solid #24513f;background:#0e3025;color:#caffdf;border-radius:7px;padding:8px 12px;cursor:pointer;font-size:11px}

.account-overlay{position:fixed;inset:0;background:#0009;z-index:310;display:none;align-items:center;justify-content:center;padding:18px;direction:rtl}.account-overlay.open{display:flex}.account-modal{position:relative;width:min(720px,100%);max-height:92vh;overflow:auto;border:1px solid #294052;border-radius:16px;background:linear-gradient(160deg,#0d1924,#08121b);box-shadow:0 25px 80px #000c;padding:24px}.account-close{position:absolute;left:14px;top:9px;border:0;background:transparent;color:#9aabb8;font-size:27px;cursor:pointer}.account-head{display:flex;align-items:center;gap:13px;border-bottom:1px solid #1e3343;padding-bottom:18px}.account-avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#123f31;font-size:22px}.account-head h2{margin:0;font-size:19px}.account-head p{margin:4px 0 0;color:#91a3af;font-size:11px}.account-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:16px 0}.account-card{border:1px solid #203748;border-radius:10px;padding:10px;background:#0b1721}.account-card span{display:block;color:#8397a5;font-size:10px;margin-bottom:6px}.account-card strong{font-size:12px;color:#dce8ef}.account-section{border-top:1px solid #1e3343;padding-top:15px;margin-top:15px}.account-section h3{font-size:14px;margin:0 0 11px}.account-form{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.account-form label{display:grid;gap:5px;color:#aab8c2;font-size:10px}.account-form label:nth-child(3){grid-column:1/-1}.account-form input{background:#08121b;border:1px solid #294052;border-radius:7px;color:#fff;padding:9px;outline:none}.account-form input[readonly]{opacity:.65}.account-form .auth-submit{grid-column:1/-1}.account-message{min-height:18px;color:#9fe0be;font-size:10px;margin-top:7px}.recent-tools{display:flex;flex-wrap:wrap;gap:7px;color:#93a6b3;font-size:10px}.recent-tools span{border:1px solid #294052;border-radius:7px;padding:6px 9px;background:#0b1721}.account-actions{display:flex;justify-content:flex-start;margin-top:17px}.account-logout{border:1px solid #633f42;background:#321c20;color:#ffb8bc;border-radius:8px;padding:8px 14px;cursor:pointer}@media(max-width:760px){.account-grid{grid-template-columns:repeat(2,1fr)}.account-form{grid-template-columns:1fr}.account-form label:nth-child(3){grid-column:auto}}

.auth-form input::placeholder{color:#627786;opacity:.9}

/* B19 Consultation */
.consultation-btn{border:1px solid #294052;background:#0d1d29;color:#e8f0f5;border-radius:10px;padding:9px 13px;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:7px;line-height:1;transition:background .15s,border-color .15s,transform .15s}.consultation-btn:hover{background:#132b3a;border-color:#3a596d}.consultation-btn:active{transform:translateY(1px)}.consultation-icon{font-size:16px;line-height:1;display:inline-block;transform:translateY(-.5px)}
.consultation-modal{display:none;position:fixed;inset:0;z-index:9999;align-items:center;justify-content:center;padding:20px}.consultation-modal.open{display:flex}
.consultation-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.68)}.consultation-dialog{position:relative;width:min(520px,100%);max-height:90vh;overflow:auto;border-radius:18px;padding:24px;background:var(--panel,#171b22);border:1px solid rgba(255,255,255,.12);box-shadow:0 20px 70px rgba(0,0,0,.35);direction:rtl}
.consultation-dialog h2{margin:0 0 8px}.consultation-intro{opacity:.72;margin:0 0 18px}.consultation-close{position:absolute;left:14px;top:10px;border:0;background:transparent;color:inherit;font-size:28px;cursor:pointer}
#consultationForm{display:grid;gap:13px}#consultationForm label{display:grid;gap:6px}#consultationForm input,#consultationForm select,#consultationForm textarea{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.14);background:#101c28;color:#e8f0f5;border-radius:10px;padding:10px;font:inherit;color-scheme:dark}#consultationForm select option{background:#101c28;color:#e8f0f5}#consultationForm select:focus{outline:none;border-color:#5b7283;box-shadow:0 0 0 2px rgba(91,114,131,.16)}.consultation-submit{border:0;border-radius:10px;padding:10px 14px;cursor:pointer;font-family:inherit}.consultation-message{min-height:24px;font-size:.92rem}

/* B20 Advertising & Featured Content — hidden until a CMS placement is active. */
.ad-slots{display:grid;grid-template-columns:1fr;gap:14px;margin:18px 0}.ad-slot{min-width:0;overflow:hidden;border:1px solid rgba(255,255,255,.10);border-radius:16px;background:var(--panel,#101820);box-shadow:0 10px 30px rgba(0,0,0,.12)}.ad-slot>a{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:stretch;color:inherit;text-decoration:none;min-height:150px}.ad-slot:not(:has(a)){padding:18px}.ad-slot img{width:100%;height:100%;min-height:150px;max-height:260px;object-fit:cover;display:block}.ad-copy{padding:20px;display:flex;flex-direction:column;justify-content:center;gap:8px}.ad-copy strong{font-size:18px;line-height:1.7}.ad-copy p{margin:0;color:#aebbc4;line-height:1.9;white-space:pre-line}.ad-cta{display:inline-flex;align-self:flex-start;margin-top:4px;padding:7px 11px;border:1px solid #31596d;border-radius:8px;color:#dceaf1;background:#0d202c;font-size:12px}.ad-type-affiliate{border-color:rgba(32,212,119,.28)}.ad-type-affiliate .ad-cta{border-color:rgba(32,212,119,.35);color:#79e8aa}@media(max-width:700px){.ad-slot>a{grid-template-columns:1fr}.ad-slot img{max-height:210px}.ad-copy{padding:16px}}


/* B20 placement-aware layout: content is mounted into its configured location. */
.ad-mount{min-width:0}.ad-mount-hero{margin:16px 0 0}.ad-mount-featured{margin:16px 0}.ad-mount-news{margin:10px 0}.ad-mount-tools{margin:0}.ad-mount .ad-slot{margin:0}
.ad-mount-hero .ad-slot>a{min-height:170px}.ad-mount-hero .ad-slot img{min-height:170px;max-height:300px}.ad-mount-featured .ad-slot{min-height:120px}.tools-content-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.42fr);gap:12px;align-items:start}.tools-content-layout .tools-grid{min-width:0}.ad-mount-tools .ad-slot,.ad-mount-news .ad-slot{border-radius:10px}.ad-mount-tools .ad-slot>a,.ad-mount-news .ad-slot>a{display:flex;min-height:82px;align-items:center}.ad-mount-tools .ad-slot img,.ad-mount-news .ad-slot img{width:110px;height:82px;min-height:82px;max-height:82px;object-fit:cover;flex:0 0 110px}.ad-slot-compact .ad-copy{padding:12px 14px;gap:4px}.ad-slot-compact .ad-copy strong{font-size:13px;line-height:1.6}.ad-slot-compact .ad-copy p{font-size:11px;line-height:1.7}.ad-slot-compact .ad-cta{font-size:10px;padding:5px 8px}.ad-label{color:#6f8a99;font-size:10px}.ad-mount-tools .ad-slot:not(:has(a)),.ad-mount-news .ad-slot:not(:has(a)){padding:0}
@media(max-width:700px){.tools-content-layout{grid-template-columns:1fr}.ad-mount-tools{order:2}.ad-mount-tools .ad-slot>a,.ad-mount-news .ad-slot>a{min-height:74px}.ad-mount-tools .ad-slot img,.ad-mount-news .ad-slot img{width:90px;height:74px;min-height:74px;max-height:74px;flex-basis:90px}.ad-mount-hero .ad-slot>a{min-height:140px}.ad-mount-hero .ad-slot img{min-height:140px}}

/* B22 Subscription UI — isolated from existing layout. */
.subscription-overlay{display:none;position:fixed;inset:0;z-index:10020;align-items:center;justify-content:center;padding:20px}.subscription-overlay.open{display:flex}.subscription-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.7)}.subscription-dialog{position:relative;width:min(560px,100%);max-height:88vh;overflow:auto;background:var(--panel,#171b22);border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:24px;box-shadow:0 24px 80px rgba(0,0,0,.4);direction:rtl}.subscription-close{position:absolute;left:14px;top:8px;border:0;background:transparent;color:inherit;font-size:28px;cursor:pointer}.subscription-dialog h2{margin:0 0 8px}.subscription-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.subscription-kpi{padding:13px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:rgba(255,255,255,.025)}.subscription-kpi span{display:block;opacity:.68;font-size:.82rem;margin-bottom:5px}.subscription-kpi strong{font-size:1rem}.subscription-instruction{padding:14px;border-radius:12px;background:#101c28;border:1px solid rgba(255,255,255,.1);line-height:1.8}.subscription-cta{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.subscription-cta button{border:1px solid #294052;background:#0d1d29;color:#e8f0f5;border-radius:10px;padding:10px 14px;cursor:pointer;font-family:inherit}.premium-lock{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(8,16,23,.72);backdrop-filter:blur(2px);border-radius:inherit;z-index:2}.tool.premium-locked{position:relative}.tool.premium-locked .tool-icon{filter:grayscale(.25)}.subscription-mini{display:flex;gap:10px;flex-wrap:wrap;margin-top:5px;font-size:.82rem;opacity:.9}.subscription-settings-card{padding:18px;border:1px solid rgba(255,255,255,.1);border-radius:14px;margin-bottom:18px;background:rgba(255,255,255,.02)}

.editorial-public-badge{display:inline-block}

/* B34 — CMS-managed header/footer UI. Existing dark baseline remains the default. */
#footerQuickLinks a{display:block;font-size:10px;margin:7px 0}
.footer .socials a{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#102235;color:#fff;font-size:11px;text-decoration:none}
.footer .socials a:hover{border-color:#20d477}
.light-mode{--bg:#f3f6f8;--panel:#fff;--panel2:#eef3f6;--text:#16222b;--muted:#647481;--border:#d4dde3;color:var(--text);background:var(--bg)}
.light-mode .app-shell,.light-mode .main,.light-mode .footer{background:var(--bg);color:var(--text)}
.light-mode .topbar,.light-mode .market-card,.light-mode .panel,.light-mode .tool,.light-mode .footer{border-color:var(--border)}
.light-mode .topbar,.light-mode .market-card,.light-mode .panel,.light-mode .tool{background:var(--panel)}
.light-mode .brand strong,.light-mode .footer strong,.light-mode .panel h2,.light-mode .market-card strong,.light-mode .tool{color:var(--text)}
.light-mode .brand small,.light-mode .footer p,.light-mode .footer h3,.light-mode .footer a,.light-mode .chart-footer{color:var(--muted)}
.light-mode .icon-btn,.light-mode .login-btn,.light-mode .signup-btn{background:#fff;color:var(--text);border-color:var(--border)}
.light-mode .main-nav{background:#fff;border-color:var(--border)}
.light-mode .nav-item{color:#52636f}
.light-mode .search-wrap input{background:#fff;color:var(--text);border-color:var(--border)}


/* B35 — Light mode visual harmonization. Dark baseline remains unchanged. */
.light-mode body{background:var(--bg);color:var(--text)}
.light-mode .topbar{border-bottom-color:var(--border)}
.light-mode .brand-mark{color:var(--green)}
.light-mode .search-wrap input{background:#fff;color:var(--text);border-color:var(--border)}
.light-mode .search-results{background:#fff;border-color:var(--border);box-shadow:0 18px 40px rgba(30,45,55,.14)}
.light-mode .search-results div{color:var(--text)}
.light-mode .search-results div:hover{background:#eef3f6}
.light-mode .main-nav{background:#fff;border-color:var(--border)}
.light-mode .nav-item{border-left-color:var(--border);color:#52636f}
.light-mode .nav-item:hover,.light-mode .nav-item.active{background:#eef4f7;color:#182630}
.light-mode .ticker-grid{background:#fff;border-color:var(--border)}
.light-mode .ticker{border-left-color:var(--border)}
.light-mode .ticker-title{color:#3f505b}
.light-mode .ticker-price{color:#182630}
.light-mode .ticker-footer{border-top-color:var(--border);color:#6b7b86}
.light-mode .market-card{background:#fff;border-color:var(--border)}
.light-mode .card-head{border-bottom-color:var(--border)}
.light-mode .card-head a{color:#73838e}
.light-mode .card-table th{color:#71818c}
.light-mode .card-table td{border-top-color:#e1e7eb;color:#263640}
.light-mode .dashboard-grid .panel,.light-mode .panel{background:#fff;border-color:var(--border)}
.light-mode .chart-box{background-image:linear-gradient(#e8edf0 1px,transparent 1px),linear-gradient(90deg,#e8edf0 1px,transparent 1px);border-bottom-color:#dce4e8}
.light-mode .chart-meta strong{color:var(--text)}
.light-mode .panel-link{border-top-color:#e0e7eb}
.light-mode .data-row{border-top-color:#e1e7eb;color:#344650}
.light-mode .table-head{color:#71818c}
.light-mode .news-item{border-top-color:#e1e7eb}
.light-mode .news-tag{background:#eef3f6;color:#60717c}
.light-mode .tool{background:#fff;border-color:var(--border);color:var(--text)}
.light-mode .tools-mega-menu{background:#fff;border-color:var(--border);box-shadow:0 22px 55px rgba(30,45,55,.16)}
.light-mode .tools-menu-category{background:#f8fafb;border-color:var(--border)}
.light-mode .tools-menu-category h3{color:var(--text);border-bottom-color:#e0e7eb}
.light-mode .tools-menu-item{color:#41535e}
.light-mode .tools-menu-item:hover{background:#eef4f7;color:#182630}
.light-mode .footer{background:var(--bg);border-top-color:var(--border);color:var(--muted)}
.light-mode .footer strong{color:var(--text)}
.light-mode .footer h3{color:#344650}
.light-mode .footer a{color:#566974}
.light-mode .footer .socials a{background:#eaf1f4;color:#314650;border:1px solid #d5e0e5}
.light-mode .icon-btn,.light-mode .login-btn,.light-mode .signup-btn{background:#fff;color:var(--text);border-color:var(--border)}
.quick-content-modal{position:fixed;inset:0;z-index:10050;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(7,16,25,.55);backdrop-filter:blur(3px)}
.quick-content-modal.open{display:flex}
.quick-content-card{width:min(760px,100%);max-height:min(78vh,760px);overflow:auto;background:#0d1924;color:#e7eef5;border:1px solid #294052;border-radius:14px;padding:24px;box-shadow:0 25px 70px rgba(0,0,0,.35);position:relative}
.quick-content-card h2{margin:0 0 18px;font-size:20px;color:#fff;padding-left:36px}
.quick-content-body{white-space:pre-wrap;line-height:2;font-size:13px;color:#c9d5dc}
.quick-content-close{position:absolute;top:10px;left:12px;border:0;background:transparent;color:#cbd6dd;font-size:27px;cursor:pointer}
.light-mode .quick-content-modal{background:rgba(31,46,56,.28)}
.light-mode .quick-content-card{background:#fff;color:var(--text);border-color:var(--border);box-shadow:0 25px 70px rgba(30,45,55,.2)}
.light-mode .quick-content-card h2{color:var(--text)}
.light-mode .quick-content-body{color:#455862}
.light-mode .quick-content-close{color:#4b5d67}

/* B37 — Light mode for secondary pages only.
   Scope is limited to opened news/fund/tool overlays; no calculation or data logic is changed. */
.light-mode .funds-directory-overlay,
.light-mode #newsDetailOverlay,
.light-mode #newsDirectoryOverlay,
.light-mode #compoundToolOverlay,
.light-mode #loanToolOverlay,
.light-mode #roiToolOverlay,
.light-mode #goldIntrinsicOverlay,
.light-mode #goldBubbleOverlay,
.light-mode #valueInvestmentOverlay,
.light-mode #profitComparisonOverlay,
.light-mode #riskToolOverlay,
.light-mode #currencyToolOverlay,
.light-mode #taxToolOverlay{background:rgba(31,46,56,.28)}

.light-mode .funds-directory,
.light-mode .news-detail-card,
.light-mode .news-directory-card,
.light-mode .compound-card,
.light-mode .loan-card,
.light-mode .roi-card,
.light-mode .gold-card,
.light-mode .bubble-card,
.light-mode .vi-card,
.light-mode .pc-card,
.light-mode .risk-card,
.light-mode .currency-card,
.light-mode .tax-card{background:#fff;color:#16222b;border-color:#d4dde3;box-shadow:0 25px 70px rgba(30,45,55,.18)}

.light-mode .funds-directory-head,
.light-mode .news-detail-top,
.light-mode .news-directory-top,
.light-mode .loan-top,
.light-mode .roi-top,
.light-mode .gold-top,
.light-mode .bubble-top,
.light-mode .vi-top,
.light-mode .pc-top,
.light-mode .risk-top,
.light-mode .currency-top,
.light-mode .tax-top{border-bottom-color:#e0e7eb}

.light-mode .funds-directory-head p,
.light-mode .news-detail-meta,
.light-mode .news-directory-meta,
.light-mode .loan-subtitle,
.light-mode .roi-subtitle,
.light-mode .gold-subtitle,
.light-mode .bubble-subtitle,
.light-mode .vi-subtitle,
.light-mode .pc-subtitle,
.light-mode .risk-subtitle,
.light-mode .currency-subtitle,
.light-mode .tax-subtitle{color:#687984}

.light-mode .funds-directory-close,
.light-mode .news-detail-back,
.light-mode .news-directory-close,
.light-mode .loan-close,
.light-mode .roi-close,
.light-mode .gold-close,
.light-mode .bubble-close,
.light-mode .vi-close,
.light-mode .pc-close,
.light-mode .risk-close,
.light-mode .currency-close,
.light-mode .tax-close{background:#f5f8fa;color:#263640;border-color:#d4dde3}

.light-mode .funds-directory-table th{background:#f1f5f7;color:#536772;border-bottom-color:#dbe3e8}
.light-mode .funds-directory-table td{border-bottom-color:#e1e7eb;color:#344650}
.light-mode .fund-status{background:#eef3f6;color:#60717c}
.light-mode .fund-status.live{background:#e4f6ed;color:#168a52}
.light-mode .fund-status.stale{background:#fff4d7;color:#8a6500}
.light-mode .funds-empty{color:#70818e}

.light-mode .news-directory-item{border-bottom-color:#e1e7eb}
.light-mode .news-directory-item:hover{background:#f4f8fa}
.light-mode .news-directory-thumb{background:#eef3f6;color:#15965b}
.light-mode .news-directory-title{color:#1d2c35}
.light-mode .news-detail-title{color:#16222b}
.light-mode .news-detail-summary{color:#455862}
.light-mode .news-detail-source{color:#168a52}

.light-mode .compound-card .compound-body,
.light-mode .loan-body,
.light-mode .roi-body,
.light-mode .gold-body,
.light-mode .bubble-body,
.light-mode .vi-body,
.light-mode .pc-body,
.light-mode .risk-body,
.light-mode .currency-body,
.light-mode .tax-body{color:#263640}

.light-mode .loan-form,.light-mode .loan-result,
.light-mode .gold-form,.light-mode .gold-result,
.light-mode .bubble-form,.light-mode .bubble-result,
.light-mode .vi-form,.light-mode .vi-result,
.light-mode .pc-form,.light-mode .pc-result,
.light-mode .risk-form,.light-mode .risk-result,
.light-mode .currency-form,.light-mode .currency-result,
.light-mode .tax-form,.light-mode .tax-result{background:#f7fafb;border-color:#dbe3e8}

.light-mode .loan-field label,.light-mode .roi-field label,
.light-mode .gold-field label,.light-mode .bubble-field label,
.light-mode .vi-field label,.light-mode .pc-field label,
.light-mode .risk-field label,.light-mode .currency-field label,
.light-mode .tax-field label{color:#637681}

.light-mode .loan-field input,.light-mode .roi-field input,
.light-mode .gold-field input,.light-mode .bubble-field input,
.light-mode .vi-field input,.light-mode .pc-field input,
.light-mode .risk-field input,.light-mode .risk-field select,
.light-mode .currency-field input,.light-mode .currency-field select,
.light-mode .tax-field input,.light-mode .tax-field select{background:#fff;color:#1d2c35;border-color:#cbd7de}

.light-mode .loan-kpi,.light-mode .roi-kpi,
.light-mode .gold-kpi,.light-mode .currency-kpi,.light-mode .tax-kpi{background:#fff;border-color:#dbe3e8}
.light-mode .loan-kpi small,.light-mode .roi-kpi small,
.light-mode .gold-kpi small,.light-mode .currency-kpi small,.light-mode .tax-kpi small{color:#71838e}
.light-mode .loan-kpi strong,.light-mode .roi-kpi strong,
.light-mode .gold-kpi strong,.light-mode .currency-kpi strong,.light-mode .tax-kpi strong{color:#1d2c35}

.light-mode .loan-summary,.light-mode .roi-summary,
.light-mode .gold-summary,.light-mode .currency-summary,.light-mode .tax-summary{background:#fff;color:#455862;border-color:#dbe3e8}
.light-mode .loan-note,.light-mode .roi-note,.light-mode .gold-note,
.light-mode .currency-note,.light-mode .tax-note{color:#71838e}
.light-mode .loan-table-wrap{border-color:#dbe3e8}
.light-mode .loan-table th{background:#eef3f6;color:#60717c}
.light-mode .loan-table th,.light-mode .loan-table td{border-bottom-color:#e1e7eb;color:#344650}
.light-mode .loan-empty,.light-mode .roi-empty,.light-mode .gold-empty,
.light-mode .currency-empty,.light-mode .tax-empty{color:#71838e}
.light-mode .risk-list{border-color:#dbe3e8}
.light-mode .risk-list div{border-bottom-color:#e1e7eb;color:#344650}
.light-mode .risk-smart-note{background:#eaf7f0;border-color:#b9dfca;color:#26704c}
.light-mode .risk-summary{background:#fff;color:#455862;border-color:#dbe3e8}
.light-mode .risk-badge{background:#e8f7ef;border-color:#a9d9c0;color:#26704c}
.light-mode .risk-badge.warn{background:#fff6dd;border-color:#ead48b;color:#826300}
.light-mode .risk-badge.danger{background:#fdebed;border-color:#e5b5bb;color:#9b3d48}

/* B39 follow-up: secondary market details inside the بورس directory */
.market-subsection{margin-top:18px;padding-top:14px;border-top:1px solid rgba(127,127,127,.18)}
.market-subsection h3{margin:0 0 10px;font-size:1rem}
.market-subsection .funds-directory-table-wrap{max-height:320px}
