/* REA-observed Quantcept page proportions, rendered with LunaTerminal's light/navy/blue theme tokens. */
.ticker-hit { grid-template-columns: 72px minmax(0, 1fr) auto; }
.ticker-company { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ticker-company-name { min-width: 0; overflow-wrap: anywhere; }
.ticker-company-logo { position: relative; display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; overflow: hidden; border-radius: 6px; background: var(--bg-inset); color: var(--text-3); font: 11px/1 var(--font-mono); }
.ticker-company-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-elevated); opacity: 0; }
.ticker-company-logo img[data-loaded] { opacity: 1; }
@media (max-width: 700px) { .ticker-hit { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; } .ticker-hit > small { display: none; } .ticker-company { gap: 7px; } }
#main:is([data-view="agents"], [data-view="agentInstructions"], [data-view="guide"]) .page { padding: 0; background: var(--bg); }
.qt-page { min-height: 100%; padding: 4px 32px 72px; background: var(--bg); color: var(--text); }
.qt-inner { max-width: 1080px; margin: 0 auto; }
.qt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 20px 0 22px; }
.qt-head h1 { margin: 0; font: 400 22px/1.1 var(--font-mono); letter-spacing: .07em; color: var(--navy); }
.qt-head p { max-width: 62ch; margin: 8px 0 0; color: var(--text-3); font-size: 13.5px; line-height: 1.55; }
.qt-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.qt-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; min-height: 32px; border-radius: 8px; }
.qt-button svg { width: 14px; height: 14px; }
.qt-spacer { flex: 1; }
.qt-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.qt-section-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.qt-section-head small { color: var(--text-3); font-size: 12px; }
.qt-agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.qt-agent-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qt-agent-sections .qt-section-head { min-height: 26px; }
.qt-agent-card { position: relative; display: flex; flex-direction: column; min-height: 150px; border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .16s ease, transform .16s var(--ease); overflow: hidden; }
.qt-agent-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); transform: translateY(-1px); }
.qt-agent-card.active, .qt-agent-card.active:hover { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--bg-accent-soft); }
.qt-agent-select { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 16px 16px 0; color: var(--text); text-align: left; background: transparent; border: 0; border-radius: var(--r-xl); }
.qt-agent-select:focus-visible { outline-offset: -4px; }
.qt-agent-top { display: flex; align-items: center; gap: 11px; padding-right: 40px; min-width: 0; }
.qt-agent-top b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.qt-agent-glyph { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--r-md); color: #fff; font: 500 12px/1 var(--font-mono); }
.qt-agent-badge { position: absolute; top: 16px; right: 12px; padding: 2px 6px; border-radius: 999px; color: var(--accent-text); background: var(--bg-accent-soft); font-size: 10px; font-weight: 600; pointer-events: none; }
.qt-agent-tagline { margin: 0; min-height: 39px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.qt-agent-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.qt-agent-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--bg-inset); color: var(--text-2); font-size: 11.5px; white-space: nowrap; }
.qt-agent-chip .bars { width: 13px; height: 12px; }
.qt-agent-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 10px 12px 12px; }
.qt-agent-foot .qt-button { min-height: 27px; padding: 3px 8px; font-size: 11.5px; }
.qt-agent-foot .icon-btn { width: 27px; height: 27px; }
.qt-agent-new { align-items: center; justify-content: center; gap: 10px; min-height: 190px; padding: 20px; text-align: center; border: 1px dashed var(--line-strong); box-shadow: none; color: var(--text-2); background: var(--bg-inset); }
.qt-agent-new > svg { width: 24px; height: 24px; color: var(--accent); }
.qt-agent-new > b { font-size: 14px; }
.qt-agent-new > span { max-width: 230px; font-size: 12px; line-height: 1.5; }
.qt-panel { margin-top: 22px; padding: 18px; border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); }
.qt-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.qt-panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.qt-panel-head p { margin: 5px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.qt-effort-control .seg { width: fit-content; min-width: 300px; }
.qt-effort-control .seg-btn { display: flex; justify-content: center; min-width: 72px; gap: 6px; }
.qt-control-hint { margin: 8px 0 0; color: var(--text-3); font-size: 12px; }
.qt-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.qt-setting-row + .qt-setting-row { box-shadow: inset 0 1px 0 var(--line-soft); }
.qt-setting-row > span { min-width: 0; }
.qt-setting-row b { display: block; font-size: 13.5px; font-weight: 500; }
.qt-setting-row small { display: block; margin-top: 3px; color: var(--text-3); font-size: 12px; line-height: 1.45; }
.qt-instructions { width: 100%; padding: 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 13.5px; line-height: 1.6; resize: vertical; }
.qt-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.qt-counter { color: var(--text-3); font-size: 11.5px; }
.qt-save-error { margin: 10px 0; color: var(--danger); font-size: 13px; }
.qt-task-notice { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.qt-task-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.qt-task-heading small { white-space: nowrap; }
.qt-task-schedules { flex-shrink: 0; height: 26px; min-height: 26px; padding: 0 7px; font: 500 13px/1 var(--font-ui); letter-spacing: normal; text-transform: none; }
.qt-task-list, .qt-task-notice { margin-top: 14px; }
.qt-task-list:not([hidden]) { display: grid; gap: 8px; }
.qt-task-row { display: block; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-inset); color: var(--text); text-align: left; }
.qt-task-row:hover { border-color: var(--line-strong); }
.qt-task-row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.qt-task-row b { font-size: 13.5px; overflow-wrap: anywhere; }
.qt-task-row small, .qt-task-status { font-size: 11.5px; color: var(--text-3); }
.qt-task-status { text-transform: capitalize; }
.qt-task-latest { display: block; margin-top: 5px; color: var(--text-2); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.qt-detail-body { padding: 0 20px 24px; }
.qt-detail-body > p { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.qt-detail-body h3 { margin: 20px 0 8px; font-size: 13px; }
.qt-agent-prompt { padding: 14px; background: var(--bg-inset); border-radius: 10px; white-space: pre-wrap; }
.qt-guide-intro { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-elevated); }
.qt-guide-intro > p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.qt-guide-intro b { color: var(--text); font-weight: 600; }
.qt-guide-icon { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: var(--bg-accent-soft); color: var(--accent-text); }
.qt-guide-icon svg { width: 17px; height: 17px; }
.qt-guide-topics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.qt-guide-topics .qt-button { min-height: 28px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--chip); font-size: 11.5px; text-align: left; }
.qt-guide-heading { margin: 30px 0 12px; color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.qt-guide-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.qt-guide-tip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.qt-guide-tip > span:first-child { display: flex; margin-top: 2px; color: var(--accent); }
.qt-guide-tip svg { width: 16px; height: 16px; }
.qt-guide-sections { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.qt-guide-section { padding: 18px 18px 14px; border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 16px; }
.qt-guide-head { display: flex; align-items: flex-start; gap: 12px; }
.qt-guide-head h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.qt-guide-head p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.qt-guide-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px 28px; margin-top: 6px; }
.qt-guide-label { margin: 14px 0 6px; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.qt-guide-text { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.qt-guide-can { display: flex; flex-direction: column; gap: 7px; padding: 0; margin: 0; list-style: none; }
.qt-guide-can li { display: flex; gap: 9px; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.qt-guide-can svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.qt-guide-complex { margin: 0; padding: 9px 12px; border-radius: var(--r-md); background: var(--bg-accent-soft); font-size: 13px; line-height: 1.55; }
.qt-guide-try { min-width: 0; }
.qt-guide-prompt { display: flex; align-items: center; gap: 9px; width: calc(100% + 20px); margin-inline: -10px; padding: 10px; text-align: left; border-radius: 8px; font-size: 13.5px; line-height: 1.45; color: var(--text); }
.qt-guide-prompt:hover { background: var(--bg-hover); color: var(--accent-text); }
.qt-guide-prompt svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-3); }
.qt-guide-lead { margin: -6px 0 12px; color: var(--text-3); font-size: 13px; }
.qt-guide-flows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qt-guide-flow { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); }
.qt-guide-flow h3 { margin: 0; font-size: 14px; font-weight: 600; }
.qt-guide-flow ol { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.qt-guide-flow-prompt { flex: 1; align-self: stretch; margin: 0; padding: 9px 12px; border-radius: var(--r-md); background: var(--chip); color: var(--text-2); font-size: 12.5px; line-height: 1.5; font-style: italic; }
.qt-guide-limits { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 14px 16px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-elevated); color: var(--text-2); font-size: 13px; }
.qt-guide-reference { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); font-size: 13px; }
.qt-guide-reference > summary { cursor: pointer; font-weight: 500; }
.qt-guide-reference h3 { font-size: 13px; margin-bottom: 4px; }
.qt-guide-reference li { color: var(--text-2); margin: 6px 0; }
#main[data-view="finance"] .page:not(.stock-page) { padding: 0; overflow: hidden; }
.qt-finance { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--bg); color: var(--text); }
.qt-finance .qt-button { font-family: var(--font-ui); text-transform: none; letter-spacing: 0; }
.qt-finance-titlebar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; flex-shrink: 0; min-height: 64px; }
.qt-finance-brand { display: flex; flex: 1 1 0; align-items: center; gap: 9px; color: var(--navy); white-space: nowrap; }
.qt-finance-brand > span { display: flex; color: var(--accent); }
.qt-finance-brand svg { width: 20px; height: 20px; }
.qt-finance-brand b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.qt-finance-titlebar .qt-head-actions { flex: 1 1 0; justify-content: flex-end; }
.qt-finance-titlebar .icon-btn { width: 30px; height: 30px; color: var(--text-2); }
.qt-finance-titlebar .icon-btn:hover { color: var(--accent-text); background: var(--bg-accent-soft); }
/* Brand and actions split the leftover space evenly, so the search stays centered until the actions need more room; then it narrows instead of overlapping them. */
.qt-finance-search { position: relative; flex: 0 1 460px; min-width: 220px; z-index: 6; }
.qt-finance-search > svg { position: absolute; top: 11px; left: 13px; width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.qt-finance-search > input { height: 38px; padding: 0 36px; border-radius: 999px; font-size: 13.5px; background: var(--bg-elevated); border-color: var(--line); }
.qt-finance-search > input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--bg-accent-soft); }
.qt-finance-search .ticker-results { top: calc(100% + 7px); border: 1px solid var(--line); border-radius: 14px; }
.qt-finance-nav { display: flex; align-items: flex-end; gap: 8px; padding: 0 20px; flex-shrink: 0; box-shadow: inset 0 -1px 0 var(--line); }
.qt-finance-tabs { display: flex; gap: 2px; align-items: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.qt-finance-tabs::-webkit-scrollbar { display: none; }
.qt-finance-tab, .qt-market-picker > summary { height: 42px; padding: 0 11px; border: 0; border-radius: 0; background: transparent; color: var(--text-2); font: 500 13.5px/1 var(--font-ui); white-space: nowrap; position: relative; display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; cursor: pointer; }
.qt-finance-tab:hover, .qt-market-picker > summary:hover { color: var(--text); }
.qt-finance-tab[aria-current="page"], .qt-market-picker.active > summary { color: var(--text); }
.qt-finance-tab[aria-current="page"]::after, .qt-market-picker.active > summary::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.qt-finance-tab > svg { width: 15px; height: 15px; }
.qt-finance-tab[aria-current="page"] > svg { color: var(--accent); }
.qt-tab-divider { flex-shrink: 0; align-self: center; width: 1px; height: 18px; background: var(--line-strong); margin: 0 6px; }
.qt-market-picker { position: relative; flex-shrink: 0; }
.qt-market-picker > summary { list-style: none; padding-inline: 9px; }
.qt-market-picker > summary::-webkit-details-marker { display: none; }
.qt-market-picker > summary > svg { width: 12px; height: 12px; color: var(--text-3); }
.qt-market-flag { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 1em; height: 1em; vertical-align: -.12em; font-size: 18px; line-height: 1; }
.qt-market-flag svg { display: block; width: 100%; height: auto; border-radius: 2px; }
.qt-market-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; display: flex; flex-direction: column; min-width: 210px; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elevated); box-shadow: var(--shadow-pop); }
.qt-market-menu button { display: flex; align-items: center; gap: 7px; text-align: left; padding: 10px; border-radius: 6px; font-size: 13px; color: var(--text-2); }
.qt-market-menu button:hover { background: var(--bg-hover); color: var(--text); }
.qt-finance-status { display: flex; align-items: center; gap: 6px; margin-right: 10px; color: var(--text-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qt-finance-status time { margin-left: 9px; font-variant-numeric: tabular-nums; }
.qt-market-status-dot { width: 7px; height: 7px; margin-inline: 3px 1px; border-radius: 50%; background: var(--text-3); opacity: .7; }
.qt-finance-status[data-market="open"] .qt-market-status-dot { background: var(--up); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.qt-finance-stage { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.qt-finance-desk { display: grid; flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 20px 20px 12px; overflow: hidden; }
.qt-finance-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.qt-finance-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; margin-right: -6px; }
.qt-finance-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.qt-finance-section-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.qt-section-meta { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.qt-finance-assets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.qt-finance-asset { display: flex; flex-direction: column; height: 126px; min-width: 0; padding: 11px 12px 0; border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); text-align: left; color: var(--text); overflow: hidden; transition: box-shadow .14s, transform .16s; }
.qt-finance-asset:hover { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--line-strong); transform: translateY(-1px); }
/* Give the four US benchmark charts about 50% more vertical range (47px to 71px). */
.qt-finance-asset-expanded { height: 150px; }
.qt-asset-top, .qt-asset-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qt-asset-top > span:first-child { min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-asset-badge { flex-shrink: 0; }
.qt-change-badge { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--chip); color: var(--text-3); white-space: nowrap; }
.qt-change-badge[data-tone="up"], .chg[data-tone="up"] .qt-table-percent { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.qt-change-badge[data-tone="down"], .chg[data-tone="down"] .qt-table-percent { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.qt-asset-mid { align-items: baseline; margin-top: 8px; }
.qt-asset-price { font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qt-asset-change { font-size: 12px; font-variant-numeric: tabular-nums; }
.qt-asset-change[data-tone="up"], .qt-watch-price [data-tone="up"] { color: var(--up); }
.qt-asset-change[data-tone="down"], .qt-watch-price [data-tone="down"] { color: var(--down); }
.qt-asset-spark { display: flex; flex: 1; min-height: 0; margin: 7px -12px 0; }
.qt-asset-spark svg { width: 100%; height: 100%; display: block; color: var(--text-3); }
.qt-asset-spark svg[data-tone="up"] { color: var(--up); }
.qt-asset-spark svg[data-tone="down"] { color: var(--down); }
.qt-spark-fill { fill: currentColor; opacity: .12; }
.qt-spark-line { fill: none; stroke: currentColor; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.qt-spark-base { stroke: var(--text-3); stroke-dasharray: 2 3; stroke-width: 1; opacity: .55; vector-effect: non-scaling-stroke; }
.qt-spark-unavailable { align-self: center; padding: 8px 12px; color: var(--text-3); font-size: 10px; }
.qt-finance-boards { display: flex; flex-direction: column; gap: 22px; margin-bottom: 26px; }
.qt-finance-board .table-wrap { overflow-x: auto; gap: 4px; }
.qt-finance-board .quotes { background: transparent; font-size: 13px; }
.qt-finance-board .quotes th { height: 32px; padding: 0 8px; border-bottom: 1px solid var(--line); color: var(--text-3); font: 500 11.5px/1.4 var(--font-ui); text-transform: none; letter-spacing: 0; }
.qt-finance-board .quotes th:first-child { color: var(--text); font-size: 13.5px; font-weight: 600; }
.qt-finance-board .quotes td { height: 48px; padding: 7px 8px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.qt-finance-board .quotes tbody tr:nth-child(n) { background: transparent; }
.qt-finance-board .quotes tbody tr:hover { background: var(--bg-hover); }
.qt-finance-board .quotes td:first-child b { display: block; margin-right: 0; font: 500 13px/1.5 var(--font-ui); }
.qt-finance-board .quotes td:first-child small { display: block; font-size: 11px; }
.qt-finance-board .range small { display: none; }
.qt-finance-board .range-bar { width: 80px; height: 4px; background: var(--line); }
.qt-finance-board .range-bar i { width: 3px; height: 10px; border-radius: 2px; background: var(--navy); margin-left: -1px; }
.qt-table-percent { display: inline-block; padding: 3px 6px; border-radius: 5px; font-weight: 600; }
.qt-finance-board .fin-note { margin: 4px 8px 0; font-size: 10.5px; }
.qt-finance-rail { min-width: 0; min-height: 0; overflow-y: auto; }
.qt-rail-title { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0 12px; color: var(--text); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.qt-rail-title:hover { color: var(--accent-text); }
.qt-rail-title svg { width: 14px; height: 14px; }
.qt-watch-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 53px; padding: 9px 6px; border-radius: 9px; color: var(--text); text-align: left; }
.qt-watch-row:hover { background: var(--bg-hover); }
.qt-watch-logo { display: grid; place-items: center; position: relative; width: 32px; height: 32px; flex-shrink: 0; overflow: hidden; border-radius: 9px; background: var(--bg-accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.qt-watch-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-elevated); opacity: 0; }
.qt-watch-logo img[data-loaded] { opacity: 1; }
.qt-watch-name { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.qt-watch-name b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-watch-name small { color: var(--text-3); font-size: 11.5px; }
.qt-watch-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.qt-watch-price b { font-size: 13px; font-weight: 400; }
.qt-watch-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 10px 0 20px; color: var(--text-3); font-size: 12px; }
.qt-watch-pager .icon-btn { width: 25px; height: 25px; }
.qt-watch-pager .icon-btn:disabled { opacity: .35; cursor: default; }
.qt-finance-news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 18px; margin: 8px 0 16px; border-top: 1px solid var(--line); }
.qt-finance-news-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.qt-finance-news-head small { color: var(--text-3); font-size: 11.5px; }
.qt-finance-news .news-item { display: flex; flex-direction: column; gap: 6px; padding: 9px 6px 14px; border: 0; border-radius: var(--r-md); background: transparent; }
.qt-finance-news a.news-item { color: var(--text); text-decoration: none; }
.qt-finance-news .news-item:hover { background: var(--bg-hover); }
.qt-finance-news .news-item small { order: -1; color: var(--text-3); font-size: 11.5px; }
.qt-finance-news .news-item b { font-size: 13px; font-weight: 500; line-height: 1.45; }
.qt-finance-brief { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 8px; padding: 16px; border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: inset 0 0 0 1px var(--line); }
.qt-finance-brief-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; color: var(--accent); background: var(--bg-accent-soft); border-radius: var(--r-md); }
.qt-finance-brief-icon svg { width: 18px; height: 18px; }
.qt-finance-brief-body { flex: 1; min-width: 0; }
.qt-finance-brief b { font-size: 14px; font-weight: 600; }
.qt-finance-brief p { margin: 5px 0 12px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.qt-finance-brief .qt-button { min-height: 32px; padding: 6px 12px; font-size: 12.5px; }
.qt-finance-prompts { display: flex; flex-direction: column; margin: 10px 0 24px; }
.qt-finance-prompt { display: flex; align-items: center; gap: 10px; padding: 13px 4px; width: 100%; color: var(--text); font-size: 13.5px; text-align: left; box-shadow: inset 0 -1px 0 var(--line-soft); }
.qt-finance-prompt:hover { color: var(--accent-text); background: var(--bg-hover); }
.qt-finance-prompt svg { width: 13px; height: 13px; flex-shrink: 0; margin-left: auto; color: var(--text-3); }
.qt-finance-ask { display: flex; align-items: center; flex-shrink: 0; gap: 8px; min-height: 52px; margin-top: 10px; padding: 6px 6px 6px 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--bg-elevated); }
.qt-finance-ask:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--bg-accent-soft); }
.qt-finance-ask input { min-width: 0; width: 0; flex: 1; height: 38px; padding: 0; border: 0; box-shadow: none; background: transparent; outline: 0; color: var(--text); font-size: 14px; }
.qt-finance-ask-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bg-accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 600; white-space: nowrap; }
.qt-finance-ask-chip svg { width: 12px; height: 12px; }
.qt-finance-send { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: white; }
.qt-finance-send:disabled { color: var(--text-3); background: var(--chip); cursor: default; }
.qt-finance-send:not(:disabled):hover { background: var(--accent-text); }
.qt-finance-send svg { width: 16px; height: 16px; }
.qt-finance-single { width: 100%; max-width: 1100px; padding: 20px; margin: 0 auto; overflow-y: auto; }
.qt-finance-disclaimer { margin: 0; padding: 6px 20px 9px; font-size: 10px; color: var(--text-3); }
.qt-finance-history { padding-bottom: 18px; }
.qt-finance-history > p { padding-inline: 20px; }
.qt-history-symbol { display: block; width: calc(100% - 24px); margin: 2px 12px; padding: 11px; border-radius: 7px; color: var(--text); font: 13px/1.5 var(--font-mono); text-align: left; }
.qt-history-symbol:hover { background: var(--bg-hover); color: var(--accent-text); }
@media (max-width: 1250px) { .qt-finance-status { display: none; } .qt-finance-desk { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; } .qt-finance-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qt-finance-tab { padding-inline: 9px; } }
@media (max-width: 900px) {
  .qt-finance-titlebar { flex-wrap: wrap; gap: 10px; }
  .qt-finance-search { order: 3; position: relative; top: auto; left: auto; transform: none; flex-basis: 100%; width: 100%; }
  .qt-finance-titlebar .qt-head-actions { margin-left: auto; }
  .qt-finance-desk { display: flex; flex-direction: column; overflow-y: auto; }
  .qt-finance-main, .qt-finance-rail { flex: none; min-height: auto; overflow: visible; }
  .qt-finance-scroll { flex: none; overflow: visible; }
  .qt-finance-ask { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -8px 20px 3px var(--bg); }
}
@media (max-width: 700px) {
  .qt-finance-titlebar { padding: 10px 12px 10px 52px; gap: 8px; }
  .qt-finance-brand { gap: 6px; }
  .qt-finance-brand b { font-size: 12px; }
  .qt-finance-brand svg { width: 16px; height: 16px; }
  .qt-finance-titlebar .qt-head-actions { gap: 2px; }
  .qt-finance-titlebar .icon-btn { width: 26px; height: 28px; }
  .qt-finance-search { margin-left: -40px; flex-basis: calc(100% + 40px); width: calc(100% + 40px); }
  .qt-finance-nav { padding-inline: 10px; gap: 3px; }
  .qt-market-picker > summary, .qt-finance-tab { padding-inline: 8px; height: 38px; font-size: 12px; }
  .qt-market-flag { font-size: 16px; }
  .qt-finance-desk { padding: 12px 12px 14px; }
  .qt-finance-assets { gap: 8px; }
  .qt-asset-top { gap: 5px; }
  .qt-asset-top > span:first-child { font-size: 12px; }
  .qt-change-badge { font-size: 10px; padding: 3px 4px; }
  .qt-asset-price { font-size: 16px; }
  .qt-asset-change { font-size: 10.5px; }
  .qt-finance-brief { padding: 14px; gap: 10px; }
  .qt-finance-brief-icon { width: 30px; height: 30px; }
  .qt-finance-ask-chip { display: none; }
  .qt-finance-section-head { gap: 8px; }
  .qt-section-meta { font-size: 10px; }
  .qt-finance-disclaimer { padding-inline: 12px; }
  .qt-finance-single { padding: 14px 12px; }
}
.desktop-download-content { display: flex; flex-direction: column; gap: 18px; }
.desktop-download-content .download-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.desktop-download-content .fin-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 850px) {
  .qt-agent-sections { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 700px) {
  .qt-page { padding: 0 14px 44px; }
  .qt-head { margin-top: 14px; padding-top: 38px; }
  .qt-head h1 { font-size: 21px; }
  .qt-agent-grid { grid-template-columns: minmax(0, 1fr); }
  .qt-setting-row, .qt-panel-foot { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .qt-effort-control .seg { min-width: 0; width: 100%; }
  .qt-effort-control .seg-btn { min-width: 0; flex: 1; padding-inline: 6px; }
  .qt-guide-body, .qt-guide-flows { grid-template-columns: minmax(0, 1fr); }
  .qt-guide-section { padding: 14px 14px 10px; }
  .qt-guide-topics .qt-button { min-height: 34px; }
}

/* Finance › Screener (market.js screenerTab): preset filters over feargreedflow's screener, in the app's palette. */
.screen { display: grid; gap: 14px; }
.screen-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.screen-head .fin-note { margin: 0; }
.screen-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); }
.screen-filter { display: grid; gap: 5px; min-width: 0; color: var(--text-3); font-size: 11.5px; font-weight: 600; cursor: help; }
.screen-select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: 500 13px var(--font-ui); }
.screen-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.screen-select { width: 100%; cursor: pointer; }
.screen-select.set { border-color: var(--accent); color: var(--accent-text); }
.screen-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.screen-active { color: var(--text-3); font-size: 12.5px; }
.screen-sort-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: inherit; font: inherit; }
.screen-sort-btn:hover { color: var(--text); }
th.num .screen-sort-btn { flex-direction: row-reverse; }
.screen-sort { min-width: 8px; font-size: 9px; }
.screen-watch-col { width: 34px; padding-right: 0 !important; }
.screen-star { width: 24px; height: 24px; border-radius: 6px; color: var(--text-3); font-size: 15px; line-height: 1; }
.screen-star:hover { background: var(--bg-hover); color: var(--text); }
.screen-star.on { color: #e3a008; }
.screen-company { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.screen-company .screen-name { max-width: 260px; overflow: hidden; color: var(--text-2); font-weight: 400; text-overflow: ellipsis; }
.screen-market { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.screen-flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.screen-count { margin: 0 0 8px; color: var(--text-3); font-size: 12.5px; }
.screen-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); }
.screen-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.screen-table th { position: sticky; top: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg-elevated); color: var(--text-3); font-size: 11.5px; font-weight: 600; text-align: left; white-space: nowrap; }
.screen-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.screen-table tr:last-child td { border-bottom: 0; }
.screen-table .num { font-variant-numeric: tabular-nums; text-align: right; }
.screen-table .up { color: var(--up); }
.screen-table .down { color: var(--down); }
.screen-row { cursor: pointer; }
.screen-row:is(:hover, :focus-visible) td { background: var(--bg-hover); outline: none; }
/* The 13F and stock-map research cards fill the Finance pane. */
.qt-finance-lab > .lab-card { margin: 0; }

/* quantcept.io's Finance list chips (finance-module .toolbar / .chip / .chipOn / .chipCount): the Watchlist tab's lists
   and the Portfolios tab's portfolios and actions, in this palette. */
.qt-chip-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.qt-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2); font: 500 12.5px/1 var(--font-ui); white-space: nowrap; transition: background-color .18s, color .18s, box-shadow .18s; }
.qt-chip:hover { background: var(--bg-hover); color: var(--text); }
.qt-chip.on, .qt-chip.on:hover { background: var(--text); color: var(--bg); box-shadow: none; }
.qt-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qt-chip-count { opacity: .6; font-variant-numeric: tabular-nums; }
.qt-chip-dot { width: 7px; height: 7px; border-radius: 50%; }
.qt-chip-icon { display: inline-flex; }
.qt-chip-icon svg { width: 13px; height: 13px; }
@media (max-width: 760px) { .qt-chip { height: 36px; } }
/* quantcept.io's list head (watchlist-module .eyebrow / .title / .dot / .desc). */
.qt-list-head { margin-bottom: 14px; }
.qt-list-eyebrow { margin: 0 0 8px; color: var(--text-3); font: 400 11px/1.2 var(--font-pixel, var(--font-mono)); letter-spacing: .08em; text-transform: uppercase; }
.qt-list-title { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font: 600 24px/1.3 var(--font-ui); letter-spacing: -.02em; text-transform: none; }
.qt-list-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.qt-list-desc { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 760px) { .qt-list-title { font-size: 21px; } }
/* 13F, Stock maps and Screener: the whole Finance pane rather than the 1,100px reading column, with their lists
   (13F managers and holdings, the screener's results) running down to the bottom of the screen; the map grows with
   the width. Headers stay put while a list scrolls. */
.qt-finance-single.qt-finance-wide { max-width: none; }
.qt-finance-wide .hf-scroll { max-height: max(520px, calc(100dvh - 320px)); }
.qt-finance-wide .screen-scroll { max-height: max(420px, calc(100dvh - 300px)); overflow: auto; }
.qt-finance-wide .screen-table th { z-index: 1; }
/* Finance › Maps fills the pane's height, as feargreedflow's /maps does (100vh less the bars above it). */
.qt-finance-wide .lab-map { aspect-ratio: auto; height: max(480px, calc(100dvh - 300px)); }
