/* App pages: tab bar, portfolio, assistant */

/* risk test */
.risk-q { font-size: 1.1rem; font-weight: 700; margin: 0 0 12px; }
.risk-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 560px) { .risk-opts { grid-template-columns: 1fr; } }
.risk-opt { font: inherit; text-align: right; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.risk-opt:hover, .risk-opt:focus-visible { border-color: var(--accent); }

/* portfolio */
.pf-top { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; margin: 16px 0 0; }
.pf-top .panel { margin: 0; }
@media (max-width: 820px) { .pf-top { grid-template-columns: 1fr; } }
.pf-total-v { font-size: 1.8rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.pf-profile { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.pf-status { margin-top: 14px; }
.pf-warn { color: var(--accent); font-weight: 700; }
.pf-ok { color: var(--buy); font-weight: 700; }
.pf-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-chart-body { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; margin-top: 10px; }
@media (max-width: 520px) { .pf-chart-body { grid-template-columns: 1fr; justify-items: center; } }
#donut { width: 200px; height: 200px; }
.donut-k { fill: var(--muted); font-size: 12px; font-family: inherit; }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; font-size: 0.88rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.lg-v { margin-inline-start: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; vertical-align: middle; }
.sugg { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.sugg li { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.h-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 8px; }
@media (max-width: 820px) { .h-form { grid-template-columns: 1fr 1fr; } .h-actions { grid-column: 1 / -1; } }
.h-actions { flex-direction: row; gap: 6px; }

/* assistant */
.chat { display: flex; flex-direction: column; height: calc(100vh - 64px - 24px); height: calc(100dvh - 64px - 24px); max-width: 820px; margin: 0 auto; padding: 12px 0 0; }
@media (max-width: 720px) { .chat { height: calc(100dvh - 64px - 68px - env(safe-area-inset-bottom)); } }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 2px 16px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.bubble.user { align-self: flex-start; background: var(--accent); color: var(--accent-ink); border-end-start-radius: 4px; }
.bubble.bot { align-self: flex-end; background: var(--surface); border: 1px solid var(--border); border-end-end-radius: 4px; }
.bubble.bot.typing::after { content: '▍'; animation: blink 1s steps(2) infinite; color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }
.chat-intro { text-align: center; color: var(--muted); margin: auto 0; padding: 20px 0; }
.chat-intro h1 { color: var(--text); margin: 0 0 6px; font-size: 1.5rem; }
.chips-sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.chat-form { display: flex; gap: 8px; padding: 10px 0 14px; border-top: 1px solid var(--border); background: var(--bg); }
.chat-form textarea { min-height: 46px; max-height: 140px; resize: none; }
.chat-meta { font-size: 0.75rem; color: var(--muted); text-align: center; padding-bottom: 6px; }

/* install banner */
.install { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; font-size: 0.9rem; }

/* forex */
.sessions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 820px) { .sessions { grid-template-columns: repeat(2, 1fr); } }
.session { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.session.on { border-color: var(--buy); }
.session-head { display: flex; justify-content: space-between; align-items: center; }
.session-bar { height: 4px; background: var(--border); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.session-bar span { display: block; height: 100%; background: var(--buy); }
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fx-grid .panel { margin: 0; }
@media (max-width: 820px) { .fx-grid { grid-template-columns: 1fr; } }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-out { margin-top: 14px; background: var(--surface-2); border-radius: 12px; padding: 14px; }
.calc-big { font-size: 2rem; font-weight: 900; color: var(--accent); }
.calc-big small { font-size: 1rem; color: var(--muted); }
.calc-rows { display: grid; gap: 4px; margin-top: 6px; font-size: 0.9rem; }
.calc-rows div { display: flex; justify-content: space-between; gap: 8px; }
.calc-rows span { color: var(--muted); }
.tg-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* news, static pages, footer */
.news { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.news-item { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; }
.news-item:hover { border-color: var(--accent); }
.news-time { color: var(--muted); font-size: 0.8rem; }
.news-go { color: var(--accent); font-size: 0.82rem; }
.prose .panel { line-height: 2; }
.prose h2 { font-size: 1.1rem; margin: 18px 0 6px; }
.prose ul { padding-inline-start: 20px; margin: 0; }
.tg-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* market page */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.price-card::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px; background: var(--gold-grad); opacity: .55; }
.pc-head { display: flex; align-items: center; gap: 8px; }
.pc-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 900; font-size: 0.8rem; }
.pc-name { font-weight: 700; flex: 1; }
.pc-val { font-size: 1.45rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.pc-val small { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.pc-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.76rem; }
.pc-sub { color: var(--muted); font-size: 0.8rem; margin-top: -4px; }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--buy); margin-inline-end: 5px; box-shadow: 0 0 0 3px var(--buy-bg); vertical-align: middle; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.bubble-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 680px) { .bubble-grid { grid-template-columns: 1fr; } }
.bubble-cell { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.bubble-cell .k { font-weight: 800; margin-bottom: 8px; }
.bc-rows { display: grid; gap: 4px; font-size: 0.9rem; }
.bc-rows div { display: flex; justify-content: space-between; gap: 8px; }
.bc-rows span { color: var(--muted); }
.bc-rows small, .calc-rows small, .calc-big small { color: var(--muted); font-weight: 600; font-size: 0.75em; }
.bc-bubble { margin-top: 10px; font-weight: 900; font-size: 1.15rem; }
.bc-bubble.pos { color: var(--accent); } .bc-bubble.neg { color: var(--info); }
.meter { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.meter span.neg { background: var(--info); }
.explain { margin-top: 14px; color: var(--muted); font-size: 0.9rem; }
.explain summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.explain p { margin: 8px 0 0; line-height: 2; }
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.tools-grid .panel { margin: 0; }
@media (max-width: 860px) { .tools-grid { grid-template-columns: 1fr; } }
.tool .calc .field.wide { grid-column: 1 / -1; }
.calc-out.conv { display: grid; gap: 6px; }
.calc-out.conv div, .calc-rows div { display: flex; justify-content: space-between; gap: 8px; }
.calc-out.conv span { color: var(--muted); }
.calc-out.conv b { font-variant-numeric: tabular-nums; }
.calc-big.up { color: var(--buy); } .calc-big.down { color: var(--sell); }

/* learn page */
.learn-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .learn-layout { grid-template-columns: 1fr; } .toc { position: static !important; } }
.toc { position: sticky; top: 124px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.toc h3 { margin: 0 0 8px; font-size: 0.9rem; color: var(--muted); }
.toc a { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 0.9rem; }
.toc a:hover { background: var(--surface-2); }
.toc a.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 700; }
.toc .n { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); font-size: 0.72rem; font-weight: 800; flex: none; }
.lesson { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; scroll-margin-top: 124px; line-height: 2.05; }
.lesson h2 { margin: 0 0 4px; font-size: 1.3rem; display: flex; gap: 10px; align-items: center; }
.lesson h2 .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-grad); color: var(--accent-ink); font-size: 0.95rem; font-weight: 900; flex: none; }
.lesson .meta-l { color: var(--muted); font-size: 0.8rem; margin-bottom: 10px; }
.lesson h3 { font-size: 1.02rem; margin: 18px 0 4px; }
.lesson p { margin: 6px 0; }
.lesson ul, .lesson ol { margin: 6px 0; padding-inline-start: 22px; }
.tip { background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); border-inline-start: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: 0.93rem; }
.tip.warn { background: var(--sell-bg); border-inline-start-color: var(--sell); }
.example { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 0.92rem; }
.example .levels { margin-top: 8px; }
.lesson-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.glossary { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin: 6px 0 0; }
.glossary dt { font-weight: 800; color: var(--accent); }
.glossary dd { margin: 0; color: var(--text); }
@media (max-width: 560px) { .glossary { grid-template-columns: 1fr; } .glossary dd { margin-bottom: 8px; } }
.live-line { font-size: 0.82rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 7px 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.live-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.live-line.done { color: var(--text); }
.level.hit { outline: 1px solid var(--buy); }

/* prop page */
.prop-hero { padding: 48px 0 24px; background: radial-gradient(900px 380px at 15% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.prop-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
@media (max-width: 880px) { .prop-hero-grid { grid-template-columns: 1fr; } }
.prop-hero h1 { font-size: clamp(1.8rem, 4.6vw, 2.8rem); line-height: 1.35; margin: 12px 0; font-weight: 900; }
.prop-hero h1 span { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ref-box { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 8px 12px; font-size: 0.88rem; color: var(--muted); }
.ref-box code { font-family: ui-monospace, Consolas, monospace; color: var(--accent); font-weight: 800; letter-spacing: .06em; direction: ltr; }
.prop-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--glow); }
.prop-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; margin-bottom: 10px; }
.prop-facts { list-style: none; margin: 0 0 10px; padding: 0; }
.prop-facts li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.prop-facts li span { color: var(--muted); }
.steps.steps-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .steps.steps-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps.steps-4 { grid-template-columns: 1fr; } }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-inline-start: 26px; line-height: 1.9; }
.check-list li::before { content: '✓'; position: absolute; inset-inline-start: 0; top: 0; color: var(--accent); font-weight: 900; }
.check-list a { color: var(--accent); }
.tips-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
@media (max-width: 980px) { .tips-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tips-grid { grid-template-columns: 1fr; } }
.tip-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tip-card p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.prop-warn { margin: 8px 0 24px; line-height: 2; }
.prop-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: radial-gradient(500px 160px at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 18px; padding: 18px 20px; margin: 20px 0; }
.prop-banner h3 { margin: 0 0 4px; }
.prop-banner p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ===== signal chart ===== */
.chart-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: var(--surface-2, rgba(255,255,255,.04)); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .85rem; cursor: pointer; }
.chart-btn svg { width: 16px; height: 16px; color: var(--accent); }
.chart-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.sig-chart { margin-top: 12px; }
.c-box { border: 1px solid var(--border); border-radius: 14px; padding: 10px 10px 6px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.c-plot { position: relative; height: 220px; direction: ltr; }
.c-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.c-plot .z-win { fill: var(--buy); opacity: .1; } .c-plot .z-win2 { fill: var(--buy); opacity: .05; } .c-plot .z-loss { fill: var(--sell); opacity: .1; }
.c-plot line { stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 5 4; }
.c-plot .l-tgt { stroke: var(--buy); } .c-plot .l-stop { stroke: var(--sell); } .c-plot .l-entry { stroke: var(--muted); stroke-dasharray: none; }
.c-plot .c-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.c-plot .c-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.c-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; border: 2px solid var(--surface); z-index: 2; }
.c-dot.open { background: var(--text); } .c-dot.win { background: var(--buy); box-shadow: 0 0 0 4px var(--buy-bg); } .c-dot.loss { background: var(--sell); box-shadow: 0 0 0 4px var(--sell-bg); }
.c-dot.live { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 1.6s ease-in-out infinite; }
.c-tag { position: absolute; right: 2px; transform: translateY(-50%); font-size: .7rem; line-height: 1; padding: 4px 7px; border-radius: 6px; direction: rtl; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); z-index: 3; }
.c-tag.tgt { color: var(--buy); border-color: color-mix(in srgb, var(--buy) 40%, transparent); }
.c-tag.stop { color: var(--sell); border-color: color-mix(in srgb, var(--sell) 40%, transparent); }
.c-tag.entry { color: var(--text); }
.c-empty { position: absolute; left: 8px; bottom: 8px; max-width: 62%; direction: rtl; font-size: .75rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 8px 10px; line-height: 1.7; z-index: 3; }
.c-empty.static { position: static; max-width: none; margin-top: 8px; }
.c-axis { display: flex; justify-content: space-between; direction: ltr; font-size: .72rem; color: var(--muted); margin-top: 6px; }
.c-axis span { direction: rtl; }
.c-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .74rem; color: var(--muted); margin-top: 8px; }
.c-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.c-legend .k-win { background: color-mix(in srgb, var(--buy) 45%, transparent); } .c-legend .k-loss { background: color-mix(in srgb, var(--sell) 45%, transparent); } .c-legend .k-line { background: var(--accent); height: 3px; vertical-align: 2px; }
.c-src { font-size: .7rem; color: var(--muted); margin: 4px 0 0; }
@media (max-width: 560px) { .c-plot { height: 190px; } .c-empty { max-width: 78%; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 10%, transparent); } }

/* ===== notification card ===== */
.push-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; }
.push-card.off { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.push-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.push-ico svg { width: 22px; height: 22px; }
.push-tx { flex: 1; min-width: 0; }
.push-tx b { display: block; font-size: .95rem; }
.push-tx p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.push-card .btn { flex: none; }
@media (max-width: 560px) { .push-card { flex-wrap: wrap; } .push-card .btn { width: 100%; } }
.acc-push .push-card { margin-top: 16px; }

/* ===== track record page ===== */
.rec-chips { margin: 8px 0 18px; }
.rec-top { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 760px) { .rec-top { grid-template-columns: 1fr; } }
.rec-rate { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--glow); }
.rec-rate p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.8; }
.ring-wrap { position: relative; width: 92px; height: 92px; flex: none; }
.ring-wrap b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.35rem; font-weight: 900; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--border); } .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.rec-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rk { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.rk-l { color: var(--muted); font-size: .8rem; }
.rk-v { font-size: 1.45rem; font-weight: 900; }
.rk-s { color: var(--muted); font-size: .74rem; }
.pos { color: var(--buy); } .neg { color: var(--sell); }
.rec-panel { margin: 0 0 14px; }
.rec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rec-h h2 { margin: 0; font-size: 1.1rem; }
.rec-h span { font-weight: 900; font-size: 1.1rem; }
.rec-h a { font-size: .85rem; color: var(--accent); text-decoration: none; }
.rec-sub { color: var(--muted); font-size: .8rem; margin: 4px 0 12px; }
.eq-plot { position: relative; height: 220px; direction: ltr; }
.eq-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.eq-line { fill: none; stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.eq-zero { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.eq-zero-l { position: absolute; left: 0; transform: translateY(-120%); font-size: .7rem; color: var(--muted); }
.eq-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.eq-dot.pos { background: var(--buy); box-shadow: 0 0 0 5px var(--buy-bg); } .eq-dot.neg { background: var(--sell); box-shadow: 0 0 0 5px var(--sell-bg); }
.rec-empty-mini { color: var(--muted); font-size: .85rem; padding: 26px 0; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.mb { display: flex; gap: 8px; align-items: stretch; height: 150px; margin: 12px 0 16px; direction: rtl; }
.mb-col { flex: 1; display: grid; grid-template-rows: 1fr 1fr auto; min-width: 0; }
.mb-up, .mb-down { display: flex; justify-content: center; }
.mb-up { align-items: flex-end; border-bottom: 1px solid var(--border-strong); } .mb-down { align-items: flex-start; }
.mb i { width: min(26px, 70%); display: block; }
.mb i.pos { background: var(--buy); border-radius: 6px 6px 0 0; } .mb i.neg { background: var(--sell); border-radius: 0 0 6px 6px; }
.mb-l { font-size: .7rem; color: var(--muted); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-wrap { overflow-x: auto; }
.rec-tbl { width: 100%; border-collapse: collapse; font-size: .88rem; white-space: nowrap; }
.rec-tbl th { color: var(--muted); font-weight: 500; font-size: .78rem; text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.rec-tbl td { padding: 10px; border-bottom: 1px solid var(--border); }
.rec-tbl tr:last-child td { border-bottom: 0; }
.rec-mk { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.rec-mk-i { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rec-mk-i span { color: var(--muted); font-size: .78rem; }
.rec-mk-i strong { font-size: 1.15rem; }
.rec-list { list-style: none; margin: 10px 0 0; padding: 0; }
.rec-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rec-list li:last-child { border-bottom: 0; }
.rl-a { display: flex; flex-direction: column; min-width: 0; }
.rl-a small { color: var(--muted); font-size: .75rem; }
.rl-r { min-width: 64px; text-align: left; direction: ltr; unicode-bidi: plaintext; }
.rec-note { color: var(--muted); font-size: .78rem; line-height: 1.8; margin: 6px 0 24px; }
@media (max-width: 560px) { .rec-tbl th:nth-child(4), .rec-tbl td:nth-child(4) { display: none; } .rec-tbl td, .rec-tbl th { padding: 9px 6px; } }

/* ===== login / signup ===== */
.auth { max-width: 420px; margin: 36px auto 40px; }
.auth-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px 22px 22px; box-shadow: var(--glow); overflow: hidden; }
.auth-card::before { content: ''; position: absolute; inset: -40% -20% auto auto; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; }
.auth-logo { display: block; width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; position: relative; }
.auth-step { position: relative; display: flex; flex-direction: column; gap: 14px; }
.auth-step[hidden] { display: none; }
.auth-step h1 { margin: 0; font-size: 1.45rem; font-weight: 900; text-align: center; }
.auth-sub { margin: -6px 0 4px; color: var(--muted); font-size: .9rem; text-align: center; line-height: 1.9; }
.auth-sub b { color: var(--text); }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); }
.auth-field input { font: inherit; font-size: 1.05rem; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 12px; padding: 13px 14px; width: 100%; box-sizing: border-box; }
.auth-field input[dir="ltr"] { text-align: left; letter-spacing: .04em; }
.auth-field input:focus, .otp-boxes input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.auth-field small { font-size: .74rem; }
.pw-wrap { position: relative; display: block; }
.pw-eye { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1rem; opacity: .6; padding: 6px; }
.auth-go { width: 100%; justify-content: center; margin-top: 2px; }
.auth-go.loading { opacity: .7; pointer-events: none; }
.auth-go.loading::after { content: ''; width: 16px; height: 16px; margin-inline-start: 8px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-msg { margin: 0; min-height: 1px; color: var(--sell); font-size: .85rem; text-align: center; }
.auth-msg:empty { display: none; }
.auth-alt { margin: 0; text-align: center; font-size: .86rem; color: var(--muted); line-height: 2; }
.auth-fine { margin: 0; text-align: center; font-size: .74rem; color: var(--muted); line-height: 1.9; }
.auth-fine a, .auth-alt a { color: var(--accent); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.otp-boxes { display: flex; justify-content: center; gap: 8px; }
.otp-boxes input { width: 52px; height: 58px; text-align: center; font: inherit; font-size: 1.5rem; font-weight: 800; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 14px; padding: 0; }
@media (max-width: 380px) { .otp-boxes input { width: 46px; height: 52px; } }
.auth-trust { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--muted); font-size: .8rem; }

/* telegram login */
.btn-tgl { background: #229ed9; color: #fff; border-color: #229ed9; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-tgl:hover { filter: brightness(1.08); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tg-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tg-steps li { counter-increment: s; position: relative; padding: 10px 46px 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.tg-steps li::before { content: counter(s, persian); position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 900; background: var(--surface-2); color: var(--accent); }
.tg-steps li.ok { border-color: color-mix(in srgb, var(--buy) 45%, var(--border)); }
.tg-steps li.ok::before { content: '✓'; background: var(--buy); color: #fff; }
.tg-steps small { color: var(--muted); font-size: .76rem; }
.tg-steps .btn { align-self: flex-start; }
.tg-wait { margin: 0; text-align: center; color: var(--muted); font-size: .86rem; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-inline-end: 6px; }
.auth [hidden] { display: none !important; }

/* ===== card actions + signal page ===== */
.card-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card-acts .chart-btn { margin-top: 0; }
.share-btn, .open-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .85rem; cursor: pointer; text-decoration: none; }
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover, .open-btn:hover { color: var(--text); border-color: var(--border-strong); }
.sig-page { max-width: 760px; padding-top: 22px; padding-bottom: 30px; }
.sig-page .open-btn { display: none; }
.sig-back { display: inline-block; color: var(--muted); text-decoration: none; font-size: .88rem; margin-bottom: 12px; }
.share-box { margin: 16px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.share-box[hidden] { display: none; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sig-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.sig-cta[hidden] { display: none; }
.sig-cta h2 { margin: 0 0 4px; font-size: 1.1rem; } .sig-cta p { margin: 0; color: var(--muted); font-size: .88rem; }
.sig-more { text-align: center; } .sig-more a { color: var(--accent); text-decoration: none; }
small.muted { color: var(--muted); font-size: .8em; font-weight: 400; }

/* terms page */
.terms .panel h2 { scroll-margin-top: 80px; margin-top: 26px; }
.terms .panel h2:first-child { margin-top: 0; }
.terms h3 { font-size: 1rem; margin: 16px 0 6px; color: var(--accent); }
.terms p, .terms li { line-height: 2; }
.terms-toc ol { margin: 8px 0 0; padding-inline-start: 20px; columns: 2; column-gap: 24px; }
.terms-toc li { line-height: 2; }
.terms-toc a { color: var(--accent); text-decoration: none; }
@media (max-width: 560px) { .terms-toc ol { columns: 1; } }
.terms-toc ol { list-style: persian; }

/* ===== portfolio, plain version ===== */
.pf-sum { margin-top: 8px; }
.pf-sum .k { color: var(--muted); font-size: .85rem; }
.pf-sum-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pf-sum .pf-total-v { font-size: 1.9rem; font-weight: 900; margin: 2px 0 6px; }
.pf-profile { color: var(--muted); font-size: .9rem; } .pf-profile strong { color: var(--accent); }
.pf-score { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.pf-score .pf-ring { --v: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--surface-2) 0); position: relative; }
.pf-score .pf-ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.pf-score .pf-ring b { position: relative; font-size: 1.1rem; font-weight: 900; color: var(--text); }
.pf-ring.good { --c: var(--buy); } .pf-ring.mid { --c: var(--accent); } .pf-ring.low { --c: var(--sell); }
.pf-say { margin: 14px 0 6px; line-height: 2; font-size: .95rem; }
.pf-stack { margin-top: 8px; }
.st-row { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px; margin-top: 8px; }
.st-l { font-size: .82rem; color: var(--muted); }
.st-bar { display: flex; height: 28px; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.st-bar i { display: flex; align-items: center; justify-content: center; min-width: 0; font-style: normal; border-inline-start: 2px solid var(--surface); }
.st-bar i:first-child { border: 0; }
.st-bar i span { font-size: .7rem; font-weight: 700; color: #0b0b0d; white-space: nowrap; overflow: hidden; }
.st-bar .st-empty { background: transparent; }
.st-legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.st-legend .sw { margin-inline-end: 5px; }
.pf-hint { margin: -4px 0 12px; }
.pf-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pr { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.pr-top, .pr-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pr-n { font-weight: 700; } .pr-n .sw { margin-inline-end: 7px; }
.pr-v { color: var(--muted); font-size: .85rem; }
.pr-track { position: relative; height: 10px; background: var(--bg); border-radius: 99px; margin: 10px 0 8px; }
.pr-track i { display: block; height: 100%; border-radius: 99px; }
.pr-track b { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-right: -1.5px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface-2); }
.pr-foot { font-size: .8rem; color: var(--muted); } .pr-foot b { color: var(--text); }
.pr-tag { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pr-tag.ok { background: var(--buy-bg); color: var(--buy); } .pr-tag.hi { background: var(--sell-bg); color: var(--sell); } .pr-tag.lo { background: var(--info-bg); color: var(--info); }
.sg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
@media (max-width: 640px) { .sg-cols { grid-template-columns: 1fr; } }
.sg-box { border-radius: 14px; padding: 14px; border: 1px solid var(--border); }
.sg-box.dec { background: var(--sell-bg); border-color: color-mix(in srgb, var(--sell) 30%, transparent); }
.sg-box.inc { background: var(--buy-bg); border-color: color-mix(in srgb, var(--buy) 30%, transparent); }
.sg-box h3 { margin: 0; font-size: 1rem; } .sg-box > .fine { margin: 2px 0 8px; }
.sg-box ul { list-style: none; margin: 0; padding: 0; }
.sg-box li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.sg-box li:first-child { border-top: 0; }
.sg-n { flex: 1; } .sg-box li b { white-space: nowrap; }

/* fixed-income funds */
.fi-panel[hidden] { display: none; }
.fi-intro { margin: -4px 0 10px; line-height: 1.9; }
.fi-calc { margin-bottom: 10px; font-size: .9rem; }
.fi-calc input { width: 70px; text-align: center; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px; margin: 0 4px; }
.fi-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fi { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.fi-rank { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-grad, var(--accent)); color: var(--accent-ink); font-weight: 900; font-size: .85rem; }
.fi-main, .fi-num, .fi-inc { display: flex; flex-direction: column; min-width: 0; }
.fi-main b { font-size: 1.05rem; } .fi-main small { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-num { text-align: center; } .fi-num b { color: var(--buy); font-size: 1.1rem; } .fi-num small, .fi-inc small { color: var(--muted); font-size: .7rem; }
.fi-inc { text-align: left; } .fi-inc b { font-size: .95rem; }
@media (max-width: 560px) { .fi { grid-template-columns: 28px 1fr auto; } .fi-inc { grid-column: 2 / -1; flex-direction: row; gap: 6px; align-items: baseline; text-align: right; } }
.tg-alt { display: flex; flex-direction: column; gap: 14px; } .auth .tg-alt[hidden] { display: none !important; }

/* ---- signals page: compact notification strip, honest stats, "no active signal" note ---- */
.push-strip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--radius); padding: 8px 10px 8px 6px; margin: 0 0 14px; }
.push-strip .push-ico { flex: none; }
.push-strip-tx { flex: 1; font-size: .88rem; font-weight: 600; min-width: 0; }
.push-strip .btn { flex: none; }
.push-x { flex: none; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 8px; }
.push-x:hover { background: var(--surface-2); color: var(--text); }
.stat-sub { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.next-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--radius); padding: 14px 16px; }
.next-note > div { flex: 1; } .next-note b { display: block; margin-bottom: 2px; } .next-note p { margin: 0; color: var(--muted); font-size: .88rem; }
.next-note .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.next-note .btn svg { width: 16px; height: 16px; }
@media (max-width: 560px) {
  .push-strip-tx { font-size: .8rem; }
  .next-note { flex-direction: column; align-items: stretch; } .next-note .btn { justify-content: center; }
  /* stats in one slim row so the first signal is visible without scrolling */
  body.has-tabbar main > .hero { padding: 18px 0 6px; }
  body.has-tabbar main > .hero p { font-size: .88rem; }
  #stats.stats { grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
  #stats .stat { padding: 8px 6px; text-align: center; }
  #stats .stat-label { font-size: .68rem; white-space: nowrap; }
  #stats .stat-value { font-size: 1.05rem; margin-top: 2px; }
  #stats .stat-sub { font-size: .6rem; }
  .filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters .chips::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; }
}

/* ---- checkout: card-to-card + receipt (account page) ---- */
.pay-box { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pay-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.pay-head small { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 2px; }
.pay-head b { font-size: 1.15rem; }
.pay-amt { color: var(--accent); }
.pay-amt small { display: inline !important; color: var(--muted); }
.pay-steps { margin: 0; padding: 0 22px 0 0; list-style: persian; display: grid; gap: 18px; }
.pay-steps > li > b { display: block; margin-bottom: 10px; }
.pay-card { background: var(--surface-2, rgba(255,255,255,.04)); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border)); border-radius: 14px; padding: 14px; display: grid; gap: 6px; }
.pay-num { font-size: clamp(1.05rem, 5.2vw, 1.35rem); white-space: nowrap; font-weight: 800; letter-spacing: .04em; text-align: center; font-variant-numeric: tabular-nums; }
.pay-card .fine { text-align: center; margin: 0; }
.pay-copy { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.pay-file { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 12px; border: 1.5px dashed var(--border); border-radius: 14px; cursor: pointer; text-align: center; font-weight: 700; color: var(--muted); }
.pay-file:hover, .pay-file:focus-within { border-color: var(--accent); color: var(--text); }
.pay-done { display: flex; gap: 12px; align-items: flex-start; }
.pay-ic { font-size: 1.6rem; line-height: 1; }
.pay-done p { margin: 4px 0 0; }
.auth-why { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: .9rem; font-weight: 600; margin: 0 0 10px; }

/* subscription ending / ended strip (common.js subStrip) */
.sub-strip { background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); }
.sub-strip.ended { background: color-mix(in srgb, var(--sell) 12%, var(--bg-2)); border-bottom-color: color-mix(in srgb, var(--sell) 40%, var(--border)); }
.sub-strip-in { display: flex; align-items: center; gap: 10px; padding-block: 8px; font-size: .9rem; font-weight: 600; }
.sub-strip-in span { flex: 1; }
.sub-x { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }

/* market page: jump bar + money hint */
.jump-bar { position: sticky; top: 68px; z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; margin: 0 0 8px; background: linear-gradient(var(--bg) 70%, transparent); flex-wrap: nowrap; }
.jump-bar::-webkit-scrollbar { display: none; }
.jump-bar .chip { white-space: nowrap; text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.money-hint { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); min-height: 1em; }
main [id] { scroll-margin-top: 120px; }

/* ---- discount code, invite link, payment history ---- */
.pay-old { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
.cpn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.cpn input { flex: 1 1 160px; max-width: 240px; text-transform: uppercase; }
.cpn .msg { flex-basis: 100%; margin: 0; }
.cpn-on { justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--buy-bg); border: 1px solid color-mix(in srgb, var(--buy) 35%, transparent); }
.ref-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 14px; }
.ref-link input { flex: 1 1 220px; min-width: 0; font-size: .9rem; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ref-stats div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 6px; text-align: center; }
.ref-stats b { display: block; font-size: 1.3rem; color: var(--accent); }
.ref-stats small { color: var(--muted); font-size: .75rem; }
.hist-tbl td, .hist-tbl th { white-space: nowrap; }
@media (max-width: 560px) { .hist-tbl th:last-child, .hist-tbl td:last-child { display: none; } }
