/* ============================================================
   Fund Detail — advanced component styles (tab 1-6 extras)
   ============================================================ */

.tab .t-emoji { margin-right: 7px; font-size: 13px; }
.breadcrumb .bc-link { cursor: pointer; }

/* ---------- NAV HEATMAP ---------- */
#heatmap { position: relative; overflow-x: auto; padding-bottom: 4px; }
.hm-months { display: flex; gap: 3px; padding-left: 2px; margin-bottom: 4px; }
.hm-month { width: 13px; font-size: 9px; color: var(--t3); font-family: var(--mono); white-space: nowrap; flex: none; }
.hm-grid { display: flex; gap: 3px; }
.hm-col { display: flex; flex-direction: column; gap: 3px; }
.hm-cell { width: 13px; height: 13px; border-radius: 3px; flex: none; }
.hm-cell.empty { background: transparent !important; }
.hm-legend { display: flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 11px; color: var(--t3); font-family: var(--mono); }
.hm-legend .hm-cell { width: 11px; height: 11px; }
.hm-tooltip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: rgba(8,25,41,0.96); border: 1px solid var(--b3); color: var(--t1);
  font-family: var(--mono); font-size: 11px; padding: 5px 9px; border-radius: 7px; white-space: nowrap; z-index: 5;
  transform: translateX(-50%);
}

/* ---------- INTERACTIVE CALCULATOR ---------- */
.calc-grid { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 22px; align-items: center; }
.calc-controls { display: flex; flex-direction: column; gap: 16px; }
.calc-field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--t2); }
.calc-field b { color: var(--t1); font-family: var(--mono); }
.calc-input { display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--b2); border-radius: var(--r8); padding: 0 12px; }
.calc-input .pre { color: var(--t3); font-family: var(--mono); }
.calc-input input { background: none; border: none; outline: none; color: var(--t1); font-family: var(--mono); font-size: 15px; padding: 11px 8px; width: 100%; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 4px; background: var(--bg3); border: 1px solid var(--b1); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--a2)); cursor: pointer; box-shadow: 0 2px 8px rgba(201,152,42,0.5); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--a2); cursor: pointer; }
.calc-result { display: flex; align-items: center; justify-content: space-around; gap: 12px; background: linear-gradient(120deg, rgba(201,152,42,0.10), rgba(232,184,75,0.05)); border: 1px solid var(--b2); border-radius: var(--r12); padding: 20px; }
.cr-block { text-align: center; }
.cr-block .l { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.cr-block .v { font-family: var(--mono); font-weight: 600; font-size: 18px; color: var(--t1); }
.cr-block.big .v { font-size: 26px; }
.cr-arrow { color: var(--t3); font-size: 20px; }

/* ---------- MANAGER + STRATEGY ---------- */
.mgr-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mgr-av { width: 50px; height: 50px; border-radius: 14px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--bg); background: linear-gradient(135deg, var(--a), var(--a2)); }
.mgr-name { font-family: var(--display); font-weight: 600; font-size: 17px; }
.mgr-sub { font-size: 12.5px; color: var(--t2); margin-top: 2px; }
.mgr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mgr-stats > div { background: var(--bg3); border: 1px solid var(--b1); border-radius: var(--r8); padding: 12px; }
.mgr-stats .l { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .04em; }
.mgr-stats .v { font-family: var(--mono); font-weight: 600; font-size: 16px; margin-top: 5px; }
.strat-text { font-size: 14px; color: var(--t2); line-height: 1.65; margin: 4px 0 16px; }
.strat-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- QUARTILE ---------- */
.quartile { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.q-box { text-align: center; padding: 14px 6px; border-radius: var(--r8); background: var(--bg3); border: 1px solid var(--b1); opacity: .55; }
.q-box.on { opacity: 1; background: linear-gradient(135deg, rgba(201,152,42,0.18), rgba(232,184,75,0.10)); border-color: var(--b3); box-shadow: 0 0 0 1px var(--b3); }
.q-box .q-n { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--t1); }
.q-box .q-l { font-size: 11px; color: var(--t3); margin-top: 2px; }
.q-text { font-size: 13.5px; color: var(--t2); line-height: 1.6; margin: 0; }
.q-text b { color: var(--t1); }

/* ---------- SIMULATOR ---------- */
.sim-grid, .goal-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; }
.sim-controls, .goal-controls { display: flex; flex-direction: column; gap: 14px; }
.sim-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.sim-out > div, .goal-result { }
.sim-out .l { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .04em; }
.sim-out .v { font-family: var(--mono); font-weight: 600; font-size: 16px; margin-top: 4px; }
.scenario-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.scen-card { background: var(--bg3); border: 1px solid var(--b1); border-radius: var(--r8); padding: 14px; text-align: center; }
.scen-card .scen-n { font-size: 12px; color: var(--t2); }
.scen-card .scen-cagr { font-family: var(--mono); font-size: 11px; color: var(--t3); margin: 4px 0 8px; }
.scen-card .scen-v { font-family: var(--mono); font-weight: 600; font-size: 17px; color: var(--t1); }

/* ---------- GOAL ---------- */
.goal-result { background: var(--bg3); border: 1px solid var(--b1); border-radius: var(--r12); padding: 16px; margin-top: 4px; }
.gr-big .l { font-size: 12px; color: var(--t3); text-transform: uppercase; letter-spacing: .05em; }
.gr-big .v { font-family: var(--mono); font-weight: 700; font-size: 28px; color: var(--t1); margin: 6px 0 12px; }
.gr-split { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--t2); border-top: 1px solid var(--b1); padding-top: 12px; }
.gr-split b { font-family: var(--mono); color: var(--t1); float: right; }

/* ---------- PEERS ---------- */
.peer-table-wrap { overflow-x: auto; }
.peer-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.peer-table th, .peer-table td { padding: 13px 14px; text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; border-bottom: 1px solid var(--b1); font-variant-numeric: tabular-nums; }
.peer-table th { font-family: var(--body); font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .05em; text-align: right; }
.peer-table th.l, .peer-table td.l { text-align: left; }
.peer-table td.l { font-family: var(--body); }
.peer-table .pf-name { font-weight: 600; color: var(--t1); font-size: 13px; }
.peer-table .pf-amc { font-size: 11px; color: var(--t3); }
.peer-table col.me, .peer-table .me-col { background: rgba(201,152,42,0.10); }
.peer-table th.me-col { color: var(--a); }
.peer-table .best { color: var(--green); }
.peer-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--t3); flex-wrap: wrap; }
.peer-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* ---------- AMC PROFILE ---------- */
.amc-hero { display: flex; align-items: center; gap: 18px; padding: 22px; }
.amc-hero .logo-lg { width: 64px; height: 64px; border-radius: 16px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--bg); background: linear-gradient(135deg, var(--a), var(--a2)); box-shadow: 0 4px 18px rgba(201,152,42,0.4); }
.amc-hero h3 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; }
.amc-hero .amc-meta { font-size: 12.5px; color: var(--t3); font-family: var(--mono); margin-top: 4px; }
.amc-desc { font-size: 14px; color: var(--t2); line-height: 1.65; }
.amc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.amc-stat { padding: 16px; }
.amc-stat .l { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .05em; }
.amc-stat .v { font-family: var(--display); font-weight: 600; font-size: 22px; margin-top: 6px; }
.amc-fund-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.amc-fund-card { padding: 14px; cursor: pointer; transition: border-color .15s, transform .15s; }
.amc-fund-card:hover { border-color: var(--b3); transform: translateY(-2px); }
.amc-fund-card .afc-cat { font-size: 11px; color: var(--a); text-transform: uppercase; letter-spacing: .05em; }
.amc-fund-card .afc-name { font-size: 13.5px; font-weight: 600; color: var(--t1); margin: 5px 0 8px; line-height: 1.3; }
.amc-fund-card .afc-foot { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; }

/* ---------- STYLE BOX (Morningstar 3x3) ---------- */
.style-box { display: grid; grid-template-columns: auto repeat(3, 1fr); grid-template-rows: auto repeat(3, 40px); gap: 4px; max-width: 340px; }
.style-box .sb-corner { }
.style-box .sb-col-h, .style-box .sb-row-h { font-size: 10px; color: var(--t3); display: grid; place-items: center; font-family: var(--mono); text-transform: uppercase; }
.style-box .sb-row-h { writing-mode: vertical-rl; transform: rotate(180deg); }
.style-box .sb-cell { background: var(--bg3); border: 1px solid var(--b1); border-radius: 5px; }
.style-box .sb-cell.on { background: linear-gradient(135deg, var(--a), var(--a2)); border-color: transparent; box-shadow: 0 2px 10px rgba(201,152,42,0.4); }

/* ---------- CONCENTRATION ---------- */
.conc-bar { height: 10px; border-radius: 5px; background: var(--bg3); overflow: hidden; margin: 10px 0 6px; }
.conc-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--a), var(--gold)); }
.conc-note { font-size: 12px; color: var(--t3); }

/* ---------- CORRELATION MATRIX ---------- */
.corr-wrap { overflow-x: auto; }
.corr-matrix { border-collapse: separate; border-spacing: 2px; }
.corr-matrix td, .corr-matrix th { width: 34px; height: 34px; text-align: center; font-family: var(--mono); font-size: 10px; }
.corr-matrix th { color: var(--t3); font-weight: 500; }
.corr-matrix th.row { text-align: right; padding-right: 6px; white-space: nowrap; }
.corr-cell { border-radius: 4px; color: #fff; font-size: 9px; }

/* up/down capture */
.capture-row { display: flex; gap: 14px; }
.capture-card { flex: 1; padding: 16px; text-align: center; }
.capture-card .cv { font-family: var(--mono); font-weight: 700; font-size: 26px; }
.capture-card .cl { font-size: 12px; color: var(--t2); margin-top: 4px; }

/* notify-me empty */
.notify-form { display: flex; gap: 8px; max-width: 360px; margin: 16px auto 0; }
.notify-form input { flex: 1; background: var(--bg3); border: 1px solid var(--b2); border-radius: var(--r8); padding: 10px 12px; color: var(--t1); font-size: 13px; outline: none; }
.notify-form button { border: none; background: linear-gradient(135deg, var(--a), var(--a2)); color: var(--bg); border-radius: var(--r8); padding: 10px 16px; font-weight: 600; font-size: 13px; }

.source-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--green); background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); padding: 2px 8px; border-radius: 999px; }

@media (max-width: 900px) {
  .calc-grid, .sim-grid, .goal-grid { grid-template-columns: 1fr; }
  .amc-stats { grid-template-columns: 1fr 1fr; }
  .calc-result { flex-wrap: wrap; }
}
