:root{
--bg:#f3f7fb; --bg-2:#e8f0fa; --card:rgba(255,255,255,.94); --card-strong:#fff;
--text:#17324d; --muted:#5b738c; --line:#d7e3f0; --navy:#1f4f82; --navy-2:#2e639c;
--blue:#2563eb; --teal:#0f766e; --green:#16a34a; --green-soft:#dcfce7;
--orange:#f59e0b; --orange-soft:#fff7dd; --red:#dc2626; --red-soft:#fee2e2;
--purple:#7c3aed; --purple-soft:#efe6ff; --shadow:0 14px 34px rgba(31,79,130,.10);
--radius:22px; --radius-sm:14px;
--font:"PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Inter Variable","Inter","SF Pro Display","Segoe UI",sans-serif; --font-mono:"JetBrains Mono","SFMono-Regular",Consolas,monospace;
}
*{box-sizing:border-box} html,body{height:100%}
body{
margin:0; font-family:var(--font); color:var(--text);
-webkit-font-smoothing:antialiased;
text-rendering:optimizeLegibility;
font-size:14px;
letter-spacing:.001em;
font-feature-settings:"tnum" 1, "cv02" 1, "cv03" 1;
background:
radial-gradient(circle at top left, rgba(46,99,156,.14), transparent 28%),
radial-gradient(circle at top right, rgba(15,118,110,.10), transparent 24%),
linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}
button,input,select,textarea{font:inherit}
button{border:0;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease,border-color .16s ease}
button:hover{transform:translateY(-1px)} button:active{transform:translateY(0)}
.hero{padding:20px 24px 12px;max-width:1480px;margin:0 auto}
.hero-panel{
background:linear-gradient(135deg, rgba(31,79,130,.96), rgba(46,99,156,.96));
color:#fff;border-radius:28px;box-shadow:0 18px 36px rgba(31,79,130,.20);
padding:18px 20px;display:grid;grid-template-columns:minmax(0,1fr) minmax(380px, 450px);gap:14px;align-items:stretch;position:relative;overflow:hidden;min-height:284px;
}
.hero-panel::after{
content:"";position:absolute;inset:auto -80px -80px auto;width:220px;height:220px;
background:radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0));pointer-events:none;
}
.eyebrow{
display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.24);border-radius:999px;padding:6px 10px;
font-size:12px;color:rgba(255,255,255,.84);margin-bottom:12px;backdrop-filter:blur(4px)
}
h1{margin:0;font-size:clamp(28px,3.6vw,40px);font-weight:760;letter-spacing:-.03em;line-height:1.04}
.hero-copy{min-width:0;min-height:210px}
.hero p{margin:10px 0 0;max-width:760px;color:rgba(255,255,255,.82);line-height:1.58;font-size:14px;min-height:48px;font-weight:450}
.toolbar{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;align-self:start;align-content:start;position:relative;z-index:1;min-height:168px}
.btn{
padding:11px 16px;border-radius:999px;font-weight:600;display:inline-flex;align-items:center;gap:8px;
border:1px solid transparent;white-space:nowrap
}
.btn-primary{background:#fff;color:var(--navy);box-shadow:0 10px 18px rgba(255,255,255,.16)}
.btn-secondary{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.2);backdrop-filter:blur(4px)}
.btn-ghost{background:#fff;color:var(--navy);border:1px solid var(--line)}
.btn-soft{background:rgba(37,99,235,.08);color:var(--blue);border:1px solid rgba(37,99,235,.16)}
.btn-danger{background:rgba(220,38,38,.08);color:var(--red);border:1px solid rgba(220,38,38,.14)}
main{max-width:1480px;margin:0 auto;padding:0 24px 28px;display:flex;flex-direction:column;gap:14px}
.alert-strip{display:none;gap:8px;flex-wrap:wrap;align-items:center;background:var(--orange-soft);border:1px solid rgba(245,158,11,.20);color:#8a5a00;border-radius:16px;padding:12px 14px;box-shadow:var(--shadow)}
.alert-chip{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;background:rgba(255,255,255,.6);border-radius:999px;font-size:13px}
.kpi-grid{display:grid;grid-template-columns:repeat(6, minmax(0, 1fr));gap:12px;min-height:132px}
.card{background:var(--card);border:1px solid rgba(215,227,240,.88);backdrop-filter:blur(6px);border-radius:20px;box-shadow:var(--shadow);padding:18px}
.kpi-card{display:flex;flex-direction:column;justify-content:space-between;min-height:102px;position:relative;overflow:hidden;gap:8px}
.kpi-card::before{content:"";position:absolute;top:-34px;right:-34px;width:120px;height:120px;background:radial-gradient(circle, rgba(46,99,156,.12), rgba(46,99,156,0));pointer-events:none}
.kpi-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.kpi-label{color:var(--muted);font-size:12.5px;font-weight:650}
.kpi-value{font-size:clamp(19px,1.55vw,25px);font-weight:720;letter-spacing:-.026em;margin-top:10px;font-variant-numeric:tabular-nums lining-nums}
.kpi-sub{margin-top:8px;color:var(--muted);font-size:12px;display:flex;justify-content:space-between;gap:8px}
.kpi-source-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap;background:rgba(148,163,184,.14);color:#516074;border:1px solid rgba(148,163,184,.22)}
.kpi-source-badge.is-manual{background:rgba(59,130,246,.12);color:#1d4ed8;border-color:rgba(59,130,246,.22)}
.kpi-source-badge.is-auto{background:rgba(15,23,42,.06);color:#475569;border-color:rgba(148,163,184,.18)}
.kpi-restore-btn{align-self:flex-start;border:1px solid rgba(148,163,184,.22);background:rgba(255,255,255,.88);color:#334155;border-radius:12px;padding:6px 10px;font-size:12px;font-weight:700;cursor:pointer}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(320px,1fr);gap:14px;align-items:start;contain:none}
.dashboard-full-span{grid-column:1 / -1}

.dashboard-grid > .stack{display:grid;gap:14px;align-content:start}
.dashboard-grid .card{position:relative}
.home-masonry{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;width:100%;min-height:0;align-self:start;align-items:start}
.home-masonry > .card{width:100%;margin:0;position:relative;left:auto;top:auto;visibility:visible;transform:none;min-width:0}
.home-masonry.is-ready > .card,.home-masonry:not(.is-ready) > .card{visibility:visible}

.home-more-details{display:grid;gap:12px}
.home-more-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;font-weight:800;color:var(--navy);padding:2px 0}
.home-more-details summary::-webkit-details-marker{display:none}
.home-more-details summary::after{content:"展开";font-size:12px;color:var(--muted);font-weight:700}
.home-more-details[open] summary::after{content:"收起"}
.home-more-hint{font-size:12px;color:var(--muted);font-weight:600}
.home-more-copy{margin:0;color:var(--muted);font-size:12px;line-height:1.55}

.home-more-stack{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;align-items:start}
.home-more-stack > .card{padding:16px;border-radius:20px;background:rgba(248,250,252,.92);min-width:0;min-height:100%}
.home-more-stack > #panelFx{grid-column:1 / -1}
.home-more-stack > #panelHealth{grid-column:span 4}
.home-more-stack > #panelDiagnostics{grid-column:span 4}
body[data-route="home"] #homeMasonry > #panelSuggestions{grid-column:1 / -1}
body[data-route="home"] #homeMasonry > #panelSummary{grid-column:span 4}
body[data-route="home"] #homeMasonry > #panelCash{grid-column:span 4}
body[data-route="home"] #homeMasonry > #panelAssetType{grid-column:span 4}
body[data-route="home"] #panelSuggestions .suggestion-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body[data-route="home"] #panelHomeMore{padding:18px 18px 20px}
body[data-route="home"] #panelHomeMore .home-more-details{gap:14px}
body[data-route="home"] #panelHomeMore .home-more-copy{max-width:880px}
body[data-route="home"] #panelHomeMore .home-more-details[open] .home-more-stack{margin-top:4px}
body[data-route="home"] #panelHealth .section-head p,
body[data-route="home"] #panelFx .section-head p,
body[data-route="home"] #panelDiagnostics .section-head p,
.panel-shell{min-height:inherit;display:flex;flex-direction:column}
.panel-shell-inner{min-height:inherit;display:grid;gap:10px;align-content:start}
.panel-market-shell,.panel-review-shell,.panel-backtest-shell,.panel-health-shell,.panel-analysis-shell{min-height:0}
.analysis-card{min-height:0;display:flex;flex-direction:column}
.analysis-topline p,.analysis-copy,.analysis-execution-copy,.market-hero-copy,.market-reason-item span,.health-sub,.grid-config-note{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.analysis-topline p,.analysis-copy{line-clamp:3;-webkit-line-clamp:3}
.analysis-execution-copy,.market-hero-copy,.market-reason-item span{line-clamp:2;-webkit-line-clamp:2}
.health-sub,.grid-config-note{line-clamp:2;-webkit-line-clamp:2}
.card[data-loading="true"]::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.22), rgba(255,255,255,0));opacity:.35;pointer-events:none;animation:cardShimmer 1.4s linear infinite}
@keyframes cardShimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}

.toolbar .btn{min-width:120px;min-height:40px;padding:9px 14px;border-radius:15px;font-size:13px;font-weight:700;letter-spacing:-.008em;box-shadow:0 8px 18px rgba(15,23,42,.10)}
.toolbar .btn-secondary{background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.08));border-color:rgba(255,255,255,.22);color:rgba(255,255,255,.96)}
.toolbar .btn-primary{background:linear-gradient(135deg,#ffffff,#eef5ff);color:var(--navy);box-shadow:0 10px 22px rgba(10,37,64,.12)}
.analysis-llm-btn{padding:8px 12px;border-radius:999px;font-size:12px;line-height:1.1;white-space:nowrap}
.analysis-llm-btn[disabled]{opacity:.6;cursor:not-allowed;transform:none}
.section-head{min-height:52px}
@supports (content-visibility:auto){
.defer-card{content-visibility:auto;contain-intrinsic-size:720px}
.defer-card-large{contain-intrinsic-size:1080px}
}
#refreshAnalysisBtn,#reloadRemoteBtn{min-width:148px}
#assetTypeChart{height:260px;min-height:260px}
#suggestions,#allocationDrift,#cashPanel,#healthPanel,#portfolioSummaryPanel,#vixPanel,#gridCoverage,#triggerMatrix,#usStrategyPanel,#usReviewPanel,#backtestPanel,#analysisBoard{min-height:0}
.analysis-grid{align-items:start}
.grid-insight-list{align-items:start;min-height:0}
.empty-state{min-height:180px;display:grid;place-items:center;text-align:center}
.empty-state-note{display:block;margin-top:8px}

.stack{display:flex;flex-direction:column;gap:14px}
.section-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}
.section-head h2{margin:0;font-size:19px;font-weight:760;letter-spacing:-.024em;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.section-icon{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:800;line-height:1;color:#fff;box-shadow:0 8px 18px rgba(31,79,130,.14)}
.section-icon-us{background:linear-gradient(135deg,#2563eb,#1d4ed8)}
.section-icon-review{background:linear-gradient(135deg,#14b8a6,#0f766e)}
.section-icon-vix{background:linear-gradient(135deg,#f97316,#ea580c)}
.section-head p{margin:4px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}
.section-tools,.summary-line{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.summary-line{color:var(--muted);font-size:13px}
.pill{display:inline-flex;align-items:center;gap:7px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid transparent;white-space:nowrap}
.pill-blue{background:rgba(37,99,235,.10);color:var(--blue);border-color:rgba(37,99,235,.16)}
.pill-green{background:var(--green-soft);color:#166534;border-color:rgba(22,163,74,.18)}
.pill-orange{background:var(--orange-soft);color:#8a5a00;border-color:rgba(245,158,11,.18)}
.pill-red{background:var(--red-soft);color:#991b1b;border-color:rgba(220,38,38,.18)}
.pill-purple{background:var(--purple-soft);color:var(--purple);border-color:rgba(124,58,237,.18)}
.pill-slate{background:#eff4f9;color:var(--muted);border-color:rgba(91,115,140,.14)}
.suggestion-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;align-items:start}.suggestion-list > *{min-width:0}.suggestion-card{height:100%;display:grid;align-content:start;gap:10px}
.suggestion-card{border:1px solid var(--line);border-radius:16px;padding:12px;background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,250,255,.95))}
.suggestion-card.buy{border-left:4px solid var(--blue)}
.suggestion-card.sell{border-left:4px solid var(--orange)}
.suggestion-card.risk{border-left:4px solid var(--red)}
.suggestion-card.neutral{border-left:4px solid var(--muted)}
.suggestion-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.suggestion-title{font-size:16px;font-weight:800;margin:0}
.suggestion-sub{margin-top:3px;color:var(--muted);font-size:12px}
.metric-grid{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:8px;margin:10px 0}
.metric-box{background:#f7fbff;border:1px solid var(--line);border-radius:12px;padding:8px 10px;min-height:64px}
.metric-box span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
.metric-box strong{font-size:16px;letter-spacing:-.02em}
.metric-box small{display:block;margin-top:6px;color:var(--muted);font-size:11px;line-height:1.45;word-break:break-word}
.suggestion-text{margin:0;color:var(--muted);line-height:1.5;font-size:13px}
.suggestion-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.suggestion-timing{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px;padding:8px 10px;border-radius:12px;background:rgba(37,99,235,.05);border:1px dashed rgba(37,99,235,.14)}
.suggestion-timing strong{font-size:12px}
.suggestion-timing .timing-text{font-size:12px;color:var(--muted);line-height:1.45}
.trade-action-buttons{display:flex;flex-wrap:wrap;gap:8px}

.trade-filter-bar{display:grid;gap:10px;margin:14px 0 12px}
.trade-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.trade-filters input,.trade-filters select{min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.72);color:var(--text)}
.trade-filters input{min-width:180px;flex:1 1 180px}
.trade-filters select{min-width:128px}
.trade-filters-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;color:var(--muted);font-size:13px}

.state-message{min-height:0;display:grid;place-items:center;text-align:center;gap:2px}
.state-message.is-warning{border-color:rgba(245,158,11,.28);background:linear-gradient(180deg, rgba(255,251,235,.94), rgba(255,247,237,.98));}
.state-message.is-error{border-color:rgba(239,68,68,.24);background:linear-gradient(180deg, rgba(254,242,242,.94), rgba(254,242,242,.98));}
.state-message-wrap.compact .empty-state{min-height:0;padding:14px 16px}
.trade-pagination{margin-top:12px}
.trade-pagination-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.76)}
.trade-pagination-meta,.trade-pagination-page{font-size:13px;color:var(--muted)}
.trade-pagination-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.trigger-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.trigger-card{border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(245,250,255,.96));padding:14px 16px;display:grid;gap:12px}
.trigger-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.trigger-title{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.trigger-title strong{font-size:17px}
.trigger-sub{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.5}
.trigger-count{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.trigger-compact-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.trigger-metric-box{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(255,255,255,.82)}
.trigger-metric-box span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
.trigger-metric-box strong{font-size:15px;letter-spacing:-.02em}
.trigger-progress-wrap{display:grid;gap:7px;min-width:0}
.trigger-state-strip{display:flex;flex-wrap:wrap;gap:8px}
.trigger-state-chip{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;background:#f8fbff;border:1px solid var(--line);font-size:12px}
.trigger-state-chip strong{font-size:12px}
.trigger-note-box{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(255,255,255,.78);display:grid;gap:6px}
.trigger-note-line{color:var(--muted);font-size:13px;line-height:1.55}
.trigger-note-line strong{color:var(--text)}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700;border:1px solid transparent;white-space:nowrap}
.status-yes{background:var(--green-soft);color:#166534;border-color:rgba(22,163,74,.18)}
.status-no{background:#eff4f9;color:var(--muted);border-color:rgba(91,115,140,.14)}
.status-watch{background:rgba(37,99,235,.10);color:var(--blue);border-color:rgba(37,99,235,.16)}
.status-block{background:var(--orange-soft);color:#8a5a00;border-color:rgba(245,158,11,.18)}
.empty-state{padding:22px;border:1px dashed var(--line);border-radius:18px;color:var(--muted);background:linear-gradient(180deg, rgba(255,255,255,.84), rgba(244,248,252,.95));text-align:center;line-height:1.7;min-height:inherit;align-content:center}
.empty-state-note{margin-top:8px;font-size:12px;color:#b45309;word-break:break-word}
.donut-layout{display:flex;gap:18px;align-items:center;min-height:260px}
.donut{width:196px;height:196px;border-radius:50%;position:relative;flex:0 0 auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.donut::before{content:"";position:absolute;inset:28px;background:var(--card-strong);border-radius:50%;box-shadow:inset 0 0 0 1px rgba(215,227,240,.6)}
.donut-center{position:absolute;inset:0;display:grid;place-items:center;text-align:center;z-index:1;padding:0 38px}
.donut-center strong{display:block;font-size:26px;font-weight:730;line-height:1.08;letter-spacing:-.02em}
.donut-center span{color:var(--muted);font-size:12px;margin-top:4px;line-height:1.4}
.legend{display:grid;gap:10px;width:100%}
.legend-item{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;font-size:13px}
.legend-swatch{width:12px;height:12px;border-radius:999px}
.legend-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bars{display:flex;flex-direction:column;gap:14px}
.bar-row{display:grid;gap:8px}
.bar-head{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:14px}
.bar-head .label-wrap{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bar-track{height:16px;border-radius:999px;background:linear-gradient(90deg, #edf4fb, #f7fbff);position:relative;overflow:hidden;border:1px solid #e1edf8}
.bar-fill{position:absolute;inset:0 auto 0 0;border-radius:999px;background:linear-gradient(90deg, var(--navy-2), #5d9bd5)}
.bar-fill.green{background:linear-gradient(90deg, #15803d, #4ade80)}
.bar-fill.orange{background:linear-gradient(90deg, #c2410c, #f59e0b)}
.bar-fill.red{background:linear-gradient(90deg, #b91c1c, #f87171)}
.bar-fill.purple{background:linear-gradient(90deg, #6d28d9, #a855f7)}
.bar-fill.teal{background:linear-gradient(90deg, #0f766e, #2dd4bf)}
.bar-target{position:absolute;top:-4px;width:4px;height:22px;border-radius:999px;background:#111827;box-shadow:0 0 0 2px rgba(255,255,255,.82)}
.bar-marker{position:absolute;top:-3px;width:3px;height:21px;border-radius:999px;background:var(--orange);box-shadow:0 0 0 2px rgba(255,255,255,.85)}
.cash-stack{display:flex;flex-direction:column;gap:14px}
.portfolio-summary-panel{display:grid;gap:12px}
.portfolio-summary-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.summary-metric-card,.summary-list-card,.summary-action-card{border:1px solid var(--line);border-radius:18px;padding:13px;background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,250,255,.96))}
.summary-metric-card span{display:block;color:var(--muted);font-size:12px}
.summary-metric-card strong{display:block;font-size:20px;font-weight:740;letter-spacing:-.024em;margin-top:6px}
.portfolio-summary-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.summary-list-title{font-size:13px;font-weight:800;margin-bottom:10px}
.summary-list-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #edf2f7}
.summary-list-item:last-child{border-bottom:0;padding-bottom:0}
.summary-list-empty{color:var(--muted);font-size:12px;line-height:1.6}
.summary-action-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}
.summary-action-main{font-size:15px;font-weight:800;letter-spacing:-.01em;margin-bottom:6px}
.cash-box{border:1px solid var(--line);border-radius:18px;padding:14px;background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,250,255,.96))}
.cash-box strong{font-size:22px;display:block;margin-top:5px}
.cash-box span{color:var(--muted);font-size:12px}
.price-card{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(255,255,255,.8)}
.price-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.price-main{font-size:18px;font-weight:800;letter-spacing:-.02em}
.subtle{color:var(--muted);font-size:13px}
.price-extra{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.table-section{overflow:hidden}
.table-wrap{overflow:auto;border-radius:18px;border:1px solid var(--line)}
table{width:100%;border-collapse:collapse;min-width:1180px;background:rgba(255,255,255,.92)}
thead th{position:sticky;top:0;z-index:1;background:linear-gradient(180deg, var(--navy), var(--navy-2));color:#fff;padding:10px 8px;text-align:left;font-size:11.5px;font-weight:680;white-space:nowrap;letter-spacing:.01em}
tbody td{padding:10px 8px;border-bottom:1px solid #e8eff7;vertical-align:top;font-size:12.5px;line-height:1.5}
tbody tr:nth-child(even){background:rgba(248,251,255,.9)}
tbody tr:hover{background:rgba(230,240,250,.55)}
.asset-symbol{font-size:15px;font-weight:760;line-height:1.25;letter-spacing:-.01em}
.asset-note{color:var(--muted);font-size:12px;margin-top:4px;line-height:1.5}
.action-row{display:flex;flex-wrap:wrap;gap:6px}
.mini-btn{padding:6px 9px;border-radius:999px;font-size:11px;font-weight:700;background:rgba(37,99,235,.08);color:var(--blue);border:1px solid rgba(37,99,235,.14)}
.mini-btn.warn{background:rgba(245,158,11,.10);color:#92400e;border-color:rgba(245,158,11,.16)}
.mini-btn.danger{background:rgba(220,38,38,.08);color:var(--red);border-color:rgba(220,38,38,.14)}
.quick-panel{display:grid;grid-template-columns:1.08fr .92fr;gap:12px;margin-bottom:12px}
.quick-card{border:1px solid var(--line);border-radius:16px;padding:13px;background:rgba(255,255,255,.84)}
.quick-card h3{margin:0 0 8px;font-size:16px}
.quick-grid{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));gap:8px;margin-top:8px}
.quick-tile{padding:10px;border-radius:14px;background:#f7fbff;border:1px solid var(--line)}
.quick-tile span{color:var(--muted);font-size:12px;display:block}
.quick-tile strong{font-size:16px;display:block;margin-top:5px}
dialog{width:min(820px, calc(100vw - 20px));max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);border:0;border-radius:24px;padding:0;box-shadow:0 34px 60px rgba(15,23,42,.24);overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
dialog::backdrop{background:rgba(15,23,42,.46);backdrop-filter:blur(3px)}
.dialog-head{background:linear-gradient(135deg, var(--navy), var(--navy-2));color:white;padding:16px 20px;flex:0 0 auto}
.dialog-head h3{margin:0;font-size:22px}
.dialog-head p{margin:8px 0 0;color:rgba(255,255,255,.82);font-size:13px;line-height:1.5}
.dialog-body{padding:18px 20px 20px;background:#f5f9ff;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;flex:1 1 auto}
.form-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:12px}
.form-grid.three{grid-template-columns:repeat(3, minmax(0, 1fr))}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:13px;color:var(--muted);font-weight:700}
.field input,.field select,.field textarea{border:1px solid var(--line);background:white;border-radius:12px;padding:10px 11px;outline:none;min-height:40px}
.field textarea{resize:vertical;min-height:100px}
.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(37,99,235,.42);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.dialog-actions{display:flex;justify-content:space-between;gap:10px;margin-top:14px;flex-wrap:wrap;position:sticky;bottom:0;padding-top:12px;background:linear-gradient(180deg, rgba(249,252,255,0), #f9fcff 18px, #f9fcff 100%)}
.hint{color:var(--muted);font-size:12px;line-height:1.5;margin-top:4px}
.toggle-row{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:white;min-height:46px}
.toggle-row input{width:18px;height:18px;accent-color:var(--navy)}
.hero-status{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;min-height:104px;align-content:flex-start}
.status-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18);color:#fff;font-size:12px;backdrop-filter:blur(4px)}
.status-chip strong{font-size:12px}
.status-dot{width:8px;height:8px;border-radius:999px;background:#cbd5e1;flex:0 0 auto}
.status-dot.green{background:#4ade80}.status-dot.orange{background:#fbbf24}.status-dot.red{background:#f87171}.status-dot.blue{background:#60a5fa}.status-dot.slate{background:#cbd5e1}
.api-note{grid-column:span 3;padding:12px 14px;border-radius:16px;border:1px solid var(--line);background:#fff;line-height:1.6;color:var(--muted);font-size:12px}

.settings-shell{display:flex;flex-direction:column;gap:16px}
.settings-section{padding:16px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#ffffff 0%, #f7fbff 100%);box-shadow:0 10px 30px rgba(31,55,91,.04)}
.settings-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
.settings-section-title{margin:0;font-size:18px;color:var(--navy)}
.settings-section-desc{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.settings-section .field-full{grid-column:1 / -1}
.settings-section .field-span-2{grid-column:span 2}
.toggle-stack{display:flex;flex-direction:column;gap:8px}

.smart-panel{grid-column:span 3;display:grid;gap:10px}
.smart-toggle{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:#fff}
.smart-toggle input{width:18px;height:18px;accent-color:var(--navy);margin-top:2px}
.smart-toggle strong{display:block;font-size:14px}
.smart-toggle .sub{color:var(--muted);font-size:12px;line-height:1.55;margin-top:4px}
.smart-toggle .mini-btn{margin-left:auto;white-space:nowrap}
.smart-preview{padding:12px 14px;border-radius:16px;border:1px dashed rgba(31,79,130,.22);background:linear-gradient(180deg,#fff, #f8fbff);font-size:12px;line-height:1.65;color:var(--muted)}
.smart-preview strong{color:var(--ink)}
.smart-impact{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.smart-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#eef5ff;border:1px solid #d5e4fb;color:var(--navy);font-size:12px;font-weight:700}
.rules-panel{grid-column:1 / -1;display:grid;gap:14px;padding:16px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fff,#f8fbff)}
.rules-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.rules-head p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.rules-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.rules-card{padding:12px 14px;border-radius:16px;border:1px solid var(--line);background:#fff;display:grid;gap:6px}
.rules-card strong{font-size:14px}
.rules-card .sub{color:var(--muted);font-size:12px;line-height:1.6}
.rules-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}
.rules-table{width:100%;min-width:980px;border-collapse:collapse}
.rules-table th,.rules-table td{padding:10px 12px;border-bottom:1px solid #edf2f7;text-align:left;vertical-align:middle;font-size:13px}
.rules-table th{background:#f7fbff;color:var(--muted);font-weight:700}
.rules-table tr:last-child td{border-bottom:0}
.rules-table input{width:96px;padding:9px 10px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--text)}
.rules-type{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--text)}
.rules-tag{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#eef5ff;color:var(--navy);border:1px solid #d5e4fb;font-size:11px;font-weight:700}
.rule-note{padding:12px 14px;border-radius:14px;background:#fff;border:1px dashed rgba(31,79,130,.22);font-size:12px;line-height:1.7;color:var(--muted)}
.field input[type="password"]{letter-spacing:.06em}
tbody td[data-label]::before{content:attr(data-label);display:none;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:4px}
.toast{position:fixed;bottom:18px;right:18px;display:flex;align-items:center;gap:12px;max-width:min(520px, calc(100vw - 24px));background:rgba(17,24,39,.92);color:white;padding:14px 16px;border-radius:16px;box-shadow:0 16px 34px rgba(15,23,42,.28);opacity:0;transform:translateY(10px);pointer-events:none;transition:opacity .2s ease, transform .2s ease;z-index:50}
.toast.show{opacity:1;transform:translateY(0);pointer-events:auto}
.num-neg{color:var(--green)} .num-pos{color:var(--red)} .mono{font-variant-numeric:tabular-nums}

.analysis-board{display:grid;gap:12px;align-content:start}
.analysis-empty{padding:18px 20px;border:1px dashed var(--line);border-radius:18px;background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(244,248,252,.95));color:var(--muted);line-height:1.7}
.analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.analysis-card{border:1px solid var(--line);border-radius:22px;padding:16px;background:linear-gradient(180deg, rgba(255,255,255,.97), rgba(244,248,253,.94));display:grid;grid-template-rows:auto auto auto auto auto;gap:14px;min-width:0;height:auto}
.analysis-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.analysis-symbol{font-size:20px;font-weight:800;letter-spacing:-.02em}
.analysis-sub{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.analysis-meta{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.analysis-topline{display:grid;grid-template-columns:minmax(0,1.2fr) auto;gap:12px;align-items:start;padding:14px;border:1px solid rgba(37,99,235,.10);border-radius:18px;background:linear-gradient(135deg, rgba(37,99,235,.06), rgba(15,118,110,.06))}
.analysis-topline-label{font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}
.analysis-topline-action{font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1.15}
.analysis-topline p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.analysis-ai-note{margin-top:10px;padding:10px 12px;border-radius:12px;border:1px dashed rgba(124,58,237,.25);background:rgba(124,58,237,.06);color:var(--muted);font-size:12px;line-height:1.55}
.analysis-topline-side{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-content:flex-start}
.analysis-kpi-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.analysis-kpi{border:1px solid var(--line);border-radius:16px;padding:12px 12px;background:#fff}
.analysis-kpi span{display:block;color:var(--muted);font-size:12px;margin-bottom:8px;font-weight:700}
.analysis-kpi strong{display:block;font-size:28px;font-weight:740;letter-spacing:-.028em;line-height:1}
.analysis-main-grid{display:grid;grid-template-columns:minmax(0,.98fr) minmax(0,1.02fr);gap:12px;align-items:stretch}
.analysis-main-grid.analysis-main-grid-single{grid-template-columns:1fr}
.analysis-panel{border:1px solid var(--line);border-radius:18px;padding:12px;background:rgba(255,255,255,.84);display:grid;gap:10px;min-width:0;height:100%;align-content:start}
.analysis-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
.analysis-panel-title{font-size:15px;font-weight:800;letter-spacing:-.01em}
.analysis-panel-sub{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.analysis-score-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);background:#f7fbff;font-size:12px;color:var(--muted);line-height:1}
.analysis-score-chip strong{font-size:14px;color:var(--text);letter-spacing:-.02em}
.analysis-copy{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
.analysis-metrics-compact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.analysis-metric{border:1px solid var(--line);border-radius:12px;padding:10px;background:#f7fbff;min-width:0}
.analysis-metric span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}
.analysis-metric strong{display:block;font-size:15px;letter-spacing:-.02em;line-height:1.35;word-break:break-word}
.analysis-metric.emphasis{background:linear-gradient(180deg,#fff,#f3f8ff);border-color:#d7e7fb}
.analysis-summary-block{padding:11px 12px;border-radius:14px;border:1px solid rgba(37,99,235,.12);background:linear-gradient(180deg,#fff,#f7fbff)}
.analysis-summary-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.analysis-summary-block-ai{border:1px solid rgba(124,58,237,.14);background:rgba(124,58,237,.05)}
.analysis-summary-head .analysis-summary-label{margin-bottom:0}
.analysis-summary-label{display:block;color:var(--muted);font-size:11px;font-weight:700;margin-bottom:6px}
.analysis-signal-row{display:flex;flex-wrap:wrap;gap:8px}
.analysis-tags{display:flex;flex-wrap:wrap;gap:8px}
.analysis-news-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.analysis-news-list{display:grid;gap:8px}
.analysis-news-item{padding:10px 11px;border:1px solid rgba(215,227,240,.88);border-radius:13px;background:#f7fbff;display:grid;gap:6px;align-content:start}
.analysis-news-item a{color:var(--text);font-weight:700;text-decoration:none;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em}
.analysis-news-item a:hover{text-decoration:underline}
.analysis-news-meta{margin-top:2px;color:var(--muted);font-size:12px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.analysis-scorebar{height:10px;border-radius:999px;background:#edf3f9;overflow:hidden;border:1px solid rgba(215,227,240,.88)}
.analysis-scorefill{height:100%;border-radius:999px;background:linear-gradient(90deg, rgba(37,99,235,.95), rgba(34,197,94,.92))}
.analysis-panel-foot{margin-top:auto;display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.analysis-news-more{border-top:1px dashed rgba(215,227,240,.88);padding-top:8px}
.analysis-news-more summary{cursor:pointer;list-style:none;color:var(--navy);font-size:12px;font-weight:700}
.analysis-news-more summary::-webkit-details-marker{display:none}
.analysis-news-more[open] summary{margin-bottom:8px}
.analysis-debug{font-size:12px;color:#7b8ea3;line-height:1.5}
.analysis-foot{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:12px}
.analysis-grid{grid-auto-rows:auto}
.analysis-decision{border:1px solid rgba(37,99,235,.12);border-radius:18px;padding:13px;background:linear-gradient(135deg, rgba(37,99,235,.05), rgba(15,118,110,.05));display:grid;gap:10px}
.analysis-decision-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.analysis-decision-title{font-size:16px;font-weight:800;letter-spacing:-.02em}
.analysis-decision-sub{margin-top:5px;color:var(--muted);font-size:12px;line-height:1.55}
.analysis-decision-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.analysis-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.analysis-check{border:1px solid var(--line);border-radius:13px;padding:10px 11px;background:#fff;display:grid;gap:4px;align-content:start}
.analysis-check span{font-size:12px;font-weight:700;color:var(--muted)}
.analysis-check strong{font-size:15px;line-height:1.35;letter-spacing:-.01em}
.analysis-check small{color:var(--muted);font-size:11px;line-height:1.45}
.analysis-check.bullish{border-color:rgba(220,38,38,.16);background:linear-gradient(180deg,#fff,#fff1f1)}
.analysis-check.bullish strong{color:#991b1b}
.analysis-check.bearish{border-color:rgba(22,163,74,.18);background:linear-gradient(180deg,#fff,#f1fbf4)}
.analysis-check.bearish strong{color:#166534}
.analysis-check.neutral{border-color:rgba(91,115,140,.14);background:linear-gradient(180deg,#fff,#f8fbff)}
.analysis-fundamentals-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.analysis-main-grid + .analysis-panel{margin-top:12px}
.analysis-news-list{display:grid;gap:8px;max-height:286px;overflow:auto;padding-right:2px}
body[data-route="macro"] .analysis-main-grid{align-items:start}
body[data-route="macro"] .analysis-panel{height:auto;align-self:start}
body[data-route="macro"] .analysis-panel-news{height:auto;align-self:start}
body[data-route="macro"] .analysis-news-list{max-height:none;overflow:visible;padding-right:0}
.market-modules-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:14px}
.market-hero{border:1px solid var(--line);border-radius:18px;padding:14px;background:linear-gradient(135deg, rgba(37,99,235,.06), rgba(124,58,237,.05));display:grid;gap:12px}
.market-hero-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.market-hero-title{font-size:22px;font-weight:800;letter-spacing:-.03em}
.market-hero-copy{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.65}
.market-checklist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.market-check{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#fff;font-size:12px;line-height:1.55}
.market-index-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.market-index-card{border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:#fff;display:grid;gap:7px}
.market-index-card span{font-size:12px;color:var(--muted);font-weight:700}
.market-index-card strong{font-size:20px;letter-spacing:-.03em}
.market-mini{font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:8px}
.market-sector-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.market-sector-list{display:grid;gap:8px}
.market-sector-item{border:1px solid var(--line);border-radius:13px;padding:10px 12px;background:#fff;display:flex;justify-content:space-between;gap:10px;align-items:center}
.market-sector-item strong{font-size:13px}
.backtest-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.backtest-card{border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:#fff;display:grid;gap:6px}
.backtest-card span{font-size:12px;color:var(--muted);font-weight:700}
.backtest-card strong{font-size:22px;letter-spacing:-.03em}
.backtest-records{display:grid;gap:8px;margin-top:10px}
.backtest-record{border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:#fff;display:grid;grid-template-columns:140px minmax(0,1fr) auto;gap:10px;align-items:center}
.backtest-record-sub{font-size:12px;color:var(--muted);line-height:1.5}
.backtest-record-main{display:grid;gap:4px}
.backtest-record-main strong{font-size:14px}
.backtest-tag{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700;border:1px solid transparent;white-space:nowrap}
.backtest-tag.target{background:var(--green-soft);color:#166534;border-color:rgba(22,163,74,.18)}
.backtest-tag.stop{background:var(--red-soft);color:#991b1b;border-color:rgba(220,38,38,.18)}
.backtest-tag.open{background:rgba(37,99,235,.10);color:var(--blue);border-color:rgba(37,99,235,.16)}
.backtest-tag.ambiguous{background:var(--orange-soft);color:#8a5a00;border-color:rgba(245,158,11,.18)}
@media (max-width:1280px){.kpi-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}.dashboard-grid,.market-modules-grid,.trigger-list,.trigger-compact-grid{grid-template-columns:1fr}.quick-panel{grid-template-columns:1fr}.analysis-grid,.analysis-main-grid,.analysis-topline,.analysis-decision-grid,.analysis-checklist,.analysis-fundamentals-grid,.market-index-grid,.market-checklist,.market-sector-grid,.backtest-kpis{grid-template-columns:1fr}}
@media (max-width:900px){.hero{padding:16px 16px 12px} main{padding:0 16px 24px}.hero-panel{padding:20px;grid-template-columns:1fr;min-height:auto}.toolbar{justify-content:flex-start;min-height:auto}.kpi-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}.donut-layout{flex-direction:column;align-items:flex-start}.metric-grid,.quick-grid,.form-grid,.form-grid.three,.rules-grid,.analysis-metrics,.analysis-kpi-row,.analysis-news-stats,.analysis-metrics-compact,.backtest-record,.portfolio-summary-metrics,.portfolio-summary-split,.vix-top{grid-template-columns:1fr}.trigger-state-strip{gap:6px}.api-note,.settings-section .field-span-2,.settings-section .field-full{grid-column:span 1}.hero-status{width:100%;min-height:auto}.rules-head,.settings-section-head,.fx-converter-head{flex-direction:column;align-items:flex-start}.kpi-sub{flex-direction:column;align-items:flex-start}}
@media (max-width:760px){table{min-width:0}thead{display:none}tbody,tr,td{display:block;width:100%}tbody tr{padding:12px;border-bottom:1px solid #e8eff7;background:rgba(255,255,255,.92)}tbody tr:nth-child(even){background:rgba(248,251,255,.96)}tbody td{padding:8px 0;border-bottom:0}tbody td[data-label]::before{display:block}.table-wrap{overflow:visible;border:none}.action-row{padding-top:4px}}
@media (max-width:560px){.kpi-grid{grid-template-columns:1fr}.section-head{flex-direction:column}.toolbar{width:100%}.toolbar .btn{flex:1 1 calc(50% - 10px);justify-content:center}.suggestion-actions,.action-row,.section-tools{width:100%}.btn,.mini-btn{justify-content:center}.status-chip{width:100%;justify-content:flex-start}.dialog-body,.dialog-head{padding-left:16px;padding-right:16px}dialog{width:min(100vw - 12px, 860px);max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);border-radius:20px}.dialog-actions{padding-bottom:max(2px, env(safe-area-inset-bottom))}.trade-filters input,.trade-filters select,.fx-quick-actions .mini-action-btn,.kpi-restore-btn{width:100%}.trade-pagination-bar{flex-direction:column;align-items:flex-start}.trade-pagination-actions{width:100%}.trade-pagination-actions .mini-action-btn{flex:1 1 calc(50% - 6px)}}

.grid-insight-list{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:10px;
align-items:start
}
.grid-insight-card{
border:1px solid var(--line); border-radius:18px; padding:12px 13px;
background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,248,253,.92));
box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
display:flex; flex-direction:column; height:100%; min-width:0;
}
.grid-insight-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}
.grid-insight-main{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.grid-insight-title{font-size:1rem;font-weight:800}
.grid-insight-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:7px;margin-bottom:9px}
.grid-metric{
border:1px solid var(--line); border-radius:14px; padding:8px 9px 8px;
background:rgba(255,255,255,.72)
}
.grid-metric-label{font-size:.8rem;color:var(--muted);margin-bottom:3px}
.grid-metric-value{font-weight:800;font-size:.96rem}
.grid-progress-wrap{display:grid;gap:7px;min-width:0}
.grid-progress-top{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.grid-hint{color:var(--muted);font-size:.88rem;line-height:1.55}
.grid-progress-note{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font-size:.86rem;flex-wrap:wrap}
.bar-fill.grid{background:linear-gradient(90deg, rgba(245,158,11,.95), rgba(217,119,6,.96))}
.bar-fill.grid-ok{background:linear-gradient(90deg, rgba(15,118,110,.95), rgba(20,184,166,.92))}
.grid-level-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.grid-level-chip{
padding:6px 9px;border-radius:999px;border:1px solid var(--line);
background:rgba(255,255,255,.72);font-size:.8rem;color:var(--muted)
}
.grid-level-chip.active{
background:var(--orange-soft);border-color:rgba(245,158,11,.35);color:#9a5a00;font-weight:700
}
.grid-level-chip.hit{
background:var(--green-soft);border-color:rgba(22,163,74,.28);color:var(--green);font-weight:700
}
.grid-config-note{margin-top:6px;color:var(--muted);font-size:.86rem;line-height:1.5}
@media (max-width: 960px){
.grid-insight-list{grid-template-columns:1fr}
.grid-insight-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 640px){
.grid-insight-meta{grid-template-columns:1fr}
}

.trigger-grid-card{display:flex;flex-direction:column;gap:0}
.trigger-coverage-meta{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:9px}
.trigger-progress-pills{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start}
.bar-row-extended{gap:9px}
.bar-foot-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.bar-mini-track{display:inline-flex;align-items:center;width:92px;height:10px;border-radius:999px;background:linear-gradient(90deg,#edf4fb,#f7fbff);border:1px solid #e1edf8;overflow:hidden}
.bar-mini-fill{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--navy-2),#5d9bd5)}
.bar-mini-fill.green{background:linear-gradient(90deg,#15803d,#4ade80)}
.bar-mini-fill.red{background:linear-gradient(90deg,#b91c1c,#f87171)}

@media (max-width: 1100px){.trigger-coverage-meta{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width: 760px){.trigger-coverage-meta{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 520px){.trigger-coverage-meta{grid-template-columns:1fr;}}

.health-panel{display:grid;gap:10px;align-content:start}
.health-actions{display:flex;justify-content:flex-end}
.health-grid{display:grid;grid-template-columns:1fr;gap:8px}
.health-card{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#fff;display:grid;gap:5px}
.health-card.ok{background:linear-gradient(180deg,#fff,#f5fcf7);border-color:rgba(22,163,74,.18)}
.health-card.warn{background:linear-gradient(180deg,#fff,#fff9ef);border-color:rgba(245,158,11,.22)}
.health-card.plan{background:linear-gradient(180deg,#fff,#faf5ff);border-color:rgba(124,58,237,.18)}
.health-card.migrate{background:linear-gradient(180deg,#fff,#f3f8ff);border-color:rgba(37,99,235,.18)}
.health-card.error{background:linear-gradient(180deg,#fff,#fff2f2);border-color:rgba(220,38,38,.18)}
.mini-action-btn{border:1px solid rgba(59,130,246,.18);background:linear-gradient(180deg,#fff,#f4f8ff);color:#1d4ed8;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.mini-action-btn:hover{background:linear-gradient(180deg,#fff,#eef4ff)}
.health-head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.health-head-main{display:flex;align-items:center;gap:8px;min-width:0}
.health-main{font-size:13px;font-weight:700;line-height:1.45}
.health-sub{font-size:12px;color:var(--muted);line-height:1.45}
.health-reco{font-size:12px;line-height:1.5;color:#17324d;background:rgba(255,255,255,.76);border:1px dashed rgba(91,115,140,.18);border-radius:10px;padding:6px 8px}
.health-notes{display:grid;gap:6px}
.health-note{font-size:12px;color:var(--muted);line-height:1.5;padding:8px 10px;border-radius:12px;background:rgba(248,251,255,.92);border:1px dashed #d7e4f1}
.health-note.danger{background:#fff4f4;border-color:#f4c7c7;color:#8b2424}
.market-reason-list{display:grid;gap:6px}
.market-reason-item{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.82);border:1px solid var(--line);font-size:12px;line-height:1.5}
.market-reason-item strong{font-size:12px;white-space:nowrap}
.analysis-decision-status{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.analysis-execution-copy{font-size:12px;color:var(--muted);line-height:1.55}
.asset-validate-panel{grid-column:1 / -1}
.portfolio-summary-panel .summary-action-main{line-height:1.55}
.vix-panel{display:grid;gap:12px}
.vix-top{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(180px,.72fr) minmax(180px,.72fr);gap:12px;align-items:stretch}
.vix-gauge{border:1px solid var(--line);border-radius:18px;padding:14px;background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,251,255,.92));display:grid;gap:10px}
.vix-gauge-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.vix-value{font-size:31px;font-weight:750;letter-spacing:-.028em}
.vix-sub{color:var(--muted);font-size:12px;line-height:1.5}
.vix-track{position:relative;height:14px;border-radius:999px;background:linear-gradient(90deg,#94a3b8 0 30%,#22c55e 30% 50%,#f59e0b 50% 75%,#ef4444 75% 100%);overflow:hidden}
.vix-marker{position:absolute;top:-2px;width:4px;height:18px;border-radius:999px;background:#17324d;box-shadow:0 0 0 2px rgba(255,255,255,.86)}
.vix-scale{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}
.vix-summary{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(255,255,255,.82);display:grid;gap:8px}
.vix-summary strong{font-size:24px;font-weight:740;letter-spacing:-.028em}
.vix-summary p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.fear-greed-card{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(255,255,255,.86);display:grid;gap:9px}
.fear-greed-card.muted{background:rgba(248,251,255,.78)}
.fear-greed-value-row{display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.fear-greed-value{font-size:31px;font-weight:750;letter-spacing:-.028em}
.fear-greed-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.fear-greed-track{position:relative;height:14px;border-radius:999px;background:linear-gradient(90deg,#ef4444 0 24%,#f59e0b 24% 44%,#3b82f6 44% 56%,#22c55e 56% 76%,#f97316 76% 100%);overflow:hidden}
.fear-greed-marker{position:absolute;top:-2px;width:4px;height:18px;border-radius:999px;background:#17324d;box-shadow:0 0 0 2px rgba(255,255,255,.86)}
.vix-list{display:grid;gap:10px}
.vix-item{border:1px solid var(--line);border-radius:15px;padding:12px;background:rgba(255,255,255,.84);display:grid;gap:8px}
.vix-item-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.vix-item strong{font-size:15px}
.vix-item p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}

@media (max-width:900px){
.health-grid{grid-template-columns:1fr}
.market-reason-item{flex-direction:column}
}

@media (max-width:900px){.panel-market-shell,.panel-review-shell,.panel-backtest-shell,.panel-health-shell,.panel-analysis-shell,.analysis-card{min-height:auto}}

.macro-risk-wrap{display:grid;gap:14px}
.macro-theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.macro-impact-list{margin:0;padding-left:18px;display:grid;gap:6px;color:var(--muted);font-size:13px;line-height:1.55}
.macro-asset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.macro-asset-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(255,255,255,.84);display:grid;gap:8px}
.macro-asset-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.macro-asset-head strong{font-size:14px;line-height:1.3}
.analysis-kpi small{display:block;margin-top:8px;color:var(--muted);font-size:12px;line-height:1.45}
.analysis-news-list{display:grid;gap:10px}
.analysis-news-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(255,255,255,.84);display:grid;gap:6px}
.analysis-news-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.analysis-news-head strong{font-size:14px;line-height:1.45}
.analysis-news-meta{font-size:12px;color:var(--muted);line-height:1.45}

body[data-route="home"] .dashboard-grid{grid-template-columns:1fr;align-items:start}
body[data-route="home"] #homeMasonry{grid-column:1 / -1}
body[data-route="strategy"] .dashboard-grid,
body[data-route="analysis"] .dashboard-grid,
body[data-route="macro"] .dashboard-grid{grid-template-columns:minmax(0,1fr)}
body[data-route="strategy"] #primaryStack,
body[data-route="analysis"] #primaryStack,
body[data-route="macro"] #primaryStack,
body[data-route="strategy"] #secondaryStack,
body[data-route="analysis"] #secondaryStack,
body[data-route="macro"] #secondaryStack{grid-column:1 / -1}

@media (max-width:1280px){
body[data-route="home"] .dashboard-grid{grid-template-columns:1fr}
}

.page-nav{max-width:1480px;margin:0 auto;padding:14px 24px 0;display:flex;flex-wrap:wrap;gap:10px;position:relative;z-index:2}
.page-link{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border-radius:999px;border:1px solid rgba(140,166,194,.24);background:linear-gradient(180deg,#ffffff,#f3f7fd);color:var(--navy);font-weight:760;font-size:12.5px;line-height:1;text-decoration:none;transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;box-shadow:0 8px 18px rgba(15,23,42,.07)}
.page-link:hover{background:linear-gradient(180deg,#ffffff,#eef4ff);transform:translateY(-1px);border-color:rgba(59,130,246,.30);box-shadow:0 14px 28px rgba(15,23,42,.12)}
.page-link[aria-current="page"]{background:linear-gradient(135deg, rgba(37,99,235,.98), rgba(30,64,175,.96));color:#fff;border-color:rgba(37,99,235,.58);box-shadow:0 16px 30px rgba(37,99,235,.24)}
body[data-route="settings"] .hero{padding-bottom:10px}
body[data-route="settings"] main{padding-top:10px}
body[data-route="settings"] #settingsDialog[open]{display:flex;position:relative;inset:auto;transform:none;width:min(1320px, calc(100vw - 40px));max-height:none;min-height:0;margin:0 auto 32px;background:#f5f9ff;border:1px solid rgba(148,163,184,.18);border-radius:28px;overflow:visible;box-shadow:0 24px 60px rgba(15,23,42,.10)}
body[data-route="settings"] #settingsDialog::backdrop{display:none}
body[data-route="settings"] #settingsDialog .dialog-head{position:sticky;top:0;z-index:2;border-radius:28px 28px 0 0;padding:22px 26px;background:linear-gradient(135deg,var(--navy),var(--navy-2))}
body[data-route="settings"] #settingsDialog .dialog-head h3{font-size:28px}
body[data-route="settings"] #settingsDialog .dialog-head p{max-width:900px;font-size:14px}
body[data-route="settings"] #settingsDialog .dialog-body{max-height:none;padding:24px 26px 28px;background:#f5f9ff}
body[data-route="settings"] #settingsDialog .dialog-actions{position:sticky;bottom:0;padding-top:18px;padding-bottom:10px;background:linear-gradient(180deg, rgba(245,249,255,0), rgba(245,249,255,.96) 24px, rgba(245,249,255,1) 100%)}
body[data-route="settings"] .settings-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:2px 0 18px}
body[data-route="settings"] .settings-tab{appearance:none;border:1px solid rgba(148,163,184,.22);background:linear-gradient(180deg,#ffffff,#eef4ff);color:var(--navy);font-weight:800;font-size:13px;line-height:1;padding:10px 16px;border-radius:999px;cursor:pointer;box-shadow:0 10px 22px rgba(15,23,42,.06);transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease}
body[data-route="settings"] .settings-tab:hover{transform:translateY(-1px);border-color:rgba(59,130,246,.28);box-shadow:0 14px 26px rgba(15,23,42,.10)}
body[data-route="settings"] .settings-tab.is-active{background:linear-gradient(135deg, rgba(37,99,235,.98), rgba(30,64,175,.96));color:#fff;border-color:rgba(37,99,235,.58);box-shadow:0 16px 30px rgba(37,99,235,.22)}
body[data-route="settings"] .settings-shell{gap:18px}
body[data-route="settings"] .settings-panel[hidden]{display:none !important}
body[data-route="settings"] .settings-section{background:rgba(255,255,255,.92);border:1px solid rgba(148,163,184,.16);border-radius:20px;padding:18px 18px 16px;box-shadow:0 8px 22px rgba(15,23,42,.04)}
body[data-route="settings"] .settings-section-head{margin-bottom:14px;padding-bottom:12px;border-bottom:1px dashed rgba(148,163,184,.2)}
body[data-route="settings"] .settings-section-title{font-size:18px}
body[data-route="settings"] .settings-section-desc{font-size:13px;line-height:1.55}
body[data-route="records"] #dashboardGrid{display:none !important}
body[data-route="analysis"] #primaryStack, body[data-route="analysis"] #secondaryStack, body[data-route="analysis"] #panelMacro{display:none !important}
body[data-route="macro"] #primaryStack, body[data-route="macro"] #secondaryStack, body[data-route="macro"] #panelMarketModules, body[data-route="macro"] #panelBacktest, body[data-route="macro"] #panelAnalysis{display:none !important}
@media (max-width:900px){.page-nav{padding:12px 16px 0}.page-link{padding:10px 14px;font-size:12px}body[data-route="settings"] #settingsDialog[open]{width:min(100vw - 16px, 1320px)}body[data-route="settings"] #settingsDialog .dialog-head,body[data-route="settings"] #settingsDialog .dialog-body{padding-left:16px;padding-right:16px}body[data-route="settings"] .settings-tabs{gap:8px}body[data-route="settings"] .settings-tab{flex:1 1 calc(50% - 8px);justify-content:center;text-align:center}}

.freshness-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.freshness-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid rgba(148,163,184,.2);background:rgba(241,245,249,.82);color:var(--muted);font-size:12px;font-weight:700}
.freshness-chip.is-fresh{background:rgba(239,246,255,.9);color:#1d4ed8;border-color:rgba(96,165,250,.24)}
.freshness-chip.is-stale{background:rgba(255,247,237,.92);color:#b45309;border-color:rgba(251,146,60,.28)}
.suggestion-pill-stack{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.diag-priority{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border:1px solid var(--line);border-radius:18px;padding:14px 16px;background:rgba(255,255,255,.92);margin-bottom:14px}
.diag-priority.warn{border-color:rgba(245,158,11,.24);background:rgba(255,250,235,.86)}
.diag-priority.error{border-color:rgba(239,68,68,.24);background:rgba(254,242,242,.84)}
.diag-priority.ok{border-color:rgba(34,197,94,.2);background:rgba(240,253,244,.82)}
.diag-priority-label{font-size:12px;color:var(--muted);margin-bottom:4px}
.diag-impact{font-size:12px;color:var(--muted);line-height:1.6;min-width:160px;text-align:right}
body[data-route="home"] #panelDiagnostics .diag-item:nth-child(n+4){display:none}
body[data-route="home"] #panelDiagnostics{content-visibility:visible;contain-intrinsic-size:auto}
.suggestion-details{margin-top:6px;border-top:1px dashed rgba(148,163,184,.24);padding-top:8px}
.suggestion-details summary{cursor:pointer;color:var(--muted);font-weight:700;font-size:12px}
.suggestion-factor-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.diag-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:14px}
.diag-card{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(255,255,255,.88);display:grid;gap:6px}
.diag-card span,.diag-card small{color:var(--muted);font-size:12px;line-height:1.45}
.diag-card strong{font-size:22px;letter-spacing:-.03em}
.diag-list{display:grid;gap:10px}
.diag-item{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(255,255,255,.86);display:grid;gap:6px}
.diag-item.warn{border-color:rgba(245,158,11,.28);background:rgba(255,250,235,.82)}
.diag-item.error{border-color:rgba(239,68,68,.24);background:rgba(254,242,242,.82)}
.diag-item strong{font-size:13px}
.diag-item span{color:var(--muted);font-size:12px;line-height:1.5}
.timeline-dot{width:12px;height:12px;border-radius:999px;background:linear-gradient(180deg,#2563eb,#1d4ed8);margin-top:6px;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.timeline-body{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(255,255,255,.88);display:grid;gap:6px}
.timeline-head{display:flex;justify-content:space-between;gap:12px;align-items:center}
.timeline-head strong{font-size:14px}
.timeline-head span,.timeline-copy{color:var(--muted);font-size:12px;line-height:1.5}
#diagnosticsPanel,#timelinePanel{min-height:0}
#panelDiagnostics{content-visibility:visible;contain-intrinsic-size:auto}
@media (max-width:900px){
.hero-panel{grid-template-columns:1fr;gap:18px}
.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
.toolbar .btn{width:100%;justify-content:center}
.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.suggestion-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.suggestion-actions .btn{width:100%;justify-content:center}
.diag-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
.toolbar{grid-template-columns:1fr}
.metric-grid,.diag-grid{grid-template-columns:1fr}
.timeline-head{flex-direction:column;align-items:flex-start}
}

@media (max-width:900px){.diag-priority{flex-direction:column}.diag-impact{text-align:left;min-width:0}}

.mini-action-btn.danger{ color:#b42318; border-color:rgba(239,68,68,0.24); background:rgba(254,242,242,0.9); }
.empty-state.compact{ padding:14px 16px; min-height:0; border-style:dashed; }

body[data-route="home"] #panelDiagnostics{content-visibility:visible;contain-intrinsic-size:auto;min-height:260px;}
body[data-route="home"] #dashboardGrid{min-height:980px;}
body[data-route="home"] #panelHomeMore{content-visibility:visible;contain-intrinsic-size:auto;min-height:72px;}
@media (max-width:1119px){.home-masonry{grid-template-columns:repeat(2,minmax(0,1fr));min-height:0}body[data-route="home"] #dashboardGrid{min-height:0}body[data-route="home"] #homeMasonry > #panelSuggestions{grid-column:1 / -1}body[data-route="home"] #homeMasonry > #panelSummary,body[data-route="home"] #homeMasonry > #panelCash,body[data-route="home"] #homeMasonry > #panelAssetType{grid-column:span 1}body[data-route="home"] #panelSuggestions .suggestion-list{grid-template-columns:1fr}body[data-route="home"] .home-more-stack{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-route="home"] .home-more-stack > #panelFx{grid-column:1 / -1}body[data-route="home"] .home-more-stack > #panelHealth,body[data-route="home"] .home-more-stack > #panelDiagnostics{grid-column:span 1}}
@media (max-width:767px){body[data-route="home"] .home-masonry{grid-template-columns:1fr}body[data-route="home"] #homeMasonry > #panelSuggestions,body[data-route="home"] #homeMasonry > #panelSummary,body[data-route="home"] #homeMasonry > #panelCash,body[data-route="home"] #homeMasonry > #panelAssetType{grid-column:1 / -1}body[data-route="home"] .home-more-stack{grid-template-columns:1fr}body[data-route="home"] .home-more-stack > #panelHealth,body[data-route="home"] .home-more-stack > #panelDiagnostics{grid-column:1 / -1}}

#panelAssets{min-height:420px;}
#panelAssets .panel-shell-inner{min-height:380px;}
#panelAssets .donut-layout{min-height:280px;align-items:center;}
body[data-route="home"] #panelDiagnostics .panel-shell-inner,
body[data-route="home"] #panelSuggestions .suggestion-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch;}
body[data-route="home"] #panelSuggestions .suggestion-card{min-height:320px;display:flex;flex-direction:column;}
.kpi-value,.metric-value,.money-value{font-variant-numeric:tabular-nums;}

.trade-filters-meta-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.trade-pagination-inline{display:flex;align-items:center;gap:8px;}
@media (max-width: 760px){
.trade-filters-meta-right{justify-content:flex-start;}
}

.auth-inline-hint{
font-size:12px;
color:#dbeafe;
max-width:260px;
line-height:1.4;
}
.auth-inline-hint[data-tone="green"]{ color:#dcfce7; }
.auth-inline-hint[data-tone="orange"]{ color:#fde68a; }
.read-only-mode .auth-disabled-control{
opacity:.55;
cursor:not-allowed !important;
}
.auth-dialog::backdrop{
background:rgba(15,23,42,.45);
}
.auth-dialog .hint{
color:#64748b;
}

.kpi-grid-neo{gap:14px}
.kpi-neo-card{min-height:142px;padding:18px;border-radius:24px;background:#fff;box-shadow:0 14px 28px rgba(15,23,42,.06)}
.kpi-neo-card::before{top:-28px;right:-28px;width:120px;height:120px;background:radial-gradient(circle, rgba(37,99,235,.12), rgba(37,99,235,0))}
.kpi-neo-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.kpi-neo-icon{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(37,99,235,.08);font-size:18px}
.kpi-neo-copy{display:grid;gap:8px;min-height:0}
.kpi-neo-foot{font-size:12px;color:var(--muted)}
#panelPortfolioHub{padding:18px 18px 20px;background:#fff;border-color:#dbe5f0;box-shadow:0 16px 34px rgba(15,23,42,.08)}
body:not([data-route="home"]) #panelPortfolioHub{display:none!important}
.portfolio-hub{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr);gap:16px;align-items:start}
.portfolio-hub-main,.portfolio-hub-side{display:grid;gap:16px}
.portfolio-hub-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.hub-stat-card{border:1px solid #dbe5f0;border-radius:18px;padding:16px;background:#fff;display:grid;gap:8px;box-shadow:0 10px 20px rgba(15,23,42,.04)}
.hub-stat-card span{font-size:12px;color:var(--muted)}
.hub-stat-card strong{font-size:30px;line-height:1.05;letter-spacing:-.03em}
.hub-table-wrap,.hub-side-card{border:1px solid #dbe5f0;border-radius:20px;background:#fff;padding:16px;box-shadow:0 10px 20px rgba(15,23,42,.04)}
.hub-table-head,.hub-side-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.hub-table-head span,.hub-side-head span{font-size:12px;color:var(--muted)}
.hub-table-scroll{overflow:auto}
.hub-holdings-table{width:100%;border-collapse:collapse;min-width:760px}
.hub-holdings-table th,.hub-holdings-table td{padding:12px 10px;border-bottom:1px solid rgba(219,229,240,.9);text-align:left;font-size:13px;vertical-align:middle;background:#fff}
.hub-holdings-table th{font-size:12px;color:var(--muted);font-weight:700;background:#f6f9fc}
.hub-symbol{font-weight:800;color:var(--text)}
.hub-sub{font-size:12px;color:var(--muted);margin-top:3px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-donut-layout{display:grid;gap:14px}
.hub-donut{width:220px;height:220px;border-radius:50%;position:relative;margin:0 auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.65),0 8px 20px rgba(15,23,42,.06)}
.hub-donut::before{content:"";position:absolute;inset:42px;background:#fff;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(215,227,240,.85)}
.hub-donut-center{position:absolute;inset:0;display:grid;place-items:center;text-align:center;z-index:1;padding:0 64px;pointer-events:none}
.hub-donut-center span{font-size:13px;color:var(--muted);font-weight:700;background:rgba(255,255,255,.92);padding:4px 10px;border-radius:999px;box-shadow:0 1px 2px rgba(15,23,42,.06)}
.hub-legend{display:grid;gap:10px}
.hub-legend-item{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;font-size:13px}
.hub-legend-swatch{width:12px;height:12px;border-radius:999px}
.section-head-compact{min-height:0;margin-bottom:12px}
@media (max-width:1100px){
.portfolio-hub{grid-template-columns:1fr}
.portfolio-hub-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
.portfolio-hub-stats{grid-template-columns:1fr}
.hub-donut{width:190px;height:190px}
.hub-holdings-table{min-width:640px}
}

@supports (content-visibility: auto) {
#panelAssets,
#panelTrades,
#panelAnalysis,
#panelMacro,
#panelDiagnostics,
#panelMarketModules,
#panelBacktest,
#primaryStack > .card,
#secondaryStack > .card,
#homeMasonry > .card,
#homeMoreStack > .card {
content-visibility: auto;
contain-intrinsic-size: 560px;
}
}

#panelAssets,
#panelTrades,
#panelAnalysis,
#panelMacro,
#panelDiagnostics,
#panelMarketModules,
#panelBacktest,
#primaryStack > .card,
#secondaryStack > .card,
#homeMasonry > .card,
#homeMoreStack > .card {
contain: layout style paint;
}

#panelBacktest[hidden]{display:none !important}

.analysis-compare-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:12px}.analysis-compare-card{border:1px solid rgba(123,97,255,.15);border-radius:16px;padding:14px;background:rgba(123,97,255,.04)}

:root{
--bg:#eef4fb;
--bg-2:#e4edf8;
--card:rgba(255,255,255,.94);
--card-strong:#ffffff;
--text:#0f2740;
--muted:#62778e;
--line:#d7e2ee;
--navy:#0f2740;
--navy-2:#1e4672;
--blue:#2563eb;
--teal:#0f766e;
--green:#16a34a;
--orange:#f59e0b;
--red:#dc2626;
--purple:#7c3aed;
--shadow:0 18px 44px rgba(15,23,42,.08);
--radius:24px;
--radius-sm:16px;
}

body{
background:
radial-gradient(circle at 0% 0%, rgba(37,99,235,.11), transparent 26%),
radial-gradient(circle at 100% 0%, rgba(15,118,110,.09), transparent 24%),
linear-gradient(180deg, #f6faff 0%, #eef4fb 38%, #edf2f8 100%);
color:var(--text);
}

.hero{padding-top:18px}
.hero-panel{
background:
linear-gradient(145deg, rgba(11,27,47,.96), rgba(20,56,92,.96)),
radial-gradient(circle at top right, rgba(96,165,250,.22), transparent 38%);
border:1px solid rgba(255,255,255,.10);
box-shadow:0 28px 60px rgba(9,19,34,.24);
min-height:280px;
gap:20px;
}
.hero-panel::before{
content:"";
position:absolute;
inset:0;
background:
linear-gradient(135deg, rgba(255,255,255,.04), transparent 26%),
linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
linear-gradient(180deg, rgba(255,255,255,.03) 1px, transparent 1px);
background-size:auto, 26px 26px, 26px 26px;
pointer-events:none;
opacity:.55;
}
.hero-panel::after{
width:260px;
height:260px;
right:-110px;
bottom:-110px;
background:radial-gradient(circle, rgba(125,211,252,.20), rgba(255,255,255,0));
}
.hero-copy{display:flex;flex-direction:column;justify-content:space-between;gap:16px}
.eyebrow{
background:rgba(255,255,255,.06);
border-color:rgba(255,255,255,.14);
color:rgba(255,255,255,.86);
letter-spacing:.02em;
}
#heroTitle{text-shadow:0 8px 28px rgba(2,6,23,.18)}
.hero p{
color:rgba(241,245,249,.84);
max-width:760px;
font-size:14px;
}
.hero-status{
display:flex;
flex-wrap:wrap;
gap:10px;
align-items:center;
}

.toolbar{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:12px;
align-content:start;
justify-content:stretch;
}
.toolbar .btn,
.toolbar .auth-inline-hint,
.toolbar .pill{width:100%}
.toolbar .btn{
min-width:0;
justify-content:center;
min-height:48px;
border-radius:18px;
font-weight:700;
box-shadow:0 12px 28px rgba(2,6,23,.14);
}
.btn-secondary{
background:linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
border-color:rgba(255,255,255,.14);
color:#fff;
}
.btn-secondary:hover{border-color:rgba(255,255,255,.22)}
.btn-soft{
background:linear-gradient(180deg, rgba(37,99,235,.10), rgba(37,99,235,.06));
border-color:rgba(37,99,235,.16);
color:#1d4ed8;
}
.btn-ghost{
background:linear-gradient(180deg,#fff,#f7fbff);
border-color:rgba(148,163,184,.22);
}
.btn-danger{
background:linear-gradient(180deg, rgba(220,38,38,.08), rgba(220,38,38,.04));
}

.auth-inline-hint{
max-width:none;
padding:12px 14px;
border-radius:18px;
background:rgba(255,255,255,.07);
border:1px solid rgba(255,255,255,.10);
color:#e2e8f0;
box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.auth-inline-hint[data-tone="orange"]{color:#fde68a}
.auth-inline-hint[data-tone="green"]{color:#dcfce7}

.page-nav{
gap:10px;
padding-top:14px;
}
.page-link{
background:rgba(255,255,255,.72);
border:1px solid rgba(255,255,255,.72);
color:#123455;
box-shadow:0 8px 24px rgba(15,23,42,.06);
backdrop-filter:blur(10px);
}
.page-link:hover{
background:rgba(255,255,255,.9);
box-shadow:0 12px 28px rgba(15,23,42,.09);
}
.page-link[aria-current="page"]{
background:linear-gradient(135deg, rgba(17,24,39,.96), rgba(29,78,216,.92));
border-color:rgba(59,130,246,.38);
box-shadow:0 14px 34px rgba(29,78,216,.18);
}

main{gap:16px}
.card{
border-radius:24px;
border:1px solid rgba(255,255,255,.78);
background:
linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,255,.92));
box-shadow:
0 22px 44px rgba(15,23,42,.06),
inset 0 1px 0 rgba(255,255,255,.72);
padding:18px;
}
.card::before{
content:"";
position:absolute;
inset:0;
border-radius:inherit;
pointer-events:none;
background:linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0));
opacity:.65;
}
.card > *{position:relative;z-index:1}
.table-section{overflow:hidden}
.section-head{
min-height:60px;
padding-bottom:12px;
margin-bottom:2px;
border-bottom:1px solid rgba(215,226,238,.72);
}
.section-head h2{
margin:0;
font-size:18px;
letter-spacing:-.02em;
}
.section-head p{
margin:6px 0 0;
color:var(--muted);
font-size:13px;
line-height:1.6;
}
.section-tools{gap:10px}

.kpi-grid{gap:14px}
.kpi-card,
.kpi-neo-card,
.hub-stat-card,
.metric-box,
.diag-card,
.diag-item,
.summary-metric-card,
.summary-list-card,
.summary-action-card,
.hub-table-wrap,
.hub-side-card,
.trigger-card,
.suggestion-card{
border-color:rgba(219,229,240,.9);
box-shadow:0 12px 28px rgba(15,23,42,.05);
}
.kpi-card,
.kpi-neo-card{
border-radius:22px;
background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.94));
}
.kpi-value{font-size:clamp(24px,2vw,34px)}
.kpi-label{font-size:12px;letter-spacing:.02em;text-transform:uppercase}
.kpi-sub{font-size:12px}

.portfolio-hub{gap:18px}
#panelPortfolioHub{
border-radius:28px;
padding:20px;
background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.95));
}
.hub-stat-card strong{font-size:32px}
.hub-table-wrap,.hub-side-card{border-radius:22px}

.pill,
.status-pill,
.freshness-chip,
.kpi-source-badge{
border-radius:999px;
font-weight:700;
letter-spacing:.01em;
}
.pill-slate{
background:rgba(226,232,240,.72);
color:#475569;
}
.pill-blue{background:rgba(37,99,235,.10)}
.pill-green{background:rgba(22,163,74,.12)}
.pill-orange{background:rgba(245,158,11,.14)}
.pill-purple{background:rgba(124,58,237,.12)}

.suggestion-list{gap:14px}
.suggestion-card{
border-radius:20px;
padding:14px 14px 15px;
background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,252,255,.94));
}
.suggestion-top{align-items:center}
.suggestion-title{font-size:17px}
.suggestion-text{font-size:13px;line-height:1.6}
.suggestion-timing{
background:linear-gradient(180deg, rgba(37,99,235,.05), rgba(37,99,235,.02));
border-style:solid;
}

.bar-track{
height:18px;
background:linear-gradient(180deg, #f3f7fd, #edf3fb);
border-color:#d8e4f1;
box-shadow:inset 0 1px 3px rgba(15,23,42,.04);
}
.bar-fill{box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
.bar-target,.bar-marker{top:-2px;height:22px}

.table-wrap,
.rules-table-wrap{
border-radius:18px;
border-color:#dbe5f0;
box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
table,
.rules-table,
.hub-holdings-table{
background:rgba(255,255,255,.96);
}
th,
.rules-table th,
.hub-holdings-table th{
background:#f3f8fd !important;
color:#5f7389;
font-weight:800;
letter-spacing:.02em;
}
td,
.rules-table td,
.hub-holdings-table td{
border-bottom-color:rgba(226,232,240,.86);
}
tbody tr:hover{background:rgba(248,251,255,.95)}

input,
select,
textarea{
border-radius:14px;
border:1px solid #d3ddeb;
background:rgba(255,255,255,.9);
color:var(--text);
box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
input:focus,
select:focus,
textarea:focus{
outline:none;
border-color:rgba(59,130,246,.42);
box-shadow:0 0 0 4px rgba(59,130,246,.10);
}
.field label{
font-size:12px;
font-weight:800;
color:#3b536c;
letter-spacing:.02em;
}
.hint{color:var(--muted)}

.empty-state{
border:1px dashed #d6e1ed;
border-radius:20px;
background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,248,252,.92));
color:#52657b;
}
.state-message.is-warning{
background:linear-gradient(180deg, rgba(255,251,235,.98), rgba(255,247,237,.96));
}
.state-message.is-error{
background:linear-gradient(180deg, rgba(254,242,242,.96), rgba(254,242,242,.98));
}

#panelMacro,
#panelAnalysis,
#panelDiagnostics,
#panelAssets,
#panelTrades,
#panelGridCoverage,
#panelTriggerMatrix,
#panelMarketModules > .card{
border-radius:26px;
}
.analysis-board,
#macroRiskBoard,
#diagnosticsPanel,
#usStrategyPanel,
#usReviewPanel,
#gridCoverage,
#triggerMatrix{
min-height:0;
}

.page-link,
.btn,
.card,
.kpi-card,
.kpi-neo-card,
.suggestion-card,
.hub-stat-card,
.dialog-head,
.dialog-body,
.table-wrap,
.rules-table-wrap{transition:all .18s ease}

.dialog-head{
background:linear-gradient(145deg, rgba(11,27,47,.98), rgba(30,70,114,.96));
}
.dialog-body{
background:linear-gradient(180deg, #f8fbff, #f2f7fd);
}
dialog{
border-radius:28px;
box-shadow:0 34px 80px rgba(2,6,23,.24);
border:1px solid rgba(255,255,255,.5);
}
dialog::backdrop{background:rgba(15,23,42,.52);backdrop-filter:blur(4px)}

@media (max-width:1200px){
.hero-panel{grid-template-columns:1fr}
.toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
.page-nav{gap:8px}
.card{padding:16px}
}
@media (max-width:640px){
.toolbar{grid-template-columns:1fr}
.page-link{flex:1 1 calc(50% - 8px)}
.section-head{gap:12px}
}

:root{
--surface-soft:rgba(255,255,255,.82);
--surface-strong:rgba(255,255,255,.96);
--line-soft:rgba(215,227,240,.78);
--shadow-soft:0 12px 30px rgba(15,23,42,.06);
--shadow-strong:0 20px 50px rgba(15,23,42,.10);
}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;}
body{letter-spacing:.002em;}

.page-nav{
position:sticky;
top:0;
padding-top:12px;
padding-bottom:4px;
z-index:12;
backdrop-filter:blur(14px);
}
.page-nav::before{
content:"";
position:absolute;
inset:4px 24px 0;
border-radius:22px;
background:linear-gradient(180deg, rgba(248,251,255,.92), rgba(243,247,253,.86));
border:1px solid rgba(219,229,240,.72);
box-shadow:0 10px 30px rgba(15,23,42,.05);
z-index:-1;
}
.page-link{
min-height:40px;
padding:10px 16px;
font-size:12px;
letter-spacing:.02em;
box-shadow:none;
}
.page-link[aria-current="page"]{
box-shadow:0 12px 26px rgba(37,99,235,.18);
}

.hero{padding-top:14px;}
.hero-panel{
min-height:270px;
border-radius:30px;
background:
radial-gradient(circle at 85% 18%, rgba(255,255,255,.18), transparent 22%),
radial-gradient(circle at 12% 0%, rgba(34,197,94,.10), transparent 22%),
linear-gradient(135deg, rgba(9,23,44,.98), rgba(22,56,98,.96));
box-shadow:0 24px 54px rgba(15,23,42,.18);
}
.hero-copy{min-height:180px;}
.hero p{font-size:13px;max-width:700px;color:rgba(255,255,255,.78);}
.eyebrow{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.18);}
.toolbar{gap:8px;align-content:flex-start;}
.toolbar .btn{
min-width:124px;
min-height:42px;
padding-inline:15px;
border-radius:16px;
}
.btn-primary{box-shadow:0 10px 24px rgba(255,255,255,.12);}
.btn-secondary{background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08));}

.card{
padding:16px 16px 17px;
border-radius:22px;
border-color:var(--line-soft);
background:linear-gradient(180deg, var(--surface-strong), rgba(248,251,255,.94));
box-shadow:var(--shadow-soft);
}
.card:hover{box-shadow:0 16px 38px rgba(15,23,42,.08);}
.section-head{
min-height:56px;
margin-bottom:10px;
padding-bottom:10px;
border-bottom:1px solid rgba(215,227,240,.68);
}
.section-head h2{font-size:17px;}
.section-head p{font-size:12px;line-height:1.55;max-width:68ch;}
.section-tools{gap:8px;}
.pill,.status-pill,.freshness-chip{font-size:11px;min-height:28px;padding:6px 10px;}

.kpi-grid{gap:12px;}
.kpi-card,.kpi-neo-card{min-height:104px;}
.kpi-card,.kpi-neo-card,.hub-stat-card{
background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,252,255,.93));
}
.kpi-label,.hub-stat-card span{font-size:11px;letter-spacing:.05em;}
.kpi-value{font-size:clamp(22px,1.8vw,31px);}
.kpi-sub{gap:6px;}

.suggestion-card{
padding:15px;
gap:12px;
}
.suggestion-title{font-size:16px;}
.suggestion-text{font-size:12.5px;line-height:1.62;}
.metric-grid{gap:10px;}
.metric-box{padding:9px 10px;border-radius:14px;min-height:60px;}
.metric-box strong{font-size:15px;}

.table-wrap,.rules-table-wrap,.hub-table-scroll{
background:linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.70));
border:1px solid rgba(219,229,240,.86);
box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.table-wrap table,
.rules-table,
.hub-holdings-table{
min-width:1040px;
}
thead th,
.rules-table th,
.hub-holdings-table th{
position:sticky;
top:0;
z-index:1;
}
table th,
.rules-table th,
.hub-holdings-table th{
padding:10px 12px;
font-size:11px;
letter-spacing:.05em;
text-transform:uppercase;
}
table td,
.rules-table td,
.hub-holdings-table td{
padding:11px 12px;
font-size:12.5px;
}
tbody tr:hover td,
.hub-holdings-table tbody tr:hover td,
.rules-table tbody tr:hover td{
background:rgba(244,249,255,.94);
}

input,select,textarea{
min-height:42px;
border-radius:15px;
background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.94));
}
.dialog-head{
background:linear-gradient(145deg, rgba(7,18,34,.98), rgba(24,59,102,.96));
}
.dialog-body{background:linear-gradient(180deg, #fbfdff, #f3f7fd);}

.auth-inline-hint{
max-width:420px;
padding:8px 12px;
border-radius:14px;
background:rgba(15,23,42,.18);
border:1px solid rgba(255,255,255,.12);
backdrop-filter:blur(6px);
}
.read-only-mode .alert-strip,
.read-only-mode .empty-state,
.read-only-mode .state-message.is-info{
background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,249,253,.94));
border-color:rgba(196,207,222,.85);
box-shadow:0 12px 26px rgba(15,23,42,.05);
}
.read-only-mode .empty-state{
min-height:196px;
border-style:solid;
}
.read-only-mode .empty-state strong,
.read-only-mode .state-message strong{font-size:16px;color:#18314b;}
.read-only-mode .empty-state-note{font-size:12px;color:#607289;line-height:1.65;}
.read-only-mode .card{
background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,253,.95));
}

#panelPortfolioHub,
#panelAssets,
#panelTrades,
#panelAnalysis,
#panelMacro,
#panelDiagnostics,
#panelHomeMore{
border-radius:24px;
}
#panelPortfolioHub{padding:18px 18px 20px;}
.hub-table-wrap,.hub-side-card{padding:15px;border-radius:20px;}
.hub-stat-card strong{font-size:28px;}
.hub-sub{max-width:260px;}

@media (max-width:900px){
.page-nav::before{inset:4px 16px 0;}
.page-link{font-size:11px;min-height:38px;padding:9px 12px;}
.card{padding:15px;}
.hero-panel{min-height:auto;border-radius:24px;}
.auth-inline-hint{max-width:none;}
}
@media (max-width:640px){
.page-nav{padding-top:10px;}
.page-nav::before{border-radius:18px;}
.toolbar .btn{flex:1 1 calc(50% - 8px);}
.section-head h2{font-size:16px;}
.hub-table-wrap,.hub-side-card{padding:13px;}
}

:root{
--surface-0:#f4f7fb;
--surface-1:#ffffff;
--surface-2:#f8fbff;
--surface-line:rgba(210,223,238,.92);
--shadow-soft:0 14px 34px rgba(15,23,42,.07);
--shadow-card:0 10px 28px rgba(15,23,42,.05);
}
main{max-width:1560px}
.page-nav{
max-width:1560px;
gap:10px;
padding-top:14px;
}
.page-link{
min-height:42px;
padding:10px 16px;
border-radius:16px;
font-weight:800;
}
.hero{padding-top:10px}
.hero-panel{
min-height:240px;
border-radius:30px;
padding:26px 28px;
box-shadow:0 20px 44px rgba(15,23,42,.12);
}
.hero-copy h1{font-size:clamp(28px,3vw,52px);line-height:1.02}
.hero-copy p{max-width:780px}
.toolbar{gap:12px}
.toolbar .btn{min-height:44px;border-radius:16px}
.card,
.hub-table-wrap,
.hub-side-card,
.hub-stat-card,
.kpi-card,
.kpi-neo-card,
.trigger-card,
.suggestion-card,
.diag-card,
.diag-item{
border-color:var(--surface-line);
box-shadow:var(--shadow-card);
}
#panelPortfolioHub{
overflow:hidden;
border-color:var(--surface-line);
box-shadow:var(--shadow-soft);
}
.portfolio-hub{
grid-template-columns:minmax(0,1.6fr) minmax(340px,.92fr);
gap:20px;
align-items:start;
}
.portfolio-hub-main,
.portfolio-hub-side,
.hub-table-wrap,
.hub-side-card,
.hub-donut-layout,
.hub-legend,
.hub-table-scroll{
min-width:0;
}
.portfolio-hub-side{
align-content:start;
}
.hub-stat-card{
padding:18px;
border-radius:20px;
min-height:116px;
}
.hub-stat-card span{
text-transform:uppercase;
letter-spacing:.04em;
font-size:11px;
}
.hub-stat-card strong{
font-size:clamp(28px,2.25vw,40px);
}
.hub-table-wrap,
.hub-side-card{
border-radius:24px;
padding:18px;
}
.hub-table-head strong,
.hub-side-head strong{
font-size:15px;
}
.hub-table-scroll{
overflow:auto hidden;
scrollbar-gutter:stable;
}
.hub-holdings-table{
min-width:720px;
}
.hub-holdings-table th,
.hub-holdings-table td{
padding:14px 12px;
}
.hub-holdings-table thead th{
position:sticky;
top:0;
z-index:1;
}
.hub-donut-layout{
justify-items:center;
align-items:start;
gap:16px;
}
.hub-donut{
width:min(100%,220px);
height:auto;
aspect-ratio:1 / 1;
flex:0 0 auto;
}
.hub-donut-center{
padding:0 54px;
}
.hub-legend{
width:100%;
max-width:340px;
}
.hub-legend-item{
grid-template-columns:auto minmax(0,1fr) auto;
min-width:0;
column-gap:12px;
}
.hub-legend-item > span:nth-child(2){
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.hub-side-card{
overflow:hidden;
}
.section-head h2{
letter-spacing:-.02em;
}
@media (max-width:1360px){
.portfolio-hub{grid-template-columns:1fr}
.hub-legend{max-width:none}
}
@media (max-width:900px){
.hero-panel{padding:22px 20px;border-radius:26px}
.page-link{min-height:40px;padding:9px 14px}
.portfolio-hub{gap:16px}
.hub-holdings-table{min-width:640px}
}

.page-nav{
position:relative;
top:auto;
display:flex;
align-items:center;
justify-content:flex-start;
flex-wrap:wrap;
width:max-content;
max-width:min(100%, 1120px);
margin:14px auto 0;
padding:10px;
gap:8px;
border-radius:22px;
background:linear-gradient(180deg, rgba(250,252,255,.96), rgba(244,248,253,.94));
border:1px solid rgba(218,229,242,.9);
box-shadow:0 14px 34px rgba(15,23,42,.08);
backdrop-filter:blur(10px);
}
.page-nav::before{display:none !important;}
.page-link{
min-height:40px;
padding:10px 18px;
border-radius:14px;
background:rgba(255,255,255,.72);
border:1px solid rgba(214,226,239,.92);
color:var(--navy);
font-size:13px;
font-weight:800;
line-height:1;
box-shadow:none;
}
.page-link:hover{
transform:translateY(-1px);
background:#fff;
border-color:rgba(59,130,246,.26);
box-shadow:0 8px 18px rgba(37,99,235,.10);
}
.page-link[aria-current="page"]{
background:linear-gradient(135deg, rgba(37,99,235,.98), rgba(29,78,216,.96));
border-color:rgba(37,99,235,.56);
color:#fff;
box-shadow:0 12px 26px rgba(37,99,235,.22);
}
@media (max-width: 1100px){
.page-nav{
width:calc(100% - 24px);
max-width:none;
justify-content:center;
margin-top:12px;
}
}
@media (max-width: 680px){
.page-nav{
padding:8px;
gap:8px;
border-radius:18px;
}
.page-link{
flex:1 1 calc(50% - 8px);
justify-content:center;
min-height:38px;
padding:9px 12px;
font-size:12px;
}
}

:root{
--font:"Inter","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
--font-display:"Inter","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
body{
font-family:var(--font);
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
text-rendering:optimizeLegibility;
}
h1,
.section-head h2,
.analysis-symbol,
.analysis-topline-action,
.market-hero-title,
.dialog-head h3,
.hub-head h3,
.hub-table-head strong,
.hub-side-head strong,
.settings-section-title{
font-family:var(--font-display);
}
h1{
font-size:clamp(26px,3.4vw,38px);
font-weight:800;
letter-spacing:-.03em;
}
.hero p{
font-size:13px;
line-height:1.62;
color:rgba(255,255,255,.76);
}
.section-head h2{
font-size:18px;
font-weight:800;
letter-spacing:-.02em;
}
.section-head p,
.summary-line,
.subtle,
.asset-note,
.analysis-sub,
.analysis-topline p,
.market-hero-copy,
.vix-sub,
.vix-item p,
.macro-impact-list,
.trigger-sub,
.trigger-note-line,
.suggestion-text,
.rules-head p,
.settings-section-desc,
.field label,
.hint{
font-size:12px;
line-height:1.62;
}
.kpi-label,
.hub-stat-card span,
.summary-metric-card span,
.market-index-card span,
.analysis-kpi span,
.vix-scale,
.freshness-chip,
.status-pill,
.pill{
letter-spacing:.03em;
}
.kpi-value,
.summary-metric-card strong,
.cash-box strong,
.hub-stat-card strong,
.analysis-kpi strong,
.market-index-card strong,
.vix-value,
.vix-summary strong,
.price-main,
.backtest-card strong{
font-variant-numeric:tabular-nums;
font-feature-settings:"tnum" 1;
font-family:var(--font-display);
letter-spacing:-.035em;
}
.kpi-value{font-size:clamp(20px,1.7vw,28px);font-weight:780;}
.summary-metric-card strong{font-size:20px;font-weight:780;}
.cash-box strong{font-size:20px;font-weight:780;}
.hub-stat-card strong{font-size:28px;font-weight:780;}
.analysis-topline-action{font-size:20px;font-weight:800;line-height:1.18;}
.analysis-kpi strong{font-size:28px;font-weight:780;}
.market-index-card strong{font-size:18px;font-weight:780;}
.vix-value{font-size:30px;font-weight:800;}
.vix-summary strong{font-size:24px;font-weight:800;}
.price-main{font-size:17px;font-weight:780;}
.suggestion-title,
.analysis-decision-title,
.analysis-panel-title,
.trigger-title strong,
.quick-card h3,
.rules-card strong,
.market-reason-item strong,
.analysis-check strong,
.analysis-news-head strong{
font-weight:780;
letter-spacing:-.015em;
}
thead th,
.hub-holdings-table th,
.rules-table th{
font-size:11px;
letter-spacing:.04em;
font-weight:800;
}
tbody td,
.hub-holdings-table td,
.rules-table td{
font-size:13px;
line-height:1.55;
}
.asset-symbol,
.hub-symbol,
.analysis-symbol{
font-weight:800;
letter-spacing:-.02em;
}
.hub-sub,
.asset-note,
.analysis-sub{
font-size:12px;
}
.legend-item,
.hub-legend-item,
.bar-head,
.trade-pagination-meta,
.trade-pagination-page,
.market-mini,
.analysis-foot,
.analysis-news-meta,
.trade-filters-meta{
font-size:12px;
}
.btn,
.page-link,
.settings-tab,
.mini-btn,
.mini-action-btn,
.analysis-llm-btn{
font-weight:750;
}
@media (max-width:900px){
h1{font-size:clamp(24px,8vw,32px);}
.kpi-value{font-size:clamp(18px,6vw,25px);}
.hub-stat-card strong{font-size:24px;}
.analysis-topline-action{font-size:18px;}
}

.panel-title,.card h2,.card h3,.table-card h3,.holdings-card h3,.section-head h2,.section-head h3{letter-spacing:-.022em;font-weight:760;}
.kpi-label,.metric-box span,.summary-metric-card span,.table th,.table thead th,.data-table thead th{font-size:12px;letter-spacing:.01em;font-weight:700;}
.summary-metric-card strong,.metric-box strong,.donut-center strong{font-variant-numeric:tabular-nums lining-nums;letter-spacing:-.03em;font-weight:760;}
.pill-blue{background:rgba(37,99,235,.08);border-color:rgba(37,99,235,.14);color:#2258cf;}
.pill-green{background:rgba(22,163,74,.09);border-color:rgba(22,163,74,.16);color:#16703e;}
.pill-orange{background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.16);color:#9a5c00;}
.pill-red{background:rgba(220,38,38,.09);border-color:rgba(220,38,38,.16);color:#b42318;}
.pill-purple{background:rgba(124,58,237,.09);border-color:rgba(124,58,237,.14);color:#6d35da;}
.status-pill{font-weight:650;letter-spacing:0;}
.legend-item,.bar-head,.summary-list-item,.trigger-note-line,.suggestion-text{font-size:13px;}
input,select,textarea{font-weight:520;}
button.btn, .btn{font-weight:680;}

:root{
--radius-lg:28px;
--radius-card:22px;
--shadow-panel:0 20px 52px rgba(15,23,42,.08);
}

body{font-variant-numeric:tabular-nums lining-nums;}

.hero{
padding-top:14px;
padding-bottom:4px;
}
.hero-panel{
grid-template-columns:minmax(0,1.4fr) minmax(360px,.96fr);
min-height:252px;
gap:18px;
padding:24px 24px 18px;
border-radius:32px;
}
.hero-copy{
gap:14px;
min-height:0;
}
#heroTitle{
font-size:clamp(44px,5.4vw,78px);
line-height:.94;
letter-spacing:-.055em;
max-width:11ch;
}
.hero p{
margin-top:4px;
max-width:58ch;
font-size:14px;
line-height:1.55;
}
.hero-status{
gap:8px;
min-height:0;
}
.status-chip{
padding:7px 11px;
border-radius:14px;
font-size:12px;
background:rgba(255,255,255,.09);
border-color:rgba(255,255,255,.12);
box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.toolbar{
gap:10px;
align-self:stretch;
}
.toolbar .btn,
.toolbar .auth-inline-hint,
.toolbar .pill{
min-height:44px;
border-radius:16px;
}
.toolbar .btn{
padding:11px 14px;
font-size:14px;
letter-spacing:-.012em;
}
.auth-inline-hint{
padding:10px 13px;
min-height:0;
font-size:13px;
line-height:1.45;
}

.page-nav{
padding-top:10px;
padding-bottom:2px;
gap:8px;
}
.page-link{
padding:10px 15px;
min-height:42px;
border-radius:16px;
font-size:13px;
box-shadow:0 6px 18px rgba(15,23,42,.06);
}
.page-link[aria-current="page"]{
box-shadow:0 12px 28px rgba(29,78,216,.18);
}

main{
gap:14px;
}
.card{
padding:16px;
border-radius:26px;
box-shadow:var(--shadow-panel), inset 0 1px 0 rgba(255,255,255,.72);
}
.section-head{
min-height:54px;
padding-bottom:10px;
}
.section-head h2{
font-size:17px;
letter-spacing:-.025em;
}
.section-head p{
margin-top:5px;
font-size:12px;
line-height:1.55;
}

.kpi-grid,
.portfolio-hub-stats{
gap:10px;
}
.kpi-card,
.kpi-neo-card,
.hub-stat-card{
min-height:122px;
padding:16px 18px;
border-radius:20px;
}
.kpi-label,
.kpi-sub,
.hub-stat-card span,
.hub-stat-card small{
letter-spacing:.01em;
}
.kpi-value,
.hub-stat-card strong{
font-size:clamp(24px,2.1vw,44px);
line-height:1;
letter-spacing:-.045em;
}

.portfolio-hub{
gap:14px;
align-items:start;
}
.portfolio-hub-main,
.portfolio-hub-side{
gap:14px;
min-width:0;
}
.hub-table-wrap,
.hub-side-card{
border-radius:20px;
height:100%;
min-width:0;
}
.hub-side-card{
padding:18px 18px 16px;
}
.donut-layout{
align-items:center;
gap:18px;
}
.donut-box{
margin-inline:auto;
width:min(100%, 340px);
}
.donut-legend{
min-width:220px;
gap:10px;
}

.table-wrap,
.rules-table-wrap,
.hub-table-wrap{
border-radius:18px;
}
th,
.rules-table th,
.hub-holdings-table th{
font-size:11px;
letter-spacing:.03em;
}
.hub-holdings-table th,
.hub-holdings-table td{
padding-top:14px;
padding-bottom:14px;
}
.hub-holdings-table td strong{
font-weight:800;
}

.suggestion-card,
.analysis-card,
.market-hero{
border-radius:20px;
}
.analysis-card{
gap:12px;
padding:15px;
}
.analysis-card-head{
gap:10px;
}
.analysis-topline{
gap:10px;
padding:13px;
border-radius:16px;
}
.analysis-topline-action,
.market-hero-title{
font-size:clamp(18px,1.35vw,22px);
line-height:1.14;
letter-spacing:-.03em;
}
.analysis-topline p,
.market-hero-copy,
.analysis-copy,
.analysis-execution-copy{
font-size:12px;
line-height:1.58;
}
.analysis-topline-side{
gap:7px;
}
.analysis-summary-block{
padding:10px 11px;
border-radius:13px;
}
.analysis-score-chip,
.pill,
.status-pill,
.freshness-chip,
.kpi-source-badge,
.analysis-panel-title,
.analysis-summary-label{
letter-spacing:.01em;
}
.analysis-decision-title,
.analysis-panel-title{
font-size:15px;
}

input,
select,
textarea{
font-size:14px;
}
.field label{
font-size:11px;
}

@media (max-width:1320px){
.hero-panel{grid-template-columns:minmax(0,1fr) minmax(340px,.92fr)}
}
@media (max-width:1180px){
.hero-panel{grid-template-columns:1fr}
.toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
.hero-panel{padding:20px 18px 16px;min-height:auto}
#heroTitle{font-size:clamp(38px,8vw,60px)}
.page-link{flex:0 1 auto}
.portfolio-hub-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.donut-layout{flex-direction:column;align-items:flex-start}
.donut-box{width:min(100%,300px)}
}
@media (max-width:640px){
.page-nav{justify-content:flex-start}
.toolbar{grid-template-columns:1fr}
.page-link{flex:1 1 calc(50% - 8px)}
.portfolio-hub-stats{grid-template-columns:1fr}
}

:root{
--font-ui: Inter, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei UI", sans-serif;
--font-display: Inter, "SF Pro Display", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei UI", sans-serif;
--font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

html,body,button,input,select,textarea{
font-family:var(--font-ui);
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
text-rendering:optimizeLegibility;
}

body{
letter-spacing:.005em;
}

h1,h2,h3,h4,.section-head h2,#heroTitle,.market-hero-title,.panel-title,.analysis-title,.hub-title{
font-family:var(--font-display);
letter-spacing:-.028em;
}

#heroTitle{
font-weight:820;
line-height:1.02;
}

.hero p,
.section-head p,
.hub-copy,
.table-sub,
.analysis-copy,
.analysis-execution-copy,
.market-hero-copy,
.auth-inline-hint,
.empty-note,
.setting-help,
.settings-section p,
.card p{
line-height:1.68;
}

.page-nav{
padding-top:10px;
}

.page-link{
min-height:46px;
padding:0 18px;
font-size:15px;
font-weight:720;
letter-spacing:-.01em;
}

.toolbar .btn{
min-height:46px;
font-size:15px;
font-weight:760;
}

.toolbar .btn .icon,
.toolbar .btn .emoji{
font-size:15px;
}

.eyebrow{
font-size:12px;
font-weight:700;
}

.kpi-label,
.hub-stat-card span,
.market-index-card span,
.backtest-card span,
.diag-card span,
.diag-card small,
.table thead th,
.hub-table th,
.summary-metric-card span{
font-size:12px;
font-weight:700;
letter-spacing:.01em;
}

.kpi-value,
.hub-stat-card strong,
.metric-box strong,
.market-index-card strong,
.backtest-card strong,
.summary-metric-card strong,
.diag-card strong{
font-family:var(--font-display);
font-variant-numeric:tabular-nums lining-nums;
font-feature-settings:"tnum" 1, "lnum" 1;
letter-spacing:-.032em;
}

.kpi-value{font-size:clamp(22px,1.7vw,30px); font-weight:790;}
.hub-stat-card strong{font-size:clamp(24px,2vw,32px); font-weight:790; line-height:1.06;}
.metric-box strong{font-size:28px; font-weight:780;}
.summary-metric-card strong{font-size:20px; font-weight:760;}
.diag-card strong{font-size:20px; font-weight:770;}
.market-index-card strong,.backtest-card strong{font-size:19px; font-weight:770;}

.table,
.hub-table,
.records-table,
.settings-table{
font-variant-numeric:tabular-nums lining-nums;
font-feature-settings:"tnum" 1, "lnum" 1;
}

.table thead th,
.hub-table th{
text-transform:none;
color:#6b7f94;
}

.table tbody td,
.hub-table td{
font-size:14px;
line-height:1.55;
}

.table tbody td strong,
.hub-table td strong,
.asset-code,
.symbol-cell strong{
font-family:var(--font-display);
font-weight:760;
letter-spacing:-.015em;
}

.hub-table-wrap,
.hub-side-card{
padding:18px;
}

#panelPortfolioHub{
padding:22px;
}

.hub-copy{
max-width:760px;
color:var(--muted);
font-size:14px;
}

.pill,
.status-pill,
.freshness-chip,
.kpi-source-badge{
font-size:12px;
font-weight:760;
}

.analysis-card .pill,
.market-hero .pill,
.trigger-card .pill{
font-size:12px;
}

.analysis-title,
.market-hero-title{
font-weight:810;
}

@media (max-width: 1100px){
.hub-stat-card strong{font-size:28px;}
.kpi-value{font-size:26px;}
}

@media (max-width: 900px){
#heroTitle{font-size:46px;}
.page-link{min-height:44px; padding:0 16px; font-size:14px;}
.toolbar .btn{min-height:44px; font-size:14px;}
.hub-stat-card strong{font-size:26px;}
.kpi-value{font-size:24px;}
}

.portfolio-summary-card .section-head h2, .analysis-panel-title, .market-hero-title, .settings-section-title{font-weight:760;}
.table-wrap table{font-variant-numeric:tabular-nums lining-nums;}
.price-main, .metric-box strong, .trigger-metric-box strong, .analysis-metric strong{font-weight:730;}
.asset-note, .subtle, .analysis-copy, .trigger-note-line, .market-hero-copy, .macro-impact-list{letter-spacing:0; }
.page-nav{justify-content:flex-start;}
.page-nav::before{content:"";display:block;flex-basis:100%;height:0;}
@media (max-width:900px){.page-nav{gap:8px}.page-link{font-size:12px;padding:9px 14px}}

:root{
--shadow-soft:0 14px 30px rgba(15,23,42,.055);
--shadow-strong:0 24px 52px rgba(15,23,42,.085);
}

.hero{
padding-top:14px;
padding-bottom:8px;
}
.hero-panel{
min-height:236px;
padding:22px 24px;
gap:18px;
border-radius:28px;
box-shadow:0 26px 56px rgba(9,19,34,.20);
}
.hero-copy{
gap:12px;
}
#heroTitle{
font-size:clamp(28px,3.1vw,40px);
line-height:1.05;
letter-spacing:-.035em;
}
.hero p{
font-size:13px;
line-height:1.52;
max-width:690px;
opacity:.96;
}
.hero-status{
gap:8px;
margin-top:8px;
}
.hero-status .pill,
.hero-status .status-pill,
.hero-status .freshness-chip{
min-height:30px;
padding:6px 11px;
font-size:11.5px;
box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}

.toolbar{
grid-template-columns:repeat(2,minmax(148px,1fr));
align-self:start;
gap:10px;
}
.toolbar .btn,
.toolbar .auth-inline-hint,
.toolbar .pill{
width:100%;
}
.toolbar .btn{
min-height:44px;
padding:10px 14px;
border-radius:16px;
font-size:13px;
box-shadow:0 10px 20px rgba(2,6,23,.12);
}
.toolbar .btn-primary{
background:linear-gradient(180deg,#ffffff,#f1f6ff);
}
.toolbar .btn-ghost{
background:rgba(255,255,255,.82);
}
.toolbar .auth-inline-hint{
min-height:44px;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
font-size:12px;
line-height:1.4;
}

.page-nav{
width:fit-content;
max-width:calc(100% - 48px);
margin:0 auto;
padding:8px;
gap:8px;
border-radius:22px;
background:rgba(255,255,255,.56);
border:1px solid rgba(255,255,255,.74);
box-shadow:0 12px 28px rgba(15,23,42,.075);
backdrop-filter:blur(14px);
-webkit-backdrop-filter:blur(14px);
}
.page-link{
min-height:38px;
padding:10px 14px;
border-radius:14px;
font-size:12.5px;
font-weight:740;
letter-spacing:0;
box-shadow:none;
background:transparent;
border-color:transparent;
}
.page-link:hover{
transform:none;
background:rgba(15,39,64,.055);
border-color:rgba(148,163,184,.18);
box-shadow:none;
}
.page-link[aria-current="page"]{
background:linear-gradient(135deg,#0f2740,#20538a);
color:#fff;
border-color:rgba(59,130,246,.22);
box-shadow:0 10px 22px rgba(29,78,216,.18);
}

main{
gap:14px;
}
.card{
border-radius:22px;
padding:16px;
box-shadow:var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.72);
}
#panelPortfolioHub{
padding:18px;
box-shadow:var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,.72);
}
.section-head{
min-height:54px;
padding-bottom:10px;
}
.section-head h2{
font-size:17px;
line-height:1.15;
}
.section-head p{
font-size:12.5px;
line-height:1.5;
max-width:72ch;
}

.kpi-grid,
.kpi-grid-neo,
.portfolio-hub,
.portfolio-hub-stats,
.suggestion-list{
gap:12px;
}
.kpi-card,
.kpi-neo-card,
.hub-stat-card,
.suggestion-card,
.hub-side-card,
.hub-table-wrap{
border-radius:20px;
box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.kpi-card,
.kpi-neo-card{
min-height:128px;
padding:16px;
}
.kpi-label{
font-size:11.5px;
}
.kpi-value,
.hub-stat-card strong,
.analysis-kpi strong{
letter-spacing:-.03em;
}
.hub-stat-card strong{
font-size:30px;
}

.pill,
.status-pill,
.freshness-chip,
.kpi-source-badge,
.settings-tab,
.smart-chip,
.rules-tag{
min-height:28px;
padding:6px 10px;
font-size:11.5px;
font-weight:720;
}
.pill-blue,.status-pill.blue{background:rgba(37,99,235,.11)}
.pill-green,.status-pill.green{background:rgba(22,163,74,.12)}
.pill-orange,.status-pill.orange{background:rgba(245,158,11,.14)}
.pill-red,.status-pill.red{background:rgba(220,38,38,.11)}
.pill-purple,.status-pill.purple{background:rgba(124,58,237,.11)}

.table-wrap,
.rules-table-wrap,
.hub-table-wrap{
border-radius:16px;
}
th,
.rules-table th,
.hub-holdings-table th{
font-size:11px;
}
td,
.rules-table td,
.hub-holdings-table td{
font-size:13px;
}

.analysis-panel,
.market-hero,
.rules-panel,
.empty-state{
border-radius:20px;
}
.analysis-panel-title,
.market-hero-title{
letter-spacing:-.02em;
}
.market-hero-title{
font-size:20px;
}
.market-hero-copy{
font-size:12.5px;
line-height:1.55;
}

@media (max-width:1100px){
.hero-panel{
grid-template-columns:1fr;
min-height:auto;
}
.toolbar{
grid-template-columns:repeat(2,minmax(0,1fr));
}
}

@media (max-width:900px){
.hero{
padding-top:12px;
}
.hero-panel{
padding:18px;
gap:14px;
border-radius:24px;
}
#heroTitle{
font-size:clamp(24px,7vw,34px);
}
.page-nav{
max-width:calc(100% - 32px);
padding:6px;
gap:6px;
}
.page-link{
min-height:36px;
padding:9px 12px;
font-size:12px;
}
}

@media (max-width:640px){
.toolbar{
grid-template-columns:1fr;
}
.page-nav{
width:calc(100% - 32px);
justify-content:center;
}
.page-link{
flex:1 1 calc(50% - 6px);
}
.card,
#panelPortfolioHub{
padding:14px;
}
}

:root{
--compact-title-size:16px;
--compact-body-size:13px;
--compact-metric-size:clamp(18px,1.55vw,22px);
--compact-large-metric-size:clamp(20px,1.85vw,26px);
}

.hero-panel{
min-height:220px;
padding:20px 22px;
}
.hero-copy{gap:10px;}
#heroTitle{
font-size:clamp(26px,2.8vw,36px);
line-height:1.04;
}
.hero p{
font-size:12.5px;
line-height:1.56;
}
.toolbar{gap:8px;}
.toolbar .btn{
min-height:42px;
padding:9px 13px;
font-size:12.5px;
}
.page-link{
min-height:36px;
padding:9px 13px;
font-size:12px;
font-weight:720;
}

.section-head h2,
.analysis-panel-title,
.market-hero-title,
.panel-title,
.hub-title{
font-size:var(--compact-title-size);
line-height:1.18;
}
.section-head p,
.market-hero-copy,
.analysis-copy,
.hub-copy,
.card p,
.auth-inline-hint,
.setting-help,
.settings-section p{
font-size:var(--compact-body-size);
line-height:1.58;
}

.metric-box,
.trigger-metric-box,
.analysis-metric,
.summary-metric-card,
.hub-stat-card,
.kpi-card,
.kpi-neo-card{
padding:10px 12px;
}
.metric-box span,
.trigger-metric-box span,
.analysis-metric span,
.summary-metric-card span,
.kpi-label,
.hub-stat-card span{
font-size:11px;
margin-bottom:5px;
}
.metric-box strong{
font-size:var(--compact-metric-size) !important;
font-weight:760 !important;
line-height:1.14;
}
.trigger-metric-box strong,
.analysis-metric strong,
.summary-metric-card strong{
font-size:clamp(15px,1.25vw,18px) !important;
font-weight:740 !important;
line-height:1.28;
}
.kpi-value,
.hub-stat-card strong,
.metric-box.emphasis strong,
.donut-center strong{
font-size:var(--compact-large-metric-size) !important;
font-weight:780 !important;
line-height:1.08;
}
.table tbody td,
.hub-table td,
.records-table td,
.settings-table td{
font-size:13px;
line-height:1.5;
}
.table thead th,
.hub-table th,
.records-table thead th,
.settings-table thead th{
font-size:11px;
}
.suggestion-card,
.trigger-card,
.analysis-panel,
.market-hero,
.rules-panel{border-radius:18px;}
.suggestion-card{gap:9px;}
.analysis-metrics-compact{gap:7px;}
main{gap:12px;}
.card,
#panelPortfolioHub{padding:15px;}
#panelPortfolioHub{padding:16px;}

@media (max-width:900px){
#heroTitle{font-size:clamp(24px,6.8vw,32px)}
.toolbar .btn{font-size:12px;min-height:40px}
.metric-box strong{font-size:clamp(17px,6vw,20px) !important}
.kpi-value,.hub-stat-card strong,.donut-center strong{font-size:clamp(20px,7vw,24px) !important}
}
/* v6.9.184: R2 backup management panel */
.backup-grid{display:grid;gap:12px}
.backup-panel{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}
.backup-summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #edf2f7;background:#f8fbff;color:var(--muted);font-size:12px;line-height:1.5}
.backup-list{display:grid;gap:0;max-height:420px;overflow:auto}
.backup-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #edf2f7}
.backup-row:last-child{border-bottom:0}
.backup-row strong{display:block;font-size:14px;color:var(--text);word-break:break-all}
.backup-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.backup-row .mini-action-btn{white-space:nowrap}
@media (max-width:760px){.backup-row{grid-template-columns:1fr}.backup-row .mini-action-btn{width:100%;justify-content:center}}

/* v6.9.185: stable settings route mount */
.settings-route-mount{
  grid-column:1 / -1;
  width:100%;
  margin-top:18px;
}
body[data-route="settings"] .settings-route-mount{
  display:block;
}
body[data-route="settings"] .settings-route-mount #settingsDialog[open]{
  margin-top:0;
}
body[data-route="settings"] #settingsDialog[data-route-page="true"]{
  z-index:auto;
}

/* v6.9.186: deployment self-check panel */
.deploy-check-panel{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}
.deploy-check-summary{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #edf2f7;background:#f8fbff;color:var(--muted);font-size:12px;line-height:1.5}
.deploy-check-summary strong{display:block;color:var(--text);font-size:14px}
.deploy-check-summary small{display:block;margin-top:3px;color:var(--muted);font-size:12px}
.deploy-check-summary.warn{background:#fff7ed;border-bottom-color:#fed7aa}
.deploy-check-list{display:grid;gap:0}
.deploy-check-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #edf2f7}
.deploy-check-row:last-child{border-bottom:0}
.deploy-check-row strong{display:block;font-size:14px;color:var(--text)}
.deploy-check-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.deploy-check-status{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#ecfdf5;color:#047857}
.deploy-check-row.warn .deploy-check-status{background:#fff7ed;color:#c2410c}
.deploy-check-row.error .deploy-check-status{background:#fef2f2;color:#b91c1c}
@media (max-width:760px){.deploy-check-row{grid-template-columns:1fr}.deploy-check-status{justify-self:start}}

/* v6.9.187: frontend runtime diagnostics panel */
.runtime-diagnostics-panel{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}
.runtime-diagnostics-summary{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #edf2f7;background:#f8fbff;color:var(--muted);font-size:12px;line-height:1.5}
.runtime-diagnostics-summary strong{display:block;color:var(--text);font-size:14px}
.runtime-diagnostics-list{display:grid;gap:0;max-height:380px;overflow:auto}
.runtime-diagnostics-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #edf2f7}
.runtime-diagnostics-row:last-child{border-bottom:0}
.runtime-diagnostics-row strong{display:block;font-size:14px;color:var(--text)}
.runtime-diagnostics-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45;word-break:break-word}
.runtime-diagnostics-status{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#eef2ff;color:#4338ca}
.runtime-diagnostics-row.error .runtime-diagnostics-status{background:#fef2f2;color:#b91c1c}
.runtime-diagnostics-row.warn .runtime-diagnostics-status,.runtime-diagnostics-row.warning .runtime-diagnostics-status{background:#fff7ed;color:#c2410c}
.runtime-diagnostics-row.info .runtime-diagnostics-status{background:#ecfdf5;color:#047857}
@media (max-width:760px){.runtime-diagnostics-row{grid-template-columns:1fr}.runtime-diagnostics-status{justify-self:start}}

/* v6.9.189: cloud state integrity check panel */
.state-integrity-panel{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}
.state-integrity-summary{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #edf2f7;background:#f8fbff;color:var(--muted);font-size:12px;line-height:1.5}
.state-integrity-summary strong{display:block;color:var(--text);font-size:14px}
.state-integrity-summary small{display:block;margin-top:3px;color:var(--muted);font-size:12px}
.state-integrity-summary.warn{background:#fff7ed;border-bottom-color:#fed7aa}
.state-integrity-summary.error{background:#fef2f2;border-bottom-color:#fecaca}
.state-integrity-list{display:grid;gap:0;max-height:420px;overflow:auto}
.state-integrity-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #edf2f7}
.state-integrity-row:last-child{border-bottom:0}
.state-integrity-row strong{display:block;font-size:14px;color:var(--text)}
.state-integrity-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45;word-break:break-word}
.state-integrity-status{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#ecfdf5;color:#047857}
.state-integrity-row.warn .state-integrity-status{background:#fff7ed;color:#c2410c}
.state-integrity-row.error .state-integrity-status{background:#fef2f2;color:#b91c1c}
@media (max-width:760px){.state-integrity-row{grid-template-columns:1fr}.state-integrity-status{justify-self:start}}

/* v6.9.189: make state integrity visible near the top of settings */
.settings-health-center{border-color:#bfdbfe;background:linear-gradient(180deg,#eff6ff 0%,#ffffff 72%)}
.state-integrity-compact{display:grid;gap:4px;padding:12px 14px;border:1px solid #dbeafe;border-radius:16px;background:#fff;color:var(--muted);font-size:12px;line-height:1.5}
.state-integrity-compact strong{color:var(--text);font-size:14px}
.state-integrity-compact small{color:var(--muted)}
.state-integrity-compact.ok{border-color:#bbf7d0;background:#f0fdf4}
.state-integrity-compact.warn{border-color:#fed7aa;background:#fff7ed}
.state-integrity-compact.error{border-color:#fecaca;background:#fef2f2}

/* v6.9.196: cleared asset lifecycle state */
.asset-row-cleared{
  opacity:.74;
}
.asset-row-cleared .asset-symbol{
  text-decoration:line-through;
  text-decoration-thickness:1px;
  text-decoration-color:color-mix(in srgb, var(--muted) 70%, transparent);
}
.asset-row-cleared td{
  background:color-mix(in srgb, var(--surface) 92%, var(--muted) 8%);
}

/* v6.9.196: lifecycle wizard, audit log, backup diff, market health */
.audit-log-panel,.market-health-panel{display:grid;gap:10px}
.audit-log-summary,.market-health-summary,.backup-diff-preview .backup-summary{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:rgba(15,23,42,.03)}
.audit-log-summary small,.market-health-summary small{display:block;color:var(--muted);margin-top:3px}
.audit-log-list,.market-health-list,.market-health-errors{display:grid;gap:8px}
.audit-log-row,.market-health-row,.market-health-error{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--card)}
.audit-log-row small,.market-health-row small,.market-health-error small{display:block;color:var(--muted);margin-top:3px}
.market-health-error{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.06)}
.backup-diff-preview{display:grid;gap:12px}
.backup-diff-preview table{width:100%;border-collapse:collapse;overflow:hidden;border-radius:12px;border:1px solid var(--border)}
.backup-diff-preview th,.backup-diff-preview td{padding:9px 10px;border-bottom:1px solid var(--border);text-align:left;font-size:13px}
.backup-diff-preview th{background:rgba(15,23,42,.04);font-weight:700}
.asset-row-cleared .asset-symbol::after{content:' lifecycle';font-size:0;}

/* v6.9.196: operational polish */
.export-bundle-panel{min-height:74px}
.runtime-diagnostics-row.info{border-color:rgba(59,130,246,.18);background:rgba(59,130,246,.04)}

/* v6.9.196: closed asset review and schema migration visibility */
.closed-review-panel{display:grid;gap:12px;}
.closed-review-summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.55);color:var(--muted);font-weight:700;}
.closed-review-summary span{padding:5px 9px;border-radius:999px;background:rgba(15,23,42,.06);}
.closed-review-summary .warn{background:rgba(245,158,11,.16);color:#92400e;}
.closed-review-table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px;}
.closed-review-table th,.closed-review-table td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;}
.closed-review-table th{font-size:12px;color:var(--muted);font-weight:800;background:rgba(15,23,42,.04);}
.closed-review-table .sub{font-size:12px;color:var(--muted);margin-top:3px;}
.closed-review-table .positive{color:#047857;font-weight:800;}
.closed-review-table .negative{color:#b91c1c;font-weight:800;}


/* v6.9.196: analysis jump target highlight */
.analysis-scroll-highlight{
  animation:analysisScrollPulse 2.2s ease-out 1;
  box-shadow:0 0 0 3px rgba(37,99,235,.22), 0 18px 48px rgba(37,99,235,.16) !important;
}
@keyframes analysisScrollPulse{
  0%{box-shadow:0 0 0 0 rgba(37,99,235,.34), 0 18px 48px rgba(37,99,235,.12)}
  55%{box-shadow:0 0 0 8px rgba(37,99,235,.12), 0 18px 48px rgba(37,99,235,.18)}
  100%{box-shadow:0 0 0 3px rgba(37,99,235,.22), 0 18px 48px rgba(37,99,235,.16)}
}
