/* Pro dashboard overlay — intentionally local so this patch can be applied even
   when the supplied archive omitted /shared/assets. */
/* One theme-icon contract across every Hub page. Older Home/Admin markup used
   .theme-sun/.theme-moon while newer pages use .theme-icon-sun/.theme-icon-moon.
   Supporting both prevents the two glyphs from stacking or disappearing. */
.theme-toggle-button { display:inline-flex; align-items:center; justify-content:center; }
.theme-toggle-button .theme-icon,
.theme-toggle-button .theme-sun,
.theme-toggle-button .theme-moon { width:20px; height:20px; display:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:0 0 20px; }
html[data-theme="dark"] .theme-toggle-button .theme-icon-sun,
html[data-theme="dark"] .theme-toggle-button .theme-sun { display:inline-block; }
html[data-theme="dark"] .theme-toggle-button .theme-icon-moon,
html[data-theme="dark"] .theme-toggle-button .theme-moon { display:none; }
html:not([data-theme="dark"]) .theme-toggle-button .theme-icon-sun,
html:not([data-theme="dark"]) .theme-toggle-button .theme-sun { display:none; }
html:not([data-theme="dark"]) .theme-toggle-button .theme-icon-moon,
html:not([data-theme="dark"]) .theme-toggle-button .theme-moon { display:inline-block; }


/* v3.0.1 hotfixes: keep advanced filters at a predictable 3-per-row maximum,
   and let the symbol page order book live under the chart at full width. */
.filter-primary,
.filter-group-grid { align-items:start; }
.symbol-main-grid { grid-template-columns:1fr; }
#marketDepth .table-scroll { overflow-x:visible; }
#marketDepth .depth-table { min-width:100%; table-layout:fixed; }

.v2-insight-grid { align-items:stretch; }
.v2-insight-grid > .panel { min-width:0; }
#specialInsightPanel { grid-column:1 / -1; }
#specialInsight { min-width:0; }

.option-trend-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.option-trend-note { display:flex; align-items:center; gap:12px; flex-wrap:wrap; color:var(--muted); font-size:12px; }
.option-trend-note span { display:inline-flex; align-items:center; gap:5px; }
.option-trend-note i { width:9px; height:9px; border-radius:3px; }
.option-trend-note i.call, .option-trend-stack i.call { background:var(--green); }
.option-trend-note i.put, .option-trend-stack i.put { background:var(--chart-2, #d99a24); }
.option-trend-chart { height:330px; display:flex; align-items:stretch; gap:2px; padding:20px 8px 0; border-bottom:1px solid var(--line); direction:ltr; overflow:hidden; }
.option-trend-column { flex:1 1 0; min-width:3px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; outline:none; position:relative; cursor:crosshair; }
.option-trend-column:focus-visible { box-shadow:inset 0 0 0 2px var(--accent); border-radius:4px; }
.option-trend-stack { width:min(78%,18px); height:calc(100% - 26px); display:flex; flex-direction:column-reverse; justify-content:flex-start; align-items:stretch; }
.option-trend-stack i { display:block; min-height:0; transition:filter .12s ease, opacity .12s ease; }
.option-trend-column:hover .option-trend-stack i { filter:brightness(1.1); }
.option-trend-column small { height:24px; line-height:24px; color:var(--muted); font-size:10px; white-space:nowrap; transform:rotate(-35deg); transform-origin:center; }
.option-trend-footer { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:10px; color:var(--muted); font-size:11px; }
.pro-chart-tooltip { position:fixed; inset:0 auto auto 0; z-index:2000; max-width:310px; padding:9px 11px; border-radius:9px; background:var(--chart-tooltip-bg,#0d1a30); color:var(--chart-tooltip-text,#fff); box-shadow:0 8px 24px rgba(6,14,32,.28); font-size:12px; direction:rtl; pointer-events:none; will-change:transform; }
.pro-chart-tooltip[hidden] { display:none !important; }

/* Wide table stability: reserve scrollbar geometry and isolate repaint so live
   updates cannot shift the viewport or the sticky identity columns. */
.v2-market-page .table-scroll { scrollbar-gutter:stable both-edges; overflow-anchor:none; contain:layout paint; }
.v2-market-page .data-table { table-layout:auto; min-width:max-content; }
.v2-market-page .data-table th.watch-column, .v2-market-page .data-table td.watch-column { position:sticky; right:0; z-index:4; width:48px; min-width:48px; max-width:48px; background:var(--panel); }
.v2-market-page .data-table th.symbol-column, .v2-market-page .data-table td.symbol-cell { position:sticky; right:48px; z-index:3; min-width:132px; background:var(--panel); }

.shareholder-filter-panel { padding:16px; }
.shareholder-filter-grid { display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:12px; }
.shareholder-filter-grid label { display:grid; gap:6px; }
.shareholder-filter-grid label > span { color:var(--muted); font-size:11px; }
.shareholder-filter-grid input, .shareholder-filter-grid select { width:100%; min-height:42px; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--text); padding:8px 10px; }
.filter-summary-line { display:flex; justify-content:space-between; gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }

@media (max-width:900px) {
  .option-trend-chart { height:270px; padding-inline:2px; }
  .shareholder-filter-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:560px) {
  .shareholder-filter-grid { grid-template-columns:1fr; }
  .option-trend-note b { width:100%; }
}

/* Options has one first-class historical surface: the stacked Call/Put trend.
   Its generic history panel stays in the DOM only as the shared feed/control
   source, and is never duplicated visually. */
#historyPanel[hidden] { display:none !important; }
.option-trend-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.option-trend-controls .history-filter-toggle,
.option-trend-controls .history-range { margin:0; }
.option-trend-scroll { width:100%; overflow-x:auto; overflow-y:hidden; scrollbar-gutter:stable; overscroll-behavior-inline:contain; }
.option-trend-scroll .option-trend-chart { width:100%; }
@media (max-width:700px) {
  .option-trend-controls { width:100%; justify-content:space-between; }
}

.fund-insight-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; color:var(--muted); font-size:12px; }
.fund-date-control { display:flex; align-items:center; gap:8px; color:var(--text); }
.fund-date-control select { min-height:38px; min-width:150px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--text); padding:6px 10px; }

/* Funds: keep FIPIran's daily asset allocation visually separate from the
   monthly Codal portfolio statement. */
.fund-allocation-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.fund-allocation-card { min-width:0; border:1px solid var(--line); border-radius:14px; padding:14px; background:color-mix(in srgb,var(--panel) 94%,var(--accent) 6%); }
.fund-allocation-card > header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:13px; }
.fund-allocation-card > header div { display:grid; gap:3px; }
.fund-allocation-card > header b { font-size:13px; }
.fund-allocation-card > header small { color:var(--muted); font-size:10px; }
.source-pill { display:inline-flex; align-items:center; justify-content:center; min-height:25px; padding:3px 8px; border-radius:999px; border:1px solid var(--line); font-size:10px; white-space:nowrap; }
.source-pill.live { color:var(--green); background:color-mix(in srgb,var(--green) 9%,transparent); border-color:color-mix(in srgb,var(--green) 28%,var(--line)); }
.source-pill.monthly { color:var(--accent); background:color-mix(in srgb,var(--accent) 9%,transparent); border-color:color-mix(in srgb,var(--accent) 28%,var(--line)); }
.fund-allocation-row { display:grid; grid-template-columns:minmax(64px,auto) minmax(80px,1fr) minmax(56px,auto); align-items:center; gap:9px; min-height:31px; }
.fund-allocation-row > span { color:var(--muted); font-size:11px; }
.fund-allocation-row > strong { text-align:left; direction:ltr; font-size:11px; }
.fund-allocation-track { height:7px; overflow:hidden; border-radius:999px; background:color-mix(in srgb,var(--line) 80%,transparent); }
.fund-allocation-track > i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),var(--green)); transition:width .24s ease; }
.fund-monthly-flow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; padding-top:11px; border-top:1px dashed var(--line); }
.fund-monthly-flow span { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:10px; }
.fund-monthly-flow strong { color:var(--text); }

/* Bond bubbles must never inherit a global SVG/circle fill. The invisible hit
   layer is explicitly transparent and the visual mark gets its hue inline. */
.bond-bubble-hit { fill:transparent !important; stroke:transparent !important; pointer-events:all; cursor:crosshair; }
.bond-bubble-dot { vector-effect:non-scaling-stroke; transition:opacity .12s ease, filter .12s ease; }
.bond-bubble-dot:hover { filter:brightness(1.08); }

/* Strategy Lab Pro */
.strategy-pro-page { --strategy-glow:color-mix(in srgb,var(--accent) 18%,transparent); }
.strategy-pro-page .main-content { padding-bottom:86px; }
.strategy-pro-topbar { position:sticky; top:0; z-index:30; backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }
.strategy-entry-button { gap:7px; white-space:nowrap; box-shadow:0 7px 20px color-mix(in srgb,var(--accent) 15%,transparent); }
.strategy-entry-button > span:first-child { font-size:18px; line-height:1; }
.strategy-command-panel { position:relative; overflow:hidden; padding:18px; }
.strategy-command-panel::before { content:""; position:absolute; inset:-55% auto auto -8%; width:300px; height:300px; border-radius:50%; background:radial-gradient(circle,var(--strategy-glow),transparent 68%); pointer-events:none; }
.strategy-command-main { position:relative; z-index:1; display:grid; grid-template-columns:minmax(210px,1.25fr) repeat(2,minmax(150px,.8fr)) minmax(170px,.8fr); gap:12px; align-items:end; }
.strategy-source-inline { min-height:66px; display:grid; align-content:center; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--panel) 88%,var(--accent) 12%); }
.strategy-source-inline > span,.strategy-source-inline > small { color:var(--muted); font-size:10px; }
.strategy-source-inline > strong { font-size:17px; letter-spacing:-.02em; }
.strategy-template-strip { position:relative; z-index:1; display:grid; grid-template-columns:repeat(7,minmax(120px,1fr)); gap:8px; margin-top:15px; overflow-x:auto; padding-bottom:2px; scrollbar-width:thin; }
.strategy-template-strip button { min-width:126px; min-height:64px; display:grid; align-content:center; gap:4px; text-align:right; padding:10px 11px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--panel) 96%,var(--accent) 4%); color:var(--text); cursor:pointer; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.strategy-template-strip button:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--accent) 45%,var(--line)); background:color-mix(in srgb,var(--panel) 88%,var(--accent) 12%); box-shadow:0 10px 24px var(--strategy-glow); }
.strategy-template-strip button:active { transform:translateY(0) scale(.99); }
.strategy-template-strip button b { font-size:11px; direction:ltr; text-align:right; }
.strategy-template-strip button small { color:var(--muted); font-size:9px; }
.strategy-kpi-ribbon { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:14px 0; }
.strategy-kpi-card { min-width:0; min-height:96px; display:grid; align-content:center; gap:5px; padding:13px; border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:0 7px 22px color-mix(in srgb,var(--text) 5%,transparent); position:relative; overflow:hidden; }
.strategy-kpi-card::after { content:""; position:absolute; inset:auto 0 0; height:3px; background:var(--accent); opacity:.65; }
.strategy-kpi-card.positive::after { background:var(--green); }
.strategy-kpi-card.negative::after { background:var(--red); }
.strategy-kpi-card > span,.strategy-kpi-card > small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.strategy-kpi-card > span { font-size:10px; }
.strategy-kpi-card > strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:16px; }
.strategy-kpi-card > small { font-size:9px; }
.strategy-workbench-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(310px,.75fr); gap:14px; margin-bottom:14px; }
.strategy-settings-pro { display:grid; grid-template-columns:repeat(4,minmax(130px,1fr)); gap:11px; }
.strategy-greeks-pro { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-bottom:11px; }
.strategy-greeks-pro > div { display:grid; gap:4px; padding:11px; border:1px solid var(--line); border-radius:11px; background:color-mix(in srgb,var(--panel) 94%,var(--accent) 6%); }
.strategy-greeks-pro span { color:var(--muted); font-size:10px; }
.strategy-greeks-pro strong { direction:ltr; text-align:right; font-size:16px; }
.strategy-position-summary { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 12px; }
.strategy-position-summary > span { display:inline-flex; align-items:center; gap:5px; min-height:30px; padding:5px 9px; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:10px; background:color-mix(in srgb,var(--panel) 94%,var(--accent) 6%); }
.strategy-position-summary b { color:var(--text); }
.strategy-legs-table input,.strategy-legs-table select { min-width:78px; width:100%; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--text); padding:6px 7px; }
.strategy-legs-table td:first-child input { min-width:118px; }
.strategy-analysis-pro { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(300px,.75fr); gap:14px; margin-top:14px; }
.strategy-payoff-chart { min-height:430px; }
.scenario-matrix { display:grid; gap:6px; }
.scenario-matrix-head,.scenario-matrix-row { display:grid; grid-template-columns:.7fr 1fr 1.15fr 1.15fr; gap:8px; align-items:center; min-height:40px; padding:7px 9px; border-radius:9px; }
.scenario-matrix-head { min-height:34px; color:var(--muted); font-size:9px; background:color-mix(in srgb,var(--line) 46%,transparent); }
.scenario-matrix-row { border:1px solid transparent; background:color-mix(in srgb,var(--panel) 96%,var(--accent) 4%); font-size:10px; transition:border-color .14s ease,transform .14s ease; }
.scenario-matrix-row:hover { transform:translateX(-2px); border-color:color-mix(in srgb,var(--accent) 35%,var(--line)); }
.scenario-matrix-row.current { border-color:color-mix(in srgb,var(--accent) 45%,var(--line)); background:color-mix(in srgb,var(--panel) 88%,var(--accent) 12%); }
.strategy-chain-stats { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 11px; }
.strategy-chain-stats > span { display:inline-flex; align-items:center; gap:5px; min-height:29px; padding:5px 9px; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:10px; }
.strategy-chain-stats b { color:var(--text); }
.option-side-pill { display:inline-flex; align-items:center; justify-content:center; min-width:42px; min-height:24px; padding:3px 7px; border-radius:999px; border:1px solid var(--line); font-size:9px; direction:ltr; }
.option-side-pill.call { color:var(--green); background:color-mix(in srgb,var(--green) 8%,transparent); }
.option-side-pill.put { color:var(--red); background:color-mix(in srgb,var(--red) 8%,transparent); }
.chain-add-actions { display:flex; gap:5px; }
.strategy-back-button { white-space:nowrap; }

@media (max-width:1280px) {
  .strategy-template-strip { grid-template-columns:repeat(7,minmax(132px,1fr)); }
  .strategy-kpi-ribbon { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .strategy-settings-pro { grid-template-columns:repeat(3,minmax(130px,1fr)); }
}
@media (max-width:980px) {
  .strategy-command-main { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .strategy-workbench-grid,.strategy-analysis-pro { grid-template-columns:1fr; }
  .fund-allocation-grid { grid-template-columns:1fr; }
}
@media (max-width:700px) {
  .strategy-command-panel { padding:13px; }
  .strategy-command-main { grid-template-columns:1fr; }
  .strategy-settings-pro { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .strategy-kpi-ribbon { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .strategy-kpi-card { min-height:86px; }
  .strategy-analysis-pro { margin-top:10px; }
  .scenario-matrix { min-width:560px; }
  .strategy-scenario-panel { overflow-x:auto; }
  .fund-monthly-flow { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .strategy-settings-pro,.strategy-kpi-ribbon { grid-template-columns:1fr; }
}

/* The shared filter toggle can inherit an oversized chevron box on some
   deployments. Keep the open/close control compact and aligned with the other
   top-bar controls. */
.v2-filter-head .filter-toggle { width:auto !important; min-width:82px; min-height:38px !important; height:38px !important; padding:0 12px !important; display:inline-flex !important; align-items:center; justify-content:center; gap:9px; border-radius:10px !important; line-height:1 !important; }
.v2-filter-head .filter-toggle .filter-toggle-label { font-size:11px; line-height:1; }
.v2-filter-head .filter-toggle > b { display:block !important; flex:0 0 auto; width:8px !important; height:8px !important; margin:0 !important; padding:0 !important; border:solid currentColor !important; border-width:0 2px 2px 0 !important; border-radius:0 !important; background:none !important; transform:rotate(45deg); transition:transform .16s ease; }
.v2-filter-head .filter-toggle[aria-expanded="true"] > b { transform:rotate(225deg); }


/* Strategy Lab v2.9 — dense but readable professional workspace. */
.strategy-pro-page { font-variant-numeric:tabular-nums; }
.strategy-pro-page .panel { min-width:0; }
.strategy-pro-page .panel-header { gap:14px; padding-block:14px; }
.strategy-pro-page .panel-header h2 { line-height:1.45; margin-bottom:3px; }
.strategy-pro-page .panel-header p { line-height:1.8; max-width:80ch; }
.strategy-pro-page .field { display:grid; align-content:start; gap:6px; min-width:0; }
.strategy-pro-page .field > span,.strategy-pro-page .inline-field > span { line-height:1.55; font-size:10.5px; color:var(--muted); }
.strategy-pro-page .field > small { line-height:1.65; color:var(--muted); font-size:9px; }
.strategy-pro-page .field input,.strategy-pro-page .field select,.strategy-pro-page .inline-field input,.strategy-pro-page .inline-field select { min-height:40px; line-height:1.45; }
.strategy-pro-page input[type="number"],.strategy-pro-page input[data-money-input],.strategy-pro-page .strategy-money-input { direction:ltr; text-align:left; font-variant-numeric:tabular-nums; }
.strategy-live-row { display:flex; align-items:center; justify-content:space-between; gap:9px; padding-top:5px; margin-top:4px; border-top:1px dashed var(--line); }
.strategy-live-row > b { color:var(--green); font-size:10px; direction:rtl; white-space:nowrap; }
.switch-control { display:inline-flex; align-items:center; gap:7px; min-height:30px; cursor:pointer; user-select:none; line-height:1.4; }
.switch-control input { width:16px; height:16px; accent-color:var(--accent); margin:0; }
.switch-control span { font-size:10px; color:var(--text); }
.compact-switch { min-height:24px; }
.strategy-toggle-stack { display:grid; align-content:start; gap:6px; padding:8px 10px; border:1px solid var(--line); border-radius:11px; background:color-mix(in srgb,var(--panel) 96%,var(--accent) 4%); }
.strategy-kpi-ribbon { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (min-width:1640px) { .strategy-kpi-ribbon { grid-template-columns:repeat(8,minmax(0,1fr)); } }
.strategy-kpi-card { min-height:88px; padding:12px 13px; }
.strategy-kpi-card > strong { font-size:15px; line-height:1.45; }
.strategy-kpi-card > small { line-height:1.55; }
.strategy-risk-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.strategy-risk-details > div { min-width:0; display:grid; gap:4px; padding:9px 10px; border:1px solid var(--line); border-radius:10px; background:color-mix(in srgb,var(--panel) 96%,var(--accent) 4%); }
.strategy-risk-details > div span { color:var(--muted); font-size:9.5px; }
.strategy-risk-details > div strong { line-height:1.75; font-size:11px; overflow-wrap:anywhere; }
.strategy-risk-details > p { grid-column:1/-1; margin:2px 0 0; padding:9px 10px; border-radius:10px; line-height:1.85; color:var(--muted); background:color-mix(in srgb,var(--line) 25%,transparent); font-size:9.5px; }
.strategy-risk-warning { color:var(--chart-2,#b87900) !important; border:1px solid color-mix(in srgb,var(--chart-2,#d99a24) 28%,var(--line)); }
.strategy-builder-panel,.strategy-chain-panel { overflow:hidden; }
.strategy-legs-scroll,.strategy-chain-scroll { width:100%; overflow:auto; scrollbar-gutter:stable both-edges; overscroll-behavior-inline:contain; }
.strategy-legs-table { min-width:2480px; table-layout:auto; }
.strategy-chain-panel .chain-table { min-width:2900px; table-layout:auto; }
.strategy-legs-table th,.strategy-legs-table td,.strategy-chain-panel .chain-table th,.strategy-chain-panel .chain-table td { white-space:nowrap; vertical-align:middle; line-height:1.55; padding-block:8px; font-size:10px; }
.strategy-legs-table th,.strategy-chain-panel .chain-table th { font-size:9.5px; letter-spacing:0; }
.strategy-legs-table input,.strategy-legs-table select { min-width:82px; min-height:34px; padding:5px 7px; line-height:1.35; }
.strategy-legs-table .strategy-money-input { min-width:112px; }
.strategy-legs-table .strategy-use-col { width:78px; min-width:78px; }
.strategy-legs-table .strategy-symbol-col { min-width:130px; }
.strategy-legs-table th.strategy-use-col,.strategy-legs-table td.strategy-use-col { position:sticky; right:0; z-index:6; background:var(--panel); }
.strategy-legs-table th.strategy-symbol-col,.strategy-legs-table td.strategy-symbol-col { position:sticky; right:78px; z-index:5; background:var(--panel); box-shadow:-1px 0 0 var(--line); }
.strategy-leg-disabled { opacity:.48; }
.strategy-leg-disabled td { filter:saturate(.55); }
.strategy-row-check { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:58px; cursor:pointer; user-select:none; }
.strategy-row-check input { min-width:16px !important; width:16px !important; height:16px; margin:0; padding:0; accent-color:var(--accent); }
.strategy-row-check span { font-size:9.5px; }
.quote-stack { min-width:128px; display:grid; gap:2px; line-height:1.45; }
.quote-stack b { font-size:9.5px; font-weight:650; }
.quote-stack small { color:var(--muted); font-size:8.5px; }
.strategy-position-summary { padding-bottom:2px; }
.strategy-position-summary > span,.strategy-chain-stats > span { line-height:1.45; }
.strategy-payoff-panel { overflow:hidden; }
.strategy-payoff-chart { position:relative; width:100%; min-height:430px; overflow:hidden; border-radius:10px; background:linear-gradient(180deg,color-mix(in srgb,var(--panel) 98%,var(--accent) 2%),var(--panel)); }
.strategy-payoff-svg { display:block; width:100%; height:430px; overflow:visible; }
.strategy-chart-tooltip { position:absolute; top:0; left:0; z-index:10; min-width:178px; max-width:260px; padding:9px 10px; border:1px solid color-mix(in srgb,var(--line) 65%,transparent); border-radius:9px; background:var(--chart-tooltip-bg,#0d1a30); color:var(--chart-tooltip-text,#fff); box-shadow:0 10px 28px rgba(6,14,32,.24); pointer-events:none; font-size:9.5px; line-height:1.75; direction:rtl; }
.strategy-chart-tooltip[hidden] { display:none !important; }
.strategy-chart-tooltip b { display:block; font-size:10.5px; margin-bottom:2px; }
.strategy-chart-tooltip span { display:flex; justify-content:space-between; gap:12px; }
.strategy-chart-legend { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--muted); font-size:9.5px; }
.strategy-chart-legend span { display:inline-flex; align-items:center; gap:5px; }
.strategy-chart-legend i { width:15px; height:3px; border-radius:999px; background:var(--accent); }
.strategy-chart-legend i.theory { background:var(--chart-2,#d99a24); }
.strategy-chart-legend i.breakeven { height:12px; width:2px; background:var(--red); }
.strategy-chart-legend i.spot { height:12px; width:2px; background:var(--accent); }
.strategy-chain-panel .panel-actions { align-items:end; }
.strategy-chain-panel .inline-field { display:grid; gap:4px; }
.strategy-chain-panel .inline-field input,.strategy-chain-panel .inline-field select { min-width:126px; }
.strategy-chain-stats { padding:0 1px; }
.option-side-pill { font-weight:650; }
.strategy-source-inline > div:first-child { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.strategy-source-inline > div:first-child > strong { font-size:14px; }
.strategy-template-strip { grid-template-columns:repeat(11,minmax(126px,1fr)); }
.strategy-template-strip button { min-height:68px; }
.strategy-template-strip button small { line-height:1.55; }
.scenario-matrix-row strong,.scenario-matrix-row span { line-height:1.45; }

@media (max-width:1280px) {
  .strategy-kpi-ribbon { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .strategy-settings-pro { grid-template-columns:repeat(3,minmax(130px,1fr)); }
}
@media (max-width:900px) {
  .strategy-kpi-ribbon { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .strategy-risk-details { grid-template-columns:1fr; }
  .strategy-command-main { grid-template-columns:1fr 1fr; }
  .strategy-workbench-grid,.strategy-analysis-pro { grid-template-columns:1fr; }
  .strategy-payoff-chart,.strategy-payoff-svg { min-height:390px; height:390px; }
}
@media (max-width:600px) {
  .strategy-command-main,.strategy-settings-pro,.strategy-kpi-ribbon { grid-template-columns:1fr; }
  .strategy-pro-page .panel-header { align-items:flex-start; }
  .strategy-pro-page .panel-actions { width:100%; overflow-x:auto; padding-bottom:2px; }
  .strategy-payoff-chart,.strategy-payoff-svg { min-height:340px; height:340px; }
}

.strategy-time-scrubber { display:grid; gap:8px; margin:10px 12px 12px; padding:10px 12px; border:1px solid var(--line); border-radius:11px; background:color-mix(in srgb,var(--panel) 95%,var(--accent) 5%); }
.strategy-time-scrubber > div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.strategy-time-scrubber span,.strategy-time-scrubber small { color:var(--muted); font-size:9.5px; line-height:1.65; }
.strategy-time-scrubber b { color:var(--accent); font-size:10px; white-space:nowrap; }
.strategy-time-scrubber input[type="range"] { width:100%; accent-color:var(--accent); cursor:pointer; }

/* v2.9.1 — admin density/alignment. The operations cards used the shared
   auto-fit grid, which left ragged blank columns/rows on 1440–1920 px admin
   screens. Five equal tracks make the 15 operational KPIs read as a matrix. */
body[data-initial-view="admin"] .admin-workspace-panel { scroll-margin-top:92px; }
body[data-initial-view="admin"] #adminOperations .operations-grid {
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:12px !important;
  align-items:stretch;
  padding:0 14px 14px;
}
body[data-initial-view="admin"] #adminOperations .operations-grid > * {
  min-width:0;
  min-height:112px;
  height:100%;
  margin:0 !important;
  padding:14px 15px !important;
  display:grid;
  align-content:center;
  gap:7px;
  border-radius:14px;
  overflow-wrap:anywhere;
}
body[data-initial-view="admin"] #adminOperations .operations-grid > * > span,
body[data-initial-view="admin"] #adminOperations .operations-grid > * > small { line-height:1.65; }
body[data-initial-view="admin"] #adminOperations .operations-grid > * > strong { line-height:1.55; }
body[data-initial-view="admin"] #adminOperations .announcement-editor {
  display:grid !important;
  grid-template-columns:max-content minmax(150px,190px) minmax(260px,1fr) max-content;
  gap:10px 12px !important;
  align-items:center;
  margin:0 14px 14px;
  padding:13px 14px !important;
}
body[data-initial-view="admin"] #adminOperations .announcement-editor .grow { min-width:0; width:100%; }
@media (max-width:1320px) {
  body[data-initial-view="admin"] #adminOperations .operations-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
  body[data-initial-view="admin"] #adminOperations .announcement-editor { grid-template-columns:max-content minmax(145px,180px) 1fr; }
  body[data-initial-view="admin"] #adminOperations .announcement-editor .primary-button { grid-column:1/-1; justify-self:end; }
}
@media (max-width:920px) {
  body[data-initial-view="admin"] #adminOperations .operations-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  body[data-initial-view="admin"] #adminOperations .announcement-editor { grid-template-columns:1fr 1fr; }
  body[data-initial-view="admin"] #adminOperations .announcement-editor .grow { grid-column:1/-1; }
}
@media (max-width:560px) {
  body[data-initial-view="admin"] #adminOperations .operations-grid { grid-template-columns:1fr !important; padding-inline:10px; }
  body[data-initial-view="admin"] #adminOperations .announcement-editor { grid-template-columns:1fr; margin-inline:10px; }
  body[data-initial-view="admin"] #adminOperations .announcement-editor .primary-button { grid-column:auto; justify-self:stretch; }
}

/* Equity board labels: same visual language as the bonds board selector. */
.board-pill { display:inline-flex; align-items:center; min-height:24px; padding:2px 8px; border:1px solid var(--line); border-radius:999px; background:color-mix(in srgb,var(--panel) 88%,var(--accent) 12%); font-size:10px; font-weight:650; white-space:nowrap; }
.board-pill.board-1 { color:var(--green); border-color:color-mix(in srgb,var(--green) 28%,var(--line)); }
.board-pill.board-2,.board-pill.board-4 { color:var(--accent); border-color:color-mix(in srgb,var(--accent) 30%,var(--line)); }
.board-pill.board-3 { color:var(--chart-2,#b87900); border-color:color-mix(in srgb,var(--chart-2,#d99a24) 32%,var(--line)); }

/* Symbol overview: one real order-book panel + one richer client-type panel.
   The duplicate "عمق بازار" analytics card is intentionally removed. */
.symbol-secondary-grid .symbol-clienttype-panel { grid-column:1/-1; }
.symbol-clienttype-panel .client-type-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.symbol-clienttype-panel .client-type-grid > div { min-width:0; }
.symbol-clienttype-panel .client-type-summary { background:color-mix(in srgb,var(--panel) 95%,var(--accent) 5%); }
.shareholder-name-link,.shareholder-drill { color:var(--accent); font-weight:650; text-decoration:none; }
.shareholder-name-link:hover { text-decoration:underline; }
.shareholder-drill { border:0; background:transparent; padding:0; cursor:pointer; font:inherit; text-align:right; }
.shareholder-drill:hover { text-decoration:underline; }

/* Fund symbol allocation becomes the canonical home of the daily FIPIran /
   monthly Codal visual; market-level aggregate portfolio panel is removed. */
.fund-symbol-allocation-panel { grid-column:1/-1; overflow:hidden; }
.fund-symbol-allocation-panel .panel-header { align-items:end; }
.fund-symbol-allocation-panel .small-select { display:grid; gap:5px; min-width:165px; color:var(--muted); font-size:10px; }
.fund-symbol-allocation-panel .small-select select { min-height:38px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--text); padding:6px 10px; }
.fund-symbol-source-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.fund-symbol-source-grid .fund-allocation-card { height:100%; }
.fund-symbol-allocation { display:grid; gap:5px; }
.fund-allocation-compare,.fund-report-quality { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb,var(--panel) 97%,var(--accent) 3%); }
.fund-allocation-compare > header { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-bottom:10px; }
.fund-allocation-compare h3,.fund-report-quality h3 { margin:0; font-size:12px; line-height:1.6; }
.fund-allocation-compare p { margin:0; color:var(--muted); font-size:9.5px; }
.fund-allocation-compare > div,.fund-report-quality > div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.fund-allocation-compare > div > div,.fund-report-quality > div > div { display:grid; gap:4px; min-width:0; padding:10px; border:1px solid color-mix(in srgb,var(--line) 80%,transparent); border-radius:10px; }
.fund-allocation-compare span,.fund-report-quality span { color:var(--muted); font-size:9.5px; }
.fund-allocation-compare small { color:var(--muted); font-size:8.5px; line-height:1.55; }
.fund-allocation-compare strong,.fund-report-quality strong { line-height:1.55; font-size:10.5px; }
@media (max-width:920px) {
  .symbol-clienttype-panel .client-type-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fund-symbol-source-grid { grid-template-columns:1fr; }
  .fund-allocation-compare > div,.fund-report-quality > div { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .symbol-clienttype-panel .client-type-grid,.fund-allocation-compare > div,.fund-report-quality > div { grid-template-columns:1fr; }
  .fund-symbol-allocation-panel .panel-header { align-items:stretch; }
  .fund-symbol-allocation-panel .small-select { width:100%; }
}
.fund-local-date-field { display:grid; align-content:start; gap:6px; min-width:160px; }
.fund-local-date-field > span { color:var(--muted); font-size:10.5px; line-height:1.5; }
.fund-local-date-field > select { min-height:40px; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--text); padding:7px 10px; }
.fund-local-date-field > small { color:var(--muted); font-size:8.5px; line-height:1.5; }

/* Allocation-source quality guard. A source can legally report an over-100%
   recognized total when duplicated/overlapping classifications are present;
   keep the numeric value visible but flag it instead of drawing beyond the
   bar track. */
.fund-allocation-row.allocation-outlier {
  padding:4px 7px;
  border:1px dashed color-mix(in srgb,var(--warning,#d88a1d) 52%,var(--line));
  border-radius:8px;
  background:color-mix(in srgb,var(--warning,#d88a1d) 6%,transparent);
}
.fund-allocation-row.allocation-outlier > strong { color:var(--warning,#b66a00); }


/* OptionBan Dashboard v3.0 — compact filters, stable tables and Strategy Lab polish. */
.strategy-analysis-pro { align-items:start; }
.strategy-scenario-panel { align-self:start; height:max-content; min-height:0; }
.strategy-scenario-panel .panel-body { padding-bottom:12px; }
.strategy-payoff-panel { min-width:0; }
.strategy-kpi-card > strong { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; font-size:clamp(12px,1vw,15px); }
.strategy-kpi-card > span,.strategy-kpi-card > small { white-space:normal; overflow:visible; text-overflow:clip; }
.strategy-pro-page .contract-size-field { max-width:210px; justify-self:start; }
.strategy-pro-page .contract-size-field input { width:100%; max-width:190px; text-align:center; direction:ltr; font-size:15px; font-weight:700; }
.strategy-legs-table { min-width:2820px; table-layout:fixed; }
.strategy-chain-panel .chain-table { min-width:3220px; table-layout:fixed; }
.strategy-legs-table th,.strategy-legs-table td,.strategy-chain-panel .chain-table th,.strategy-chain-panel .chain-table td { text-align:center !important; }
.strategy-legs-table thead th,.strategy-chain-panel .chain-table thead th,.strategy-legs-table tfoot th,.strategy-chain-panel .chain-table tfoot th { vertical-align:middle; }
.strategy-total-row th { background:color-mix(in srgb,var(--panel) 86%,var(--accent) 14%); border-top:2px solid color-mix(in srgb,var(--accent) 35%,var(--line)); font-weight:800; }
.strategy-chart-legend i.spot { width:9px !important; height:9px !important; border-radius:50% !important; border:0 !important; background:var(--accent) !important; }
.strategy-chart-legend i.breakeven { width:2px !important; height:12px !important; border-radius:0 !important; background:var(--red) !important; }
.scenario-matrix-row span,.scenario-matrix-row strong { min-width:0; text-align:center; white-space:normal; line-height:1.55; }
.strategy-settings-pro { align-items:start; }
.strategy-settings-pro .field,.strategy-settings-pro .strategy-toggle-stack { align-self:start; }
.strategy-pro-page .panel-body { min-width:0; }
.strategy-pro-page .strategy-workbench-grid > .panel { align-self:start; }

/* Shared FilterPanel markup is grouped into compact cards instead of one
   full-width fieldset per category. Three columns on desktop, two on tablet. */
#filterBody .filter-primary,#filterBody .filter-advanced { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px !important; align-items:start; }
#filterBody .filter-primary > *,#filterBody .filter-advanced > * { min-width:0; margin:0 !important; align-self:start; }
#filterBody .filter-group { height:auto !important; min-height:0 !important; padding:12px !important; border-radius:12px; }
#filterBody .filter-group > legend { padding-inline:5px; line-height:1.4; }
#filterBody .filter-group .filter-field,#filterBody .filter-primary .filter-field { min-width:0; margin:0 !important; }
#filterBody .filter-group .threshold-slider,#filterBody .filter-group .range-control { min-height:0 !important; padding-block:4px; }
#filterBody input,#filterBody select { max-width:100%; }

/* The market table used content-driven auto widths, so every live update could
   change intrinsic width and shift all cells. The colgroup emitted by
   market.js is now the width authority. */
.v2-market-page .v2-market-table,.v2-market-page .data-table { table-layout:fixed !important; width:max(100%,var(--market-table-width,1200px)); min-width:var(--market-table-width,1200px) !important; }
.v2-market-page .data-table th,.v2-market-page .data-table td { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-sizing:border-box; }
.v2-market-page .data-table th.watch-column,.v2-market-page .data-table td.watch-column { width:48px !important; min-width:48px !important; max-width:48px !important; }
.order-balance-card { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:13px; background:color-mix(in srgb,var(--panel) 95%,var(--accent) 5%); }
.order-balance-head { display:flex; justify-content:space-between; align-items:center; gap:14px; }
.order-balance-head h3 { margin:0 0 3px; }
.order-balance-head p { margin:0; color:var(--muted); font-size:10px; line-height:1.6; }
.order-balance-head > strong { direction:ltr; font-size:16px; }
.order-balance-meter { direction:ltr; display:flex; height:16px; margin:13px 0 7px; overflow:hidden; border-radius:999px; background:var(--line); }
.order-balance-meter i { display:block; min-width:0; transition:width .2s ease; }
.order-balance-meter .buy { background:var(--green); }
.order-balance-meter .sell { background:var(--red); }
.order-balance-labels { display:flex; justify-content:space-between; gap:10px; font-size:10px; }
.order-balance-labels .buy { color:var(--green); }
.order-balance-labels .sell { color:var(--red); }


/* Funds used to pin four columns here. The shared rail now derives its column
   count from its own width, and a per-module override only reintroduces the
   fixed-count stretching it was added to avoid. */
.member-login-audit{display:grid;gap:2px;min-width:115px}.member-login-audit strong{font-size:10px;font-weight:700}.member-login-audit small{color:var(--muted);font-size:9px}
@media (max-width:1100px) {
  /* column count now comes from the shared auto-fit rail in ui-clean.css */
}
@media (max-width:700px) {
  #filterBody .filter-primary,#filterBody .filter-advanced { grid-template-columns:1fr; }
  .strategy-pro-page .contract-size-field { max-width:none; justify-self:stretch; }
  .strategy-pro-page .contract-size-field input { max-width:none; }
  .order-balance-head { align-items:flex-start; }
}

/* v3.1 strategy/table polish */
.strategy-legs-table input,.strategy-legs-table select,.strategy-chain-panel .chain-table input,.strategy-chain-panel .chain-table select{text-align:center!important}
.strategy-legs-table th,.strategy-legs-table td,.strategy-chain-panel .chain-table th,.strategy-chain-panel .chain-table td{vertical-align:middle!important;line-height:1.55}
.v2-market-page .table-scroll{scrollbar-gutter:stable both-edges;overflow-anchor:none;overscroll-behavior:contain;contain:layout paint}
.v2-market-page .v2-market-table{font-variant-numeric:tabular-nums}
.option-trend-controls{justify-content:flex-start;min-height:42px}.option-trend-controls>*{flex:0 0 auto}


/* ======================================================================
   v3.2.1 focused UI corrections — date picker, symbol overview, admin,
   watchlist units and strategy workspace geometry.
   ====================================================================== */

/* One professional Jalali date control across Bonds, Funds, IME and admin. */
.date-filter{position:relative;display:block;min-width:0}
.date-filter .jalali-input{width:100%;min-height:42px;padding-block:8px;padding-inline:12px 42px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);font:inherit;text-align:right;direction:rtl;outline:none;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}
.date-filter .jalali-input:hover{border-color:color-mix(in srgb,var(--accent) 38%,var(--line))}
.date-filter .jalali-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 13%,transparent)}
.date-picker-trigger{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.date-picker-trigger:hover,.date-picker-trigger:focus-visible{background:color-mix(in srgb,var(--accent) 9%,transparent);color:var(--accent);outline:none}
.date-picker-trigger svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.jalali-picker{position:fixed!important;z-index:30000!important;overflow:auto;max-width:calc(100vw - 24px);padding:10px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:var(--panel)!important;box-shadow:0 18px 55px rgba(8,26,59,.22)!important;color:var(--text)!important}
.jalali-picker-head{margin-bottom:8px!important}
.jalali-picker-head button,.jalali-picker-foot button{border-color:var(--line)!important;background:var(--panel-2)!important;color:var(--text)!important}
.jalali-days button{min-height:34px;aspect-ratio:1;border-radius:8px!important}
.jalali-days button:hover{background:color-mix(in srgb,var(--accent) 9%,var(--panel))!important}
.jalali-days button.today{box-shadow:inset 0 0 0 1px var(--accent)!important}
.jalali-days button.selected{background:var(--accent)!important;color:var(--on-accent)!important}

/* Funds now uses the same schema-level date picker as Bonds. Four primary
   controls remain in one desktop row; the legacy select fallback is hidden. */
body[data-module="funds"] #fundLocalDateField{display:none!important}
/* funds filter-primary column counts intentionally removed -- see above */

/* Symbol desktop overview: market depth and client-type flow share one row,
   while the depth table always fits its card without a nested x-scroll. */
.symbol-market-row{grid-template-columns:minmax(420px,.95fr) minmax(0,1.35fr)!important;align-items:stretch}
.symbol-market-row>.symbol-depth-panel,.symbol-market-row>.symbol-clienttype-panel{grid-column:auto!important;min-width:0;height:100%}
.symbol-market-row>.fund-symbol-allocation-panel{grid-column:1/-1!important}
.symbol-depth-panel .market-depth{height:100%;padding:12px}
.symbol-depth-panel .table-scroll{width:100%;overflow-x:visible!important}
.symbol-depth-panel .depth-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.symbol-depth-panel .depth-table th,.symbol-depth-panel .depth-table td{padding-inline:7px!important;white-space:nowrap;text-align:center!important}
.symbol-market-row .symbol-clienttype-panel .client-type-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start;height:100%}
@media(max-width:1100px){.symbol-market-row{grid-template-columns:1fr!important}.symbol-market-row>.symbol-depth-panel,.symbol-market-row>.symbol-clienttype-panel{height:auto}}

/* Admin contact fields are distinct sortable columns, not a two-line hybrid. */
#membersTable .member-email{min-width:190px;text-align:left;white-space:nowrap}
#membersTable .member-phone{min-width:118px;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}

/* Watchlist: one label + one unit. The scaled unit sits beside the clean label
   and P/NAV/integer metrics no longer gain synthetic «نسبت/عدد» suffixes. */
.watch-metric-cell small{min-height:1.45em}
.watch-metric-unit{white-space:nowrap}

/* Strategy bases + live chain are one equal-height desktop workspace. Tables
   scroll inside their own panels, so one long chain cannot stretch its peer. */
.strategy-live-workspace{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:14px;align-items:stretch;margin-bottom:14px}
.strategy-live-workspace>.panel{display:flex;flex-direction:column;min-width:0;height:clamp(500px,60vh,640px);min-height:0;overflow:hidden}
.strategy-live-workspace>.panel>.panel-header{flex:0 0 auto}
.strategy-live-workspace .strategy-position-summary,.strategy-live-workspace .strategy-chain-stats{flex:0 0 auto}
.strategy-live-workspace .strategy-legs-scroll,.strategy-live-workspace .strategy-chain-scroll{flex:1 1 auto;min-height:0;max-height:none!important;overflow:auto!important}
@media(max-width:1280px){
  .strategy-live-workspace{grid-template-columns:1fr}
  .strategy-live-workspace>.panel{height:auto;min-height:0}
  .strategy-live-workspace .strategy-legs-scroll,.strategy-live-workspace .strategy-chain-scroll{max-height:520px!important}
}


/* ======================================================================
   v3.3.0 — option strategy execution desk + persistent account accent.
   Symbol, Buy and Sell stay frozen in the RTL live-chain viewport. */
.strategy-chain-panel .chain-table .strategy-chain-symbol-col{
  position:sticky;right:0;z-index:7;width:148px;min-width:148px;max-width:148px;background:var(--panel);
}
.strategy-chain-panel .chain-table .strategy-chain-buy-col{
  position:sticky;right:148px;z-index:7;width:72px;min-width:72px;max-width:72px;background:var(--panel);
}
.strategy-chain-panel .chain-table .strategy-chain-sell-col{
  position:sticky;right:220px;z-index:7;width:72px;min-width:72px;max-width:72px;background:var(--panel);box-shadow:-2px 0 0 var(--line);
}
.strategy-chain-panel .chain-table thead .strategy-chain-symbol-col,
.strategy-chain-panel .chain-table thead .strategy-chain-buy-col,
.strategy-chain-panel .chain-table thead .strategy-chain-sell-col{z-index:12;background:var(--panel-soft,var(--panel));}
.strategy-chain-panel .chain-table tbody tr:hover .strategy-chain-symbol-col,
.strategy-chain-panel .chain-table tbody tr:hover .strategy-chain-buy-col,
.strategy-chain-panel .chain-table tbody tr:hover .strategy-chain-sell-col{background:color-mix(in srgb,var(--panel) 94%,var(--accent) 6%);}
.chain-side-button{width:54px;min-width:54px;padding-inline:6px!important;font-weight:800;}
.chain-side-button.buy{color:var(--green);border-color:color-mix(in srgb,var(--green) 42%,var(--line));background:color-mix(in srgb,var(--green) 8%,var(--panel));}
.chain-side-button.sell{color:var(--red);border-color:color-mix(in srgb,var(--red) 42%,var(--line));background:color-mix(in srgb,var(--red) 8%,var(--panel));}

.strategy-execution-quality{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:0 1px 8px;min-height:38px;}
.strategy-execution-quality>span,.strategy-execution-quality>.execution-quality-empty{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:color-mix(in srgb,var(--panel) 96%,var(--accent) 4%);font-size:9.5px;color:var(--muted);white-space:nowrap;}
.strategy-execution-quality b{font-size:10px;color:var(--text);font-variant-numeric:tabular-nums;}
.execution-quality-status{font-weight:800!important;color:var(--text)!important;}
.execution-quality-status i{width:7px;height:7px;border-radius:50%;background:var(--muted);box-shadow:0 0 0 3px color-mix(in srgb,var(--muted) 15%,transparent);}
.execution-quality-status.good i{background:var(--green);box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 15%,transparent);}
.execution-quality-status.warn i{background:var(--amber,#d99a24);box-shadow:0 0 0 3px color-mix(in srgb,var(--amber,#d99a24) 15%,transparent);}
.execution-quality-status.bad i{background:var(--red);box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 15%,transparent);}
.execution-quality-empty{border-style:dashed!important;}
@media(max-width:700px){
  .strategy-chain-panel .chain-table .strategy-chain-symbol-col{width:126px;min-width:126px;max-width:126px}
  .strategy-chain-panel .chain-table .strategy-chain-buy-col{right:126px;width:64px;min-width:64px;max-width:64px}
  .strategy-chain-panel .chain-table .strategy-chain-sell-col{right:190px;width:64px;min-width:64px;max-width:64px}
  .chain-side-button{width:48px;min-width:48px;font-size:9px}
  .strategy-execution-quality{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:6px}
}


/* ======================================================================
   v3.5.0 — full-width strategy workbench and consistent inner rhythm. */
.strategy-live-workspace{
  grid-template-columns:minmax(0,1fr)!important;
  width:100%;
  gap:16px;
}
.strategy-live-workspace>.panel{
  width:100%;
  max-width:none;
  height:clamp(500px,60vh,640px);
}
.strategy-live-workspace .panel-header{
  padding:16px 18px;
  align-items:center;
}
.strategy-live-workspace .strategy-position-summary,
.strategy-live-workspace .strategy-chain-stats,
.strategy-live-workspace .strategy-execution-quality{
  padding-inline:18px!important;
  padding-block:8px 10px!important;
  margin-inline:0!important;
}
.strategy-live-workspace .strategy-position-summary>*,
.strategy-live-workspace .strategy-chain-stats>*{
  margin-block:0;
}
@media(max-width:1280px){
  .strategy-live-workspace>.panel{height:auto;}
}


/* v3.5.1 option history controls/date labels */
.option-trend-controls .filter-toggle-control{min-height:40px;}
.option-trend-controls .filter-toggle-control>input{position:absolute;opacity:0;pointer-events:none;}
.option-trend-column small{font-size:9px;letter-spacing:-.02em;}

/* ======================================================================
   v3.6.3 — fresh strategy baseline, price-source control and expert ranker. */
.strategy-live-workspace>.strategy-chain-panel{height:clamp(540px,62vh,680px)}
.strategy-live-workspace>.strategy-builder-panel{height:clamp(440px,54vh,590px)}
.strategy-chain-actions{position:relative;align-items:end!important;flex-wrap:wrap}
.strategy-price-source-wrap{position:relative;align-self:end}
.strategy-price-source-button{display:inline-flex;align-items:center;gap:7px;min-height:40px;white-space:nowrap}
.strategy-price-source-button .ui-icon{width:17px;height:17px}
.strategy-price-source-menu{position:absolute;z-index:60;top:calc(100% + 7px);right:0;min-width:210px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 18px 44px rgba(8,25,56,.16)}
.strategy-price-source-menu[hidden]{display:none!important}
.strategy-price-source-menu button{width:100%;display:grid;gap:2px;text-align:right;border:0;border-radius:9px;background:transparent;color:var(--text);padding:9px 10px;font:inherit;cursor:pointer}
.strategy-price-source-menu button:hover,.strategy-price-source-menu button.active{background:color-mix(in srgb,var(--accent) 9%,var(--panel));color:var(--accent)}
.strategy-price-source-menu small{font-size:10px;color:var(--muted);font-weight:500}
.strategy-ranker-panel{margin-bottom:16px;overflow:hidden}
.strategy-ranker-panel>.panel-header{align-items:center;padding:16px 18px}
.strategy-ranker-controls{display:grid;grid-template-columns:minmax(220px,1.25fr) minmax(120px,.55fr) minmax(150px,.65fr) minmax(280px,1.5fr);gap:12px;padding:14px 18px 12px;align-items:end;border-bottom:1px solid var(--line)}
.strategy-ranker-controls .field{margin:0}
.strategy-ranker-note{min-height:58px;border:1px dashed var(--line);border-radius:12px;padding:9px 12px;display:grid;align-content:center;gap:3px;background:color-mix(in srgb,var(--panel) 96%,var(--accent) 4%)}
.strategy-ranker-note b{font-size:11px;color:var(--text)}
.strategy-ranker-note small{font-size:10px;color:var(--muted);line-height:1.65}
.strategy-ranker-meta{padding:9px 18px;color:var(--muted);font-size:10px;border-bottom:1px solid var(--line)}
.strategy-ranker-scroll{max-height:520px;overflow:auto}
.strategy-ranker-table{min-width:1760px;table-layout:auto}
.strategy-ranker-table th,.strategy-ranker-table td{text-align:center!important;vertical-align:middle!important}
.strategy-ranked-legs{min-width:260px;display:flex;gap:5px;flex-wrap:wrap;justify-content:center}
.strategy-ranked-legs span{border:1px solid var(--line);border-radius:999px;padding:4px 8px;white-space:nowrap;background:var(--panel-soft,var(--panel));font-size:9px}
.strategy-score-pill{display:inline-grid;place-items:center;min-width:54px;padding:5px 8px;border-radius:999px;border:1px solid var(--line);font-weight:900}
.strategy-score-pill.excellent{color:var(--green);background:color-mix(in srgb,var(--green) 9%,var(--panel))}
.strategy-score-pill.good{color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--panel))}
.strategy-score-pill.fair{color:#a56a00;background:color-mix(in srgb,#d99b2b 10%,var(--panel))}
.strategy-score-pill.weak{color:var(--red);background:color-mix(in srgb,var(--red) 8%,var(--panel))}
.strategy-rank-reasons{min-width:220px;color:var(--muted);font-size:9px;line-height:1.7}
.strategy-chart-tooltip span{display:grid;grid-template-columns:auto auto;column-gap:7px;align-items:baseline}
.strategy-chart-tooltip span small{grid-column:2;color:var(--muted);font-size:9px;font-weight:700}
@media(max-width:1180px){.strategy-ranker-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.strategy-live-workspace>.strategy-chain-panel,.strategy-live-workspace>.strategy-builder-panel{height:auto}}
@media(max-width:680px){.strategy-ranker-controls{grid-template-columns:1fr;padding-inline:12px}.strategy-ranker-panel>.panel-header{align-items:flex-start}.strategy-chain-actions{width:100%}.strategy-price-source-wrap{width:100%}.strategy-price-source-button{width:100%;justify-content:center}}

/* v3.6.3: retain context when a contract arrives from the Options board. */
.chain-table tbody tr.chain-deep-selected{background:color-mix(in srgb,var(--accent) 8%,var(--panel))!important;box-shadow:inset -3px 0 0 var(--accent)}
.chain-table tbody tr.chain-deep-selected .strategy-chain-symbol-col strong{color:var(--accent)}

/* v3.6.3 workflow: live chain first, strategy bases directly underneath. */
.strategy-live-workspace{grid-template-columns:minmax(0,1fr)!important;align-items:start!important}
.strategy-live-workspace>.panel{height:auto!important;min-height:0!important;overflow:hidden}
.strategy-live-workspace .strategy-chain-scroll,.strategy-live-workspace .strategy-legs-scroll{flex:none!important;max-height:min(58vh,540px)!important;overflow-x:auto!important;overflow-y:auto!important;scrollbar-gutter:stable both-edges}

/* v3.6.3: strategy table scroll also chains vertically to the page. */
.strategy-chain-scroll,.strategy-legs-scroll,.strategy-ranker-scroll{overscroll-behavior-x:contain!important;overscroll-behavior-y:auto!important;}


/* ======================================================================
   v1.0.1 — strategy template grid: all templates visible without horizontal
   scrolling on desktop; English strategy names are centered and readable. */
.strategy-template-strip{
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  overflow:visible!important;
  scrollbar-width:none!important;
  padding-bottom:0!important;
}
.strategy-template-strip::-webkit-scrollbar{display:none!important}
.strategy-template-strip button{
  min-width:0!important;
  width:100%;
  min-height:72px;
  text-align:center!important;
  justify-items:center;
  padding-inline:8px;
}
.strategy-template-strip button b{
  width:100%;
  direction:ltr!important;
  text-align:center!important;
  unicode-bidi:isolate;
  font-size:10.5px;
  line-height:1.35;
  white-space:normal;
}
.strategy-template-strip button small{
  width:100%;
  text-align:center;
  line-height:1.5;
}
@media(max-width:1500px){.strategy-template-strip{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
@media(max-width:1100px){.strategy-template-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:700px){.strategy-template-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:430px){.strategy-template-strip{grid-template-columns:1fr!important}}

/* FinView v1 — explainable strategy intelligence controls. */
.strategy-ranker-controls{
  grid-template-columns:repeat(5,minmax(150px,1fr));
  align-items:end;
}
.strategy-ranker-controls .strategy-ranker-note{grid-column:span 2;min-height:68px}
.strategy-ranker-table{min-width:2320px}
.strategy-priority,.strategy-confidence{
  display:inline-flex;align-items:center;justify-content:center;min-height:29px;padding:4px 9px;
  border:1px solid var(--line);border-radius:999px;white-space:nowrap;font-size:11px;font-weight:760;
}
.strategy-priority.excellent,.strategy-confidence.grade-a{color:var(--green);background:color-mix(in srgb,var(--green) 9%,var(--panel))}
.strategy-priority.good,.strategy-confidence.grade-b{color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--panel))}
.strategy-priority.fair,.strategy-confidence.grade-c{color:#9a6800;background:color-mix(in srgb,#d99b2b 10%,var(--panel))}
.strategy-priority.weak,.strategy-confidence.grade-d{color:var(--red);background:color-mix(in srgb,var(--red) 8%,var(--panel))}
.strategy-risk-flags{min-width:190px;max-width:250px;color:var(--red);font-size:11px;line-height:1.8;white-space:normal!important}
.strategy-rank-reasons{min-width:240px;font-size:11px;line-height:1.8;white-space:normal!important}
.strategy-ranked-legs span{font-size:10.5px}
.strategy-ranker-meta{font-size:11.5px;line-height:1.8}
@media(max-width:1380px){.strategy-ranker-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.strategy-ranker-controls .strategy-ranker-note{grid-column:span 3}}
@media(max-width:900px){.strategy-ranker-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.strategy-ranker-controls .strategy-ranker-note{grid-column:span 2}}
@media(max-width:600px){.strategy-ranker-controls{grid-template-columns:1fr}.strategy-ranker-controls .strategy-ranker-note{grid-column:auto}.strategy-ranker-panel>.panel-header>button{width:100%}}

/* ======================================================================
   v1.0.3 — active-strategy cockpit + shareholder intelligence. */
.strategy-active-view{
  scroll-margin-top:92px;
  margin:14px 0;
  padding-bottom:14px;
  outline:none;
}
.strategy-active-view:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent)}
.strategy-active-view-head{align-items:center}
.strategy-active-view .strategy-kpi-ribbon{margin:0;padding:0 14px 2px}
.strategy-kpi-compact{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important}
.strategy-kpi-compact .strategy-kpi-card{min-height:76px!important;padding:10px 11px!important;border-radius:12px!important;gap:3px!important}
.strategy-kpi-compact .strategy-kpi-card>span{font-size:9px!important}
.strategy-kpi-compact .strategy-kpi-card>strong{font-size:13px!important;line-height:1.35!important}
.strategy-kpi-compact .strategy-kpi-card>small{font-size:8.5px!important;line-height:1.35!important}
@media(max-width:1500px){.strategy-kpi-compact{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:760px){.strategy-kpi-compact{grid-template-columns:repeat(2,minmax(0,1fr))!important}.strategy-active-view .strategy-kpi-ribbon{padding-inline:10px}}
@media(max-width:430px){.strategy-kpi-compact{grid-template-columns:1fr!important}}

.shareholder-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.shareholder-filter-summary>div{display:flex;align-items:center;gap:10px;min-width:0}
.shareholder-first-toggle{margin-inline-start:auto;white-space:nowrap}
.shareholder-summary-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.shareholder-summary-strip[hidden]{display:none}
.shareholder-summary-strip article{min-width:0;display:grid;gap:5px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.shareholder-summary-strip span,.shareholder-summary-strip small{color:var(--muted);font-size:10px}
.shareholder-summary-strip strong{font-size:16px;overflow-wrap:anywhere}
.shareholder-table-scroll{max-height:min(62vh,650px)!important;overflow:auto!important;scrollbar-gutter:stable both-edges}
.shareholder-explorer-table{width:100%!important;min-width:0!important;table-layout:fixed}
.shareholder-explorer-table th,.shareholder-explorer-table td{vertical-align:middle;text-align:center;padding-inline:10px;overflow:hidden;text-overflow:ellipsis}
.shareholder-explorer-table th:first-child,.shareholder-explorer-table td:first-child{width:13%}
.shareholder-explorer-table .shareholder-drill{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shareholder-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-top:1px solid var(--line);color:var(--muted);font-size:11px}
.shareholder-pagination[hidden]{display:none}
.shareholder-pagination>div{display:flex;gap:6px;align-items:center}
.shareholder-pagination button{min-width:36px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);cursor:pointer}
.shareholder-pagination button.active{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.shareholder-pagination button:disabled{opacity:.45;cursor:default}
@media(max-width:900px){.shareholder-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.shareholder-explorer-table{min-width:760px!important;table-layout:auto}.shareholder-table-scroll{overflow-x:auto!important}}
@media(max-width:560px){.shareholder-summary-strip{grid-template-columns:1fr}.shareholder-pagination{align-items:flex-start;flex-direction:column}}

/* v1.0.5 — option intelligence */
.option-intelligence-panel { margin-bottom: 14px; }
.option-intelligence-body { padding: 16px; display: grid; gap: 16px; }
.option-intelligence-kpis { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.option-intelligence-kpis > div { border: 1px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.option-intelligence-kpis span,.option-intelligence-kpis strong,.option-intelligence-kpis small { display:block; }
.option-intelligence-kpis span { color: var(--muted); font-size: 11px; }
.option-intelligence-kpis strong { margin-top: 6px; font-size: 20px; direction:ltr; text-align:right; }
.option-intelligence-kpis small { margin-top: 4px; color: var(--muted); font-size: 9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.option-intelligence-grid { display:grid; grid-template-columns:minmax(360px,.82fr) minmax(620px,1.5fr); gap:14px; align-items:start; }
.option-term-card,.option-unusual-card { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--panel); }
.option-term-card > header,.option-unusual-card > header { padding:12px 14px; border-bottom:1px solid var(--line); }
.option-term-card h3,.option-unusual-card h3 { margin:0; font-size:14px; }
.option-term-card p,.option-unusual-card p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.option-term-list { padding:10px 12px; display:grid; gap:8px; }
.option-term-row { display:grid; grid-template-columns:92px minmax(100px,1fr) 64px 72px; gap:8px; align-items:center; font-size:10px; }
.option-term-row > div { height:8px; border-radius:999px; background:var(--line); overflow:hidden; direction:rtl; }
.option-term-row > div i { display:block; height:100%; background:var(--navy-2); border-radius:inherit; }
.option-term-row strong { direction:ltr; text-align:right; }
.option-term-row small { color:var(--muted); direction:ltr; text-align:right; }
.option-unusual-table-wrap { max-height:360px; overflow:auto; }
.option-unusual-table { min-width:620px; }
.option-unusual-table th,.option-unusual-table td { text-align:center; }
@media (max-width:1200px){.option-intelligence-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.option-intelligence-grid{grid-template-columns:1fr}}
@media (max-width:680px){.option-intelligence-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.option-term-row{grid-template-columns:78px minmax(80px,1fr) 58px}.option-term-row small{display:none}}

/* v1.0.5 — admin email/SMS manager */
.notification-manager-panel { margin-top:14px; }
.notification-channel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:14px 16px 0; }
.notification-channel-card { border:1px solid var(--line); border-radius:12px; background:var(--panel-2); padding:12px 14px; min-width:0; }
.notification-channel-card > div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.notification-channel-card span,.notification-channel-card small { color:var(--muted); font-size:10px; }
.notification-channel-card strong { font-size:13px; }
.notification-channel-card.ready { border-color:color-mix(in srgb,var(--green) 35%,var(--line)); }
.notification-channel-card.ready strong { color:var(--green); }
.notification-channel-card.offline strong { color:var(--red); }
.notification-manager-grid { display:grid; grid-template-columns:minmax(320px,.72fr) minmax(700px,1.7fr); gap:14px; padding:14px 16px 16px; }
.notification-compose-card,.notification-queue-card { border:1px solid var(--line); border-radius:14px; background:var(--panel); overflow:hidden; }
.notification-compose-card > header,.notification-queue-card > header { padding:12px 14px; border-bottom:1px solid var(--line); }
.notification-compose-card h3,.notification-queue-card h3 { margin:0; font-size:14px; }
.notification-compose-card p,.notification-queue-card p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.notification-compose-form { padding:12px 14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.notification-compose-form .full { grid-column:1/-1; }
.notification-compose-form textarea { width:100%; resize:vertical; min-height:90px; border:1px solid var(--line); background:var(--panel-2); color:var(--text); border-radius:10px; padding:10px 12px; font:inherit; }
.notification-sample-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.notification-queue-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.notification-queue-filters { display:flex; gap:8px; }
.notification-queue-filters select { min-height:36px; border:1px solid var(--line); background:var(--panel-2); color:var(--text); border-radius:9px; padding:0 10px; }
.notification-queue-scroll { max-height:430px; }
.notification-queue-table { min-width:980px; }
.notification-queue-table th,.notification-queue-table td { text-align:center; }
.notification-error { max-width:220px; overflow:hidden; text-overflow:ellipsis; }
.notification-status { display:inline-flex; align-items:center; justify-content:center; min-height:26px; padding:0 9px; border-radius:999px; border:1px solid var(--line); font-size:10px; white-space:nowrap; }
.notification-status.sent { color:var(--green); background:color-mix(in srgb,var(--green) 8%,transparent); }
.notification-status.failed { color:var(--red); background:color-mix(in srgb,var(--red) 8%,transparent); }
.notification-status.pending,.notification-status.processing { color:var(--navy); }
.notification-status.cancelled { color:var(--muted); }
@media (max-width:1250px){.notification-manager-grid{grid-template-columns:1fr}.notification-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:700px){.notification-channel-grid{grid-template-columns:1fr}.notification-compose-form{grid-template-columns:1fr}.notification-compose-form .full{grid-column:auto}.notification-queue-head{align-items:stretch;flex-direction:column}.notification-queue-filters{display:grid;grid-template-columns:1fr 1fr}}

/* v1.0.12 — cleaned Codal company intelligence */
.company-intelligence-panel { min-width:0; }
.company-profile-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.company-profile-grid > div { min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:11px;background:var(--panel-2);display:grid;gap:5px; }
.company-profile-grid span { color:var(--muted);font-size:9px; }
.company-profile-grid strong { font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.company-source-note { margin-top:12px;color:var(--muted);font-size:9px;line-height:1.8; }
.company-fundamental-stack { display:grid;gap:16px; }
.company-fundamental-stack > section { min-width:0;border:1px solid var(--line);border-radius:12px;overflow:hidden; }
.company-fundamental-stack > section > header { padding:12px 14px;border-bottom:1px solid var(--line);background:var(--panel-2); }
.company-fundamental-stack h3 { margin:0;font-size:11px; }
.company-fundamental-stack p { margin:4px 0 0;color:var(--muted);font-size:9px; }
.company-metric-scroll { max-height:460px; }
.company-metric-table td:first-child { min-width:210px; }
.company-metric-table td:first-child strong { display:block;font-size:10px; }
.company-metric-table td:first-child small { display:block;margin-top:3px;color:var(--muted);font-size:8px; }
@media (max-width:1000px) { .company-profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .company-profile-grid { grid-template-columns:1fr; } .company-metric-table { min-width:780px; } }
.fund-clean-detail,.fund-clean-industry { margin-top:14px;border:1px solid var(--line);border-radius:12px;overflow:hidden; }
.fund-clean-detail > header,.fund-clean-industry > header { padding:11px 13px;border-bottom:1px solid var(--line);background:var(--panel-2); }
.fund-clean-detail h3,.fund-clean-industry h3 { margin:0;font-size:10px; }
.fund-clean-detail p,.fund-clean-industry p { margin:3px 0 0;color:var(--muted);font-size:8px; }
.fund-clean-industry .fund-symbol-allocation { padding:12px; }
.fund-holdings-table td:first-child strong,.fund-holdings-table td:first-child small { display:block; }
.fund-holdings-table td:first-child small { color:var(--muted);font-size:8px;margin-top:2px; }

/* v1.0.12 cleaned-Codal percentage provenance */
.fund-allocation-basis-note{margin:10px 0;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--panel-2);color:var(--muted);font-size:10px;line-height:1.8}
.fund-allocation-basis-note.warning{border-color:color-mix(in srgb,var(--orange,#d97706) 35%,var(--line));background:color-mix(in srgb,var(--orange,#d97706) 7%,var(--panel));color:var(--text)}
